private void MenuButtonBack_Click(MenuButton menuButton) { var lShopScreen = new ShopScreen(); this.ScreenManager.TransitionTo(lShopScreen); }
private void BeeWorldLocationComponent_Click(BeeWorldLocationComponent locationComponent) { var lLocationId = (int) locationComponent.Tag; var lPlayerManager = this.ScreenManager.BeeWorldManager.PlayerManager; switch (lLocationId) { case sShopId: { var lShopScreen = new ShopScreen(); var lTravelingScreen = new TravelingScreen(lShopScreen); this.ScreenManager.TransitionTo(lTravelingScreen); lPlayerManager.TravelToShop(lTravelingScreen.TravelingComplete); break; } case sMarketId: System.Diagnostics.Debug.Assert(false, "Market location should be disabled."); break; case sHoneyHouseId: { var lHoneyHouseScreen = new HoneyHouseScreen(); var lTravelingScreen = new TravelingScreen(lHoneyHouseScreen); this.ScreenManager.TransitionTo(lTravelingScreen); lPlayerManager.TravelToHoneyHouse(lTravelingScreen.TravelingComplete); break; } default: { var lPlayer = lPlayerManager.Player; var lBeeYard = lPlayer.BeeYards[lLocationId]; System.Diagnostics.Debug.Assert(lBeeYard.IsUnlocked); var lBeeYardScreen = new BeeYardScreen(); if (lBeeYard == lPlayerManager.Player.CurrentBeeYard) { lPlayerManager.TravelToBeeYard(); this.ScreenManager.TransitionTo(lBeeYardScreen); } else { var lTravelingScreen = new TravelingScreen(lBeeYardScreen); this.ScreenManager.TransitionTo(lTravelingScreen); lPlayerManager.TravelTo(lBeeYard, lTravelingScreen.TravelingComplete); } break; } } }