[過去ログ] UnityでMMO作りたいけどどうする!?(^^Part2 [無断転載禁止]©2ch.net (1002レス)
1-

このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
812: 名前は開発中のものです。 [sage] 2017/08/30(水) 00:03:46.84 ID:uGY/TkcT(2/30) AAS

ItemManager.csの書きかけのOnEnableをまるごとコメントアウト


Sengen.csをItemSlot.csに変更しItemSlotPrefabに追加
ItemSlotPrefabのImage>spriteに0番のスプライトを指定


ItemManager.csに以下の宣言を追加
List<ItemSlot> itemSlotList = new List<ItemSlot> ();&#8232;List<Image> slotIconList = new List<Image> ();&#8232;
Startに以下の処理を追加&#8232;itemSlotList.Add(slot.GetComponent<ItemSlot>());&#8232;slotIconList.Add(slot.GetComponent<Image>());&#8232;
以下のメソッドを追加
public void getItem(int id){
int index = itemSlotList.FindIndex (s => s.id == 0);&#8232; slotIconList [index].sprite = textures [id];&#8232; itemSlotList [index].id = id;&#8232;}
1-
あと 190 レスあります
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル

ぬこの手 ぬこTOP 0.022s