Exemplo n.º 1
0
        /// <summary>
        /// display the initial player setup window and initialize player properties
        /// </summary>
        private void InitializePlayerSetupWindow()
        {
            PlayerSetupWindow playerSetupWindow = new PlayerSetupWindow();

            playerSetupWindow.Owner       = _gameWindow;
            playerSetupWindow.DataContext = _gameSession;
            playerSetupWindow.Show();

            _gameSession.CurrentPlayer.IsActive = true;
        }
        /// <summary>
        /// setup new or existing player
        /// </summary>
        private void SetupPlayer()
        {
            if (_newPlayer)
            {
                _playerSetupwindow = new PlayerSetupWindow(_player);
                _playerSetupwindow.ShowDialog();

                //
                // setup up game based player properties
                //
                _player.CurrentLevel  = 0;
                _player.HP            = 100;
                _player.CurrentStatus =;
            }
            else
            {
                _player = GameData.PlayerData();
            }
        }