コード例 #1
0
ファイル: Wallet.cs プロジェクト: swerum/WitchyRPG
 /// <summary>
 /// has all button parents update their children to check if the player has enough money
 /// </summary>
 private void UpdateExchangeParents()
 {
     GameObject[] parents = GameObject.FindGameObjectsWithTag("ExchangeButtonParent");
     foreach (GameObject p in parents)
     {
         ExchangeButtonParent e = p.GetComponent <ExchangeButtonParent>();
         if (e != null)
         {
             e.UpdateButtons();
         }
     }
 }
コード例 #2
0
ファイル: Exchange.cs プロジェクト: swerum/WitchyRPG
 private void Start()
 {
     parent = GetComponentInParent <ExchangeButtonParent>();
     UpdateImage();
 }