private void Lose(object sender, LoseGameArgs LoseArg) { gameUI.GamePlataform = new GraphicGamePlataform(Width, Height, Velocity); gameUI.GamePlataform.LoseGame += new GraphicGamePlataform.LoseGameHandler(Lose); for (int i = 0; i < rd.Next(0, Width / 2); i++) { gameUI.GamePlataform.AddObject(new GraphicObject(new DefaultObject(plataform.Size, new Point(rd.Next(2, Width), rd.Next(2, Width)), ObjectContent.Solid, ObjectType.Tree))); } gameUI.GamePlataform.Play(); }
private static void Lose(object sender, LoseGameArgs LoseArg) { gameUI.GamePlataform = new GraphicGamePlataform(Width, Height, Velocity); gameUI.GamePlataform.UpdateView += new GamePlataform.UpdateViewHandler(UpdateView); gameUI.GamePlataform.LoseGame += new GamePlataform.LoseGameHandler(Lose); for (int i = 0; i < rd.Next(0, Width / 2); i++) { gameUI.GamePlataform.AddObject(new DefaultObject(plataform.Size, new Point(rd.Next(2, Width), rd.Next(2, Width)), ObjectContent.Solid, ObjectType.Tree)); } DrawLose(string.Empty); Thread.Sleep(5000); gameUI.GamePlataform.Play(); }