コード例 #1
0
ファイル: PlayerService.cs プロジェクト: OlegGelezcov/Casual
        public void SetGold(int count)
        {
            int oldCount = gold;

            gold = count;
            if (oldCount != gold)
            {
                RavenhillEvents.OnPlayerGoldChanged(oldCount, gold);
            }
        }
コード例 #2
0
ファイル: PlayerService.cs プロジェクト: OlegGelezcov/Casual
 public void RemoveGold(int count)
 {
     if (gold >= count)
     {
         int oldCount = gold;
         gold -= count;
         if (oldCount != gold)
         {
             RavenhillEvents.OnPlayerGoldChanged(oldCount, gold);
         }
     }
 }