/// <summary> /// create view model with data set /// </summary> private void InstantiateAndShowView() { // // instantiate the view model and initialize the data set // _gameSessionViewModel = new GameSessionViewModel( _player, GameData.InitialMessages(), GameData.GameMapData(), GameData.StartingLocation() ); GameSessionView gameSessionView = new GameSessionView(_gameSessionViewModel); gameSessionView.DataContext = _gameSessionViewModel; gameSessionView.Show(); PlayerSetupView playerSetupView = new PlayerSetupView(_player); playerSetupView.DataContext = _player; playerSetupView.Show(); // // dialog window is initially hidden to mitigate issue with // main window closing after dialog window closes // // commented out because the player setup window is disabled //_playerSetupView.Close(); }
private Player SetUpNewPlayer(Player player) { _playerSetupView = new PlayerSetupView(); _playerSetupView.ShowDialog(); return(player); }
/// <summary> /// setup new or existing player /// </summary> private void SetupPlayer() { if (_newPlayer) { _playerSetupView = new PlayerSetupView(_player); _playerSetupView.ShowDialog(); } else { _player = GameData.PlayerData(); } }
private void SetupPlayer() { if (_newPlayer) { _playerSetupView = new PlayerSetupView(_player); _playerSetupView.ShowDialog(); _player.Inventory = new System.Collections.ObjectModel.ObservableCollection <GameItemQuantity>(); } else { _player = GameData.PlayerData(); } }
private void SetupPlayer() { if (_newPlayer) { _playerSetupView = new PlayerSetupView(_player); _playerSetupView.ShowDialog(); _player.Experience = 0; _player.Health = 100; } else { _player = GameData.PlayerData(); } }
public void SetupPlayer() { if (_newPlayer) { _playerSetupView = new PlayerSetupView(_player); _playerSetupView.ShowDialog(); _player.ExperiencePoints = 0; _player.Health = 100; _player.Lives = 3; } else { _player = GameData.PlayerData(); } }
/// <summary> /// setup new or existing player /// </summary> private void SetupPlayer() { if (_newPlayer) { _playerSetupView = new PlayerSetupView(_player); _playerSetupView.ShowDialog(); // setup up game based player properties _player.Health = 100; _player.ExperiencePoints = 0; } else { _player = GameData.PlayerData(); } }
/// <summary> /// Sets up the new player and sets player properties /// </summary> private void SetupPlayer() { if (_newPlayer) { _playerSetupView = new PlayerSetupView(_player); _playerSetupView.ShowDialog(); //setup game based player properties _player.Health = 100; _player.Lives = 3; _player.Currency = 125; } else { _player = GameData.PlayerData(); } }
private void SetupPlayer() { if (_newPlayer) { _playerSetupView = new PlayerSetupView(_player); _playerSetupView.ShowDialog(); _player.Power = 450; _player.Title = Character.CharacterTitle.Praetor; _player.Inventory = new System.Collections.ObjectModel.ObservableCollection <GameItemQuantity>(); _player.LegionnaireNumbers = 450; } else { _player = GameData.PlayerData(); } }
//This is the method that allows a new player setup to begin by creating a field to hold weather or not this is a new player and if so to launch the player setup window private void SetupPlayer() { if (_newPlayer) { _playerSetupView = new PlayerSetupView(_player); //sends the fields of the player to the player setup view to set the player properties _playerSetupView.ShowDialog(); //launches window and returns the data after the input has been provided _player.ExperiencePoints = 0; _player.Health = 100; _player.Lives = 4; } else { _player = GameData.PlayerData(); //if the player is not a new player loof to the existing game data for player information } }
/// <summary> /// setup new or existing player /// </summary> private void SetupPlayer() { if (_newPlayer) { _playerSetupView = new PlayerSetupView(_player); _playerSetupView.ShowDialog(); // // setup up game based player properties // _player.HitPoints = 100; _player.Lives = 5; } else { _player = GameData.PlayerData(); } }
/// <summary> /// setup new or existing player /// </summary> private void SetupPlayer() { if (_newPlayer) { _playerSetupView = new PlayerSetupView(_player); _playerSetupView.ShowDialog(); // setup up game based player properties _player.Health = 100; _player.ExperiencePoints = 0; _player.Inventory = new ObservableCollection <GameItemQuantity>() { new GameItemQuantity(GameData.GameItemById(201), 1) }; } else { _player = GameData.PlayerData(); } }
/// <summary> /// setup new or existing player /// </summary> private void SetupPlayer() { if (_newPlayer) { _playerSetupView = new PlayerSetupView(_player); _playerSetupView.ShowDialog(); // // setup up game based player properties // _player.HitPoints = 100; _player.Lives = 5; _player.ExpierencePnts = 0; _player.Gold = 50; _player.ItemCarried = Character.Items.Rope; } else { _player = GameData.PlayerData(); } }
/// <summary> /// setup new or existing player /// </summary> private void SetupPlayer() { if (_newPlayer) { _playerSetupView = new PlayerSetupView(_player); _playerSetupView.ShowDialog(); // // setup up game based player properties // _player.QuestPoints = 0; _player.IsAlive = true; _player.Gold = 50; _player.Shield = 25; _player.Name = "Player"; _player.Health = 100; } else { _player = GameData.PlayerData(); } }
private void SetupPlayer() { if (_newPlayer) { _playerSetupView = new PlayerSetupView(_player); _playerSetupView.ShowDialog(); _player.ExperiencePoints = 0; _player.Health = 100; _player.Lives = 3; _player.Missions = new ObservableCollection <Mission>() { GameData.MissionById(1), GameData.MissionById(2), GameData.MissionById(3) }; } else { _player = GameData.PlayerData(); } }
public void SetupPlayer() { if (_newPlayer) { _playerSetupView = new PlayerSetupView(_player); _playerSetupView.ShowDialog(); // // setup up game based player properties // _player.Exp = 0; _player.Health = 100; _player.Lives = 3; _player.Inventory = new ObservableCollection <GameItem>(GameData.DefaultInventoryGameItems()); _player.Crew = new ObservableCollection <Npc>() { }; } else { _player = GameData.PlayerData(); } }
private void SetupPlayer() { if (_newPlayer) { _playerSetupView = new PlayerSetupView(_player); //sends the fields of the player to the player setup view to set the player properties _playerSetupView.ShowDialog(); //launches window and returns the data after the input has been provided _player.ExperiencePoints = 0; _player.Health = 100; _player.Lives = 4; _player.SpecialArmor = Player.Armor.Low; _player.Inventory = new ObservableCollection <GameItemQuantity>() { new GameItemQuantity(GameItemById(1001), 1), new GameItemQuantity(GameItemById(2010), 2) }; } else { _player = GameData.PlayerData(); //if the player is not a new player look to the existing game data for player information } }
/// <summary> /// Method to create the new Player with default values /// </summary> private void SetupPlayer() { if (_newPlayer) { _playerSetupView = new PlayerSetupView(_player); _playerSetupView.ShowDialog(); _player.Health = 100; _player.Mana = 100; _player.Life = 3; if (_player.JobTitle == Player.JobTitleName.Mage) { _player.MageSkill = 5; } else if (_player.JobTitle == Player.JobTitleName.Healer) { } { _player.HealerSkill = 5; } if (_player.Race == Character.RaceType.Nungari) { _player.MageSkill += 5; } else if (_player.Race == Character.RaceType.Diolecian) { _player.MageSkill += 10; } else if (_player.Race == Character.RaceType.Draggaru) { _player.HealerSkill += 5; } else { _player.HealerSkill += 10; } if (_player.Gender == Character.GenderType.Male) { _player.MageSkill += 5; } else if (_player.Gender == Character.GenderType.Female) { _player.HealerSkill += 5; } else { _player.MageSkill += 5; _player.HealerSkill += 5; } _player.Inventory = new ObservableCollection <GameItemQuantity>() { new GameItemQuantity(GameData.GameItemById(131), 1000) }; _player.Quests = new ObservableCollection <Quest>() { GameData.QuestById(1), GameData.QuestById(2), GameData.QuestById(3) }; } else { _player = GameData.PlayerData(); } }