public FroggerGame() { rand1 = new Random(); score = new score(); drawables = new List <IDrawable>(); frogger = new Frogger(); drawables.Add(frogger); rand2 = new Random(); Text = new TextBlock(); viewCars(); viewWater(); drawables.Add(car_row_10); drawables.Add(car_row_9); drawables.Add(car_row_8); drawables.Add(car_row_7); drawables.Add(Turtles_1); drawables.Add(Logs_1); drawables.Add(Turtles_2); drawables.Add(Logs_2); Color color = Color.FromArgb(255, 0, 255, 0); Wall_1 = new BoundaryCollision(-128, 64, 704, color); Wall_2 = new BoundaryCollision(512, 64, 704, color); drawables.Add(Wall_1); drawables.Add(Wall_2); }
public void LowerScore(Frogger frogger) { switch (frogger.froggerRow - 1) { case 1: Score -= 100; break; case 2: Score -= 10; break; case 3: Score -= 10; break; case 4: Score -= 10; break; case 5: Score -= 10; break; case 6: Score -= 50; break; case 7: Score -= 10; break; case 8: Score -= 10; break; case 9: Score -= 10; break; case 10: Score -= 10; break; default: break; } }
public void SetScore(Frogger frogger) { switch (frogger.froggerRow) { case 1: Score += 100; break; case 2: Score += 10; break; case 3: Score += 10; break; case 4: Score += 10; break; case 5: Score += 10; break; case 6: Score += 50; break; case 7: Score += 10; break; case 8: Score += 10; break; case 9: Score += 10; break; case 10: Score += 10; break; default: break; } }
static void Main() { using (var game = new Frogger()) game.Run(); }