public override LocationDefinition DoAction() { LocationDefinition returnData = GameState.CurrentLocation; this.ClearScreen(false); if (GameState.Hero.gold < GameState.Hero.maxGold) { GameState.Hero.gold += this._gold; if (GameState.Hero.gold > GameState.Hero.maxGold) { GameState.Hero.gold = GameState.Hero.maxGold; } } Console.WriteLine("You take {0} gold and now have {1} gold.", this._gold, GameState.Hero.gold); _GoldResults = PickUpGoldResults.Taken; PickUpGoldEventArgs goldEventArgs = new PickUpGoldEventArgs(); goldEventArgs.GoldResults = _GoldResults; OnPostTake(goldEventArgs); this.ClearScreen(); return(returnData); }
public virtual void OnPostTake(PickUpGoldEventArgs goldEvenArgs) { if (PostItem != null) { PostItem(this, goldEvenArgs); } }
public void RoomTwoGold(object sender, PickUpGoldEventArgs goldEventArgs) { if (goldEventArgs.GoldResults == PickUpGoldResults.Taken) { LocationHandler.SetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownSewerLeft.TOOK_GOLD_KEY, true); // Reload LocationHandler.ResetLocation(ROOM_TWO_KEY); } }
public void StorageRoomGold(object sender, PickUpGoldEventArgs goldEventArgs) { if (goldEventArgs.GoldResults == PickUpGoldResults.Taken) { LocationHandler.SetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenInconspicousCave.STORAGE_ROOM_GOLD, true); //Reload LocationHandler.ResetLocation(STORAGE_ROOM_KEY); } }
public void RoomFiveGold(object sender, PickUpGoldEventArgs goldEventArgs) { if (goldEventArgs.GoldResults == PickUpGoldResults.Taken) { LocationHandler.SetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownBanditHouse.TOOK_ROOM_FIVE_GOLD, true); // Reload LocationHandler.ResetLocation(ROOM_FIVE_KEY); } }
public void EastGold(object sender, PickUpGoldEventArgs goldEventArgs) { if (goldEventArgs.GoldResults == PickUpGoldResults.Taken) { LocationHandler.SetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerBeachHead.EAST_GOLD, true); //Reload LocationHandler.ResetLocation(EAST_TENTS_KEY); } }