void Start() { ItemDire itemDire = GetComponent <ItemDire> (); AccessoryDire accessoryDire = GetComponent <AccessoryDire> (); DressDire dressDire = GetComponent <DressDire> (); WeaponDire weaponDire = GetComponent <WeaponDire> (); playerdata = new Player("テストプレイヤー", 0, 0, 0, 0, 0, 0); ItemList.Add(itemDire.GetItem(0)); AccessoryList.Add(accessoryDire.GetItem(0)); DressList.Add(dressDire.GetItem(0)); WeaponList.Add(weaponDire.GetItem(0)); }
public void Profile_OnClick() { animator.SetBool("profile", true); ItemDataBase DataBaseSC = DataBase.GetComponent <ItemDataBase> (); //ItemDire ItemDireSC = DataBase.GetComponent<ItemDire> (); AccessoryDire AccessoryDireSC = DataBase.GetComponent <AccessoryDire> (); WeaponDire WeaponDireSC = DataBase.GetComponent <WeaponDire> (); DressDire DressDireSC = DataBase.GetComponent <DressDire> (); ProfilePanel.transform.Find("KihonPanel/playername").GetComponent <Text>().text = DataBaseSC.getPlayerName(); ProfilePanel.transform.Find("KihonPanel/money").GetComponent <Text>().text = "所持金:" + DataBaseSC.getMoney().ToString(); ProfilePanel.transform.Find("SoubiPanel/accessory").GetComponent <Text> ().text = "アクセサリ:" + AccessoryDireSC.GetItem(DataBaseSC.getAccessoryID()).itemName; ProfilePanel.transform.Find("SoubiPanel/dress").GetComponent <Text>().text = "衣装:" + DressDireSC.GetItem(DataBaseSC.getDressID()).itemName; //ProfilePanel.transform.Find ("SoubiPanel/weapon").GetComponent<Text>().text = "道具:"+DataBaseSC.getWeaponID().ToString(); ProfilePanel.transform.Find("SoubiPanel/weapon").GetComponent <Text> ().text = "道具:" + WeaponDireSC.GetItem(DataBaseSC.getWeaponID()).itemName; }