Beispiel #1
0
 void AddGold(int add_gold, UIRepeatButton btn = null)
 {
     if (m_GiveGold + add_gold > m_AvailableGold)
     {
         Tooltip.Instance.ShowMessageKey("NotEnoughtoken_gold");
         if (btn != null)
         {
             btn.enabled = false;
             btn.SetPressed(false);
         }
         return;
     }
     if (m_GiveGold + add_gold > GuildInfoManager.Config.GiveGoldMax)
     {
         //Tooltip.Instance.ShowMessageKey("NotEnoughtoken_gold");
         if (btn != null)
         {
             btn.enabled = false;
             btn.SetPressed(false);
         }
         return;
     }
     m_GiveGold += add_gold;
     UpdateGold();
 }