public Form1() { Initialize(); InitializeComponent(); t = new thor(this.Height, this.Width); DoubleBuffered = true; score = 0; lvl = 1; lives = 3; hasHammer = false; timer = new Timer(); timer.Tick += new EventHandler(timer_Tick); timer.Interval = 10; timer.Enabled = true; timer.Start(); thanos = new thanos(); timerThanos = new Timer(); timerThanos.Interval = 50; timerThanos.Tick += new EventHandler(timer3_Tick); //timerThanos.Start(); timerGauntlet = new Timer(); timerGauntlet.Interval = 50; timerGauntlet.Tick += new EventHandler(timer2_Tick); // timerGauntlet.Start(); DoubleBuffered = true; doc = new gauntletDoc(); generateGauntlet = 0; }
public bool Hit(thor t) { if (Position.X >= t.center.X && Position.X + 80 <= t.center.X && Position.Y + 80 >= t.center.Y) { return(true); } return(false); }
public bool Hit(thor t) { for (int i = 0; i < gauntlets.Count; i++) { if (gauntlets[i].Hit(t)) { gauntlets[i].delete = true; return(true); } } return(false); }