void dialog_Closed(object sender, EventArgs e) { _lostTheBall = null; PhysicsSprite ball = _physicsController.PhysicsObjects["ellBall"]; ball.BodyObject.Position = new Vector2(460, 430); }
void _physicsController_Collision(string sprite1, string sprite2) { if (sprite1 == "ellBall" && sprite2.StartsWith("cnvKicker")) { Score += 10; } if (_lostTheBall == null && sprite1 == "ellBall" && sprite2 == "rectPlatform") { _lostTheBall = new LostTheBall(); _lostTheBall.Closed += new EventHandler(dialog_Closed); _lostTheBall.Show(); } }