// EquipItemButtonが押され装備スロットにアイテムをセット public void SetStatusWindowItemData(StatusWindowItemData itemData) { statusWindowItemData = itemData; GetComponent <Image>().sprite = statusWindowItemData.GetItemSprite(); transform.parent.GetComponent <Image>().color = new Color(1f, 1f, 1f, 100f / 255f); }
private void Awake() { // アイテムの全情報を作成 itemLists[0] = new StatusWindowItemData(Resources.Load("FlashLight", typeof(Sprite)) as Sprite, "懐中電灯", Item.Sword, "あれば便利な辺りを照らすライト"); itemLists[1] = new StatusWindowItemData(Resources.Load("Sword", typeof(Sprite)) as Sprite, "ナイフ", Item.Sword, "切れ味するどいナイフ"); itemLists[2] = new StatusWindowItemData(Resources.Load("Sword", typeof(Sprite)) as Sprite, "ブロードソード", Item.Sword, "大剣"); itemLists[3] = new StatusWindowItemData(Resources.Load("Gun", typeof(Sprite)) as Sprite, "ハンドガン", Item.HandGun, "威力抜群ハンドガン"); }
void Awake() { itemLists[0] = new StatusWindowItemData(Resources.Load("coins", typeof(Sprite)) as Sprite, "懐中電灯", Item.Sword, "あれば便利な辺りを照らすライト"); itemLists[1] = new StatusWindowItemData(Resources.Load("axe", typeof(Sprite)) as Sprite, "ナイフ", Item.Sword, "切れ味の鋭いナイフ"); itemLists[2] = new StatusWindowItemData(Resources.Load("sword", typeof(Sprite)) as Sprite, "ブロードソード", Item.Sword, "大剣"); itemLists[3] = new StatusWindowItemData(Resources.Load("gem", typeof(Sprite)) as Sprite, "ハンドガン", Item.HandGun, "威力抜群ハンドガン"); }
// アイテム情報管理関数 private void Awake() { itemsList[0] = new StatusWindowItemData(Resources.Load("Attack") as Sprite, "攻撃アップ", Item.AttackUP, "攻撃力上昇"); itemsList[1] = new StatusWindowItemData(Resources.Load("VelUP") as Sprite, "速度アップ", Item.VelUP, "移動速度上昇"); }
public void SetStatusWindowItemData(StatusWindowItemData itemData) { statusWindowItemData = itemData; }