Ejemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();
            BattleScreen battleScreen = new BattleScreen(new Party(new Knight(3, 150), new PetDog(3, 150)), new Party());

            this.Close();
            battleScreen.Show();
        }
Ejemplo n.º 2
0
        private void SelectSkill_Click(object sender, RoutedEventArgs e)
        {
            if (this.Abilities.SelectedItem == null)
            {
                MessageBox.Show("You must select a skill!");
                return;
            }

            BattleScreen battleScreen = null;

            foreach (var window in Application.Current.Windows)
            {
                if (window is BattleScreen)
                {
                    battleScreen = window as BattleScreen;
                    break;
                }
            }

            battleScreen.SelectSkill(this.Abilities.SelectedItem as Skill);

            this.Close();
        }