示例#1
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     ContentCreator.GenerateMaps();
     ContentCreator.GenerateContent();
     // content generate
     Dificlty.Visibility = Visibility.Visible;
 }
示例#2
0
        void timer_Tick(object sender, EventArgs e)
        {
            
            if (ActionTime.Value >= ActionTime.Maximum)
            {
                ActionTime.Value = 0; // new round
                ExecuteComboClip();
                MobEffectRound();
                PlayerEffectRound();
                Globals.Player = AiAttacs(Globals.Player, MobAttacValue());
                UpdateHpBar();
                RemoveDeadMobs();
                if (isPlayerDead())
                {
                    //game Over
                    ContentCreator.MCDied();
                    timer.Stop();
                    
                }
                else if (AreMobsDead())
                {
                    //ecunter won
                    Globals.Scene = 3;
                    timer.Stop();
                    
                }
                GetTimerSpeed();
                playerAttacVisual();
                MobAttacVisual();

            }
            ActionTime.Value++;
            PrintComboClip();
            tests.Content = ActionTime.Value + "/" + ActionTime.Maximum; //debug
            if (((Keyboard.IsKeyDown(Key.A) || Keyboard.IsKeyDown(Key.W) || Keyboard.IsKeyDown(Key.Space) || Keyboard.IsKeyDown(Key.S) || Keyboard.IsKeyDown(Key.D)) && KeyDownCombo > 5) || ((Keyboard.IsKeyDown(Key.Up) || Keyboard.IsKeyDown(Key.Down)) && KeyDownSelect>10))
            {
                KeyPressHandle();
            }
            else
            {
                if (KeyDownSelect <= 10)
                {
                    KeyDownSelect++;
                }
                if(KeyDownCombo <= 5)
                {
                    KeyDownCombo++;
                }
                
                
            }


        }
示例#3
0
        public MainWindow()
        {
            InitializeComponent();

            ContentCreator.GenerateMaps();

            ContentCreator.GenerateContent();

            Globals.Player.Stats.Def   = 20;
            Globals.Player.Stats.speed = 20;
            Globals.Player.Stats.Dmg   = 20;

            Globals.Scene = 4;
        }