private void Button_Click(object sender, RoutedEventArgs e) { ContentCreator.GenerateMaps(); ContentCreator.GenerateContent(); // content generate Dificlty.Visibility = Visibility.Visible; }
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++; } } }
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; }