public void SetImage() { Item.ITEMCODE Codes; for (int i = 0; i < 2; i++) { if (MenuItemIndex.GetItemIndexToCode(out Codes, (MenuItemIndex.RESULTTYPE)i, ImageNumber)) { Item.ItemData data = Item.GetItem(Codes); if (i == 0) { PotionSprite = data.GetSprite(); } else { EqulpMentSprite = data.GetSprite(); } } } }
public void SetImage() { Item.ITEMCODE code = isPotion ? GameData.ins.PotionCode[Order] : GameData.ins.EquipmentCode[Order]; if (code == Item.ITEMCODE.NONE) { img.color = Color.clear; return; } else { img.color = Color.white; } Item.ItemData data = Item.GetItem(code); img.sprite = data.GetSprite(); }
void Start() { ControllerName = status.Controller == 0 ? "Champion" : "Challanger"; Item.ItemData idta = Item.GetItem(GameData.ins.PotionCode[status.Controller]); PotionImgs.sprite = idta.GetSprite(); }