private void ResumeButton_Click(object sender, EventArgs e) { Game.Hero.ShowHeroShip = true; HeroBulletTimer.Start(); timer1.Start(); HidePauseMenu(); HeroHealth.Visible = true; HeroHealth.Enabled = true; BossHealth.Visible = true; BossHealth.Enabled = true; }
private void NewGame_Click(object sender, EventArgs e) { HeroHealth.Visible = true; HeroHealth.Enabled = true; enemyTimerCounter = 0; Game = new Game(this.Width, this.Height); timer1.Start(); HeroBulletTimer.Start(); Game.Hero.ShowHeroShip = true; HidePauseMenu(); }
private void PickHero4_MouseClick(object sender, MouseEventArgs e) { HidePickHeroUI(); Game.Hero.HeroShipImg = VP_Project.Properties.Resources.HeroShip4; Game.Hero.ShowHeroShip = true; HeroHealth.Enabled = true; HeroHealth.Visible = true; PickedHeroFlag = true; HeroBulletTimer.Start(); timer1.Start(); HeroHealth.Value = Game.Hero.Health; }
private void LoadGame_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "SpaceOdyssey(*.so)|*.so"; ofd.Title = "Load a SpaceOdyssey Game"; if (ofd.ShowDialog() == DialogResult.OK) { FileName = ofd.FileName; BinaryFormatter binaryFormatter = new BinaryFormatter(); FileStream stream = new FileStream(FileName, FileMode.Open, FileAccess.Read, FileShare.None); Game = (Game)binaryFormatter.Deserialize(stream); stream.Close(); PickedHeroFlag = true; HeroHealth.Enabled = true; HeroHealth.Visible = true; timer1.Start(); HeroBulletTimer.Start(); buttonclicked(); Game.Hero.ShowHeroShip = true; } //this.Text = FileName; }