public void showBattleArea()
        {
            playArea.Children.Clear();
            CombatGUI cg = new CombatGUI();

            playArea.Children.Add(cg);
        }
Exemple #2
0
        public void battle()
        {
            if (playSound)
            {
                sp.Stop();
                sp.SoundLocation = "Resources/HDATE Begin Battle Theme.wav";
            }
            currentScene = Scenes.Battling;
            inGameScreen.armorBox.IsEnabled  = false;
            inGameScreen.weaponBox.IsEnabled = false;

            clearPlayArea();
            CombatGUI = new CombatGUI(ref p1, testMap.currentFloor);
            CombatGUI.FleeButton.Click += new RoutedEventHandler(fleeButton_Click);
            CombatGUI.AtkButton.Click  += new RoutedEventHandler(attkButton_Click);
            inGameScreen.playArea.Children.Add(CombatGUI);
            if (playSound)
            {
                if (testMap.currentFloor % 5 == 0)
                {
                    //sp.SoundLocation = "Resources/HDATE Begin Boss Theme.wav";
                    //sp.PlaySync();
                    sp.Stop();
                    sp.SoundLocation = "Resources/HDATE Boss Theme.wav";
                    sp.PlayLooping();
                }
                else
                {
                    sp.PlaySync();
                    sp.Stop();
                    sp.SoundLocation = "Resources/HDATE Battle Theme.wav";
                    sp.PlayLooping();
                }
            }
        }