001
22.04.2006, 16:56 Uhr
Marco Griep
|
C++: |
#region timers private void Fuelcount_Tick(object sender, EventArgs e) { if (p_fuel == 0) { //gehe zu ship - } else { p_fuel--; Fuel.Text = "Fuel: " + p_fuel; } }
private void GameOver_Tick(object sender, EventArgs e) { if (p_ships == 0) { Streamwriter.Start(); } else {
} }
private void Shipcount_Tick(object sender, EventArgs e) { if (p_health == 0) { p_ships--; p_health += 1000; } else {
} }
private void Ammocount_Tick(object sender, EventArgs e) {
} #endregion
#region Steuerung
private void Ship_shoots(object sender, EventArgs e) { if (p_ammo == 0) { //sound abspielen } else { //sound abspielen p_ammo -= 2; Ammo.Text = "Ammo: " + p_ammo; }
} private void Ship_flyes(object sender, EventArgs e) { Spaceship.Location = new Point(MousePosition.X, MousePosition.Y + 50); //Spaceship position = 50 Pixel unter fadenkreuz }
#endregion
#region menü private void neuGAME_Click(object sender, EventArgs e) { Gamego.Start(); }
private void Exit_Click(object sender, EventArgs e) { Environment.Exit(0); }
private void beendenToolStripMenuItem_Click(object sender, EventArgs e) { Environment.Exit(0); }
private void neuesSpielToolStripMenuItem_Click(object sender, EventArgs e) { Gamego.Start(); }
private void Gamego_Tick(object sender, EventArgs e) { //munitionregelung p_ammo = 500; p_fuel = 3000; p_health = 1000;
//texte Health.Text = "Health: " + p_health; // + variable Ammo.Text = "Ammo: " + p_ammo;// + variable Ships.Text = "Ships: " + p_ships;// + variable Fuel.Text = "Fuel: " + p_fuel;//variable
//sichtbar neuGAME.Visible = false; Optionen.Visible = false; Exit.Visible = false; Continue.Visible = false; Health.Visible = true; Ammo.Visible = true; Ships.Visible = true; Fuel.Visible = true; GOMess.Visible = false; Level.Visible = false; Spaceship.Visible = true; Scoreshow.Visible = true; Spaceship.Visible = true; leicht.Visible = false; mittel.Visible = false; schwer.Visible = false; Sndon.Visible = false; Sndof.Visible = false; hgsja.Visible = false; hgsnein.Visible = false; Highscoresave.Visible = false; Sound.Visible = false; Schwierigkeit.Visible = false; backtomenü.Visible = false; Hgsshow.Visible = false; MyName.Visible = false; ;
//bedienung neuGAME.Enabled = false; Optionen.Enabled = false; Exit.Enabled = false; Continue.Enabled = false;
//timers Fuelcount.Start(); Healthcount.Start(); Shipcount.Start(); Scorecount.Start(); Gamego.Stop(); }
private void Colorset_Tick(object sender, EventArgs e) { if (rot >= 245) { rot = 0; } else if (grün >= 245) { grün = 0; } else if (blau >= 245) { blau = 0; } else { rot += 3; grün += 3; blau += 3; } GOMess.ForeColor = Color.FromArgb(rot, grün, blau); Scoreshow.ForeColor = Color.FromArgb(rot, grün, blau); }
|
|