public void Setup() { // Initilize Xamarin Forms MockForms.Init(); //This is your App.xaml and App.xaml.cs, which can have resources, etc. app = new App(); Application.Current = app; page = new BattlePage(); }
/// <summary>Goes to the BattlePage.</summary> /// <param name="text">Text to be displayed on the BattlePage.</param> private void BattleFromInn(string text) { GameState.CurrentUser.GainHungerThirst(); BattlePage battlePage = new BattlePage(true) { RefToInnPage = RefToInnPage }; battlePage.AddText(text); GameState.CurrentEnemy = new Enemy(_selectedUser); GameState.Navigate(battlePage); }
public void Setup() { // Initilize Xamarin Forms MockForms.Init(); //This is your App.xaml and App.xaml.cs, which can have resources, etc. app = new App(); Application.Current = app; // Choose which engine to run BattleEngineViewModel.Instance.SetBattleEngineToKoenig(); page = new BattlePage(); }
public void Setup() { // Initilize Xamarin Forms MockForms.Init(); //This is your App.xaml and App.xaml.cs, which can have resources, etc. app = new App(); Application.Current = app; page = new BattlePage(); // Put seed data into the system for all tests //page.EngineViewModel.Engine.CharacterList.Add(new PlayerInfoModel(new CharacterModel())); //page.EngineViewModel.Engine.MonsterList.Add(new PlayerInfoModel(new MonsterModel())); //page.EngineViewModel.Engine.MakePlayerList(); }
private void BtnAccept_Click(object sender, RoutedEventArgs e) { if (CheckHungerThirst()) { GameState.CurrentUser.GainHungerThirst(); BattlePage battlePage = new BattlePage() { RefToJobsPage = this, BlnJob = true }; battlePage.TxtBattle.Text = "You stalk your opponent."; GameState.Navigate(battlePage); } else { BtnLeaveTable.IsEnabled = true; } }
public void Setup() { // Initilize Xamarin Forms MockForms.Init(); //This is your App.xaml and App.xaml.cs, which can have resources, etc. app = new App(); Application.Current = app; page = new BattlePage(); // Put seed data into the system for all tests BattleEngineViewModel.Instance.Engine.Round.ClearLists(); //Start the Engine in AutoBattle Mode BattleEngineViewModel.Instance.Engine.StartBattle(false); BattleEngineViewModel.Instance.Engine.EngineSettings.CharacterList.Add(new PlayerInfoModel(new CharacterModel())); BattleEngineViewModel.Instance.Engine.EngineSettings.MonsterList.Add(new PlayerInfoModel(new MonsterModel())); BattleEngineViewModel.Instance.Engine.Round.MakePlayerList(); }
public MainPage() { Page mePage, gamePage, scorePage, charPage, invPage, monsterPage, gameitemsPage, battlePage = null; switch (Device.RuntimePlatform) { case Device.iOS: mePage = new NavigationPage(new MePage()) { Title = "Information" }; gamePage = new NavigationPage(new GamePage()) { Title = "Game" }; scorePage = new NavigationPage(new ScorePage()) { Title = "Score" }; charPage = new NavigationPage(new CharacterPage()) { Title = "Character" }; invPage = new NavigationPage(new InventoryPage()) { Title = "Inventory" }; monsterPage = new NavigationPage(new MonstersPage()) { Title = "Monsters" }; gameitemsPage = new NavigationPage(new GameItemsPage()) { Title = "Items" }; battlePage = new NavigationPage(new BattlePage()) { Title = "Battle" }; mePage.Icon = "tab_about.png"; gamePage.Icon = "tab_feed.png"; scorePage.Icon = "tab_feed.png"; charPage.Icon = "tab_about.png"; invPage.Icon = "tab_about.png"; monsterPage.Icon = "tab_about.png"; gameitemsPage.Icon = "tab_about.png"; battlePage.Icon = "tab_about.png"; //itemsPage.Icon = "tab_feed.png"; //aboutPage.Icon = "tab_about.png"; break; default: mePage = new MePage() { Title = "Me" }; gamePage = new GamePage() { Title = "Game" }; scorePage = new ScorePage() { Title = "Score" }; charPage = new CharacterPage() { Title = "Character" }; invPage = new InventoryPage() { Title = "Inventory" }; monsterPage = new MonstersPage() { Title = "Monsters" }; gameitemsPage = new GameItemsPage() { Title = "Items" }; battlePage = new BattlePage() { Title = "Battle" }; break; } Children.Add(mePage); Children.Add(gamePage); Children.Add(scorePage); Children.Add(charPage); Children.Add(invPage); Children.Add(monsterPage); Children.Add(gameitemsPage); Children.Add(battlePage); Title = Children[0].Title; }