Ejemplo n.º 1
0
 // The miner here stores coins into the treasure
 public override void StoreCoins()
 {
     _isStoring = true;
     _isReady   = false;
     _treasure.AddMoney(moneyHolding);
     moneyHolding     = 0;
     _moneyCount.text = "0";
     FinishedWorking();
 }
Ejemplo n.º 2
0
 public override void FinishedWorking()
 {
     if (_isStoring)
     {
         _isReady = false;
         uint moneyToGive = _moneyStored;
         _moneyStored     = 0;
         _moneyCount.text = "0";
         _moneyHouse.AddMoney(moneyToGive);
     }
     else
     {
         _moneyStored    += _levelManager.GetMoneyFromFloor(_currentFloor);
         _moneyCount.text = _moneyStored + "";
     }
     base.FinishedWorking();
 }