private void timer2_Tick(object sender, EventArgs e) { // level 1 int movement = 0; if (label2.Text == "This Is Level 1") {movement = 5; if (Death.Width == 64) { Death.Location = new Point(Death.Location.X + movement, Death.Location.Y); } if (Death.Location == new Point(390, 202)) { Death.Width = 63; } if (Death.Width == 63) { Death.Location = new Point(Death.Location.X - movement, Death.Location.Y); } if (Death.Location == new Point(30, 202)) { Death.Width = 64; } } // level 2 if (label2.Text == "This Is Level 2") {movement = 15; if (Death.Width == 64) { Death.Location = new Point(Death.Location.X + movement, Death.Location.Y); } if (Death.Location == new Point(390, 202)) { Death.Width = 63; } if (Death.Width == 63) { Death.Location = new Point(Death.Location.X - movement, Death.Location.Y); } if (Death.Location == new Point(30, 202)) { Death.Width = 64; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)