WXGame/Blacksmith/Assets/Script/UI/CraftingUI.cs

27 lines
548 B
C#
Raw Normal View History

2024-10-23 09:14:01 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
2024-11-13 16:56:37 +08:00
using UnityEngine.UI;
2024-10-23 09:14:01 +08:00
2024-11-13 16:56:37 +08:00
public class CraftingUI : MonoBehaviour
2024-10-23 09:14:01 +08:00
{
2024-11-13 16:56:37 +08:00
[SerializeField] private Image _image;
2024-10-23 09:14:01 +08:00
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
2024-11-13 16:56:37 +08:00
public void SaveIcon(int id)
{
2024-12-04 17:26:27 +08:00
var data = JsonTab.Instance.tables.Item.Get(id);
_image.sprite = AssetBundleManager.ins.Sprite(data.Icon, AtlasType.ItemIcon);
2024-11-13 16:56:37 +08:00
}
2024-10-23 09:14:01 +08:00
}