public static void WaitUntilPieceFallsAutomatically(this Game game) { var pieceFinishedFalling = false; Game.GameEventHandler eventHandler = delegate { pieceFinishedFalling = true; }; game.PieceFinishedFallingEvent += eventHandler; while (!pieceFinishedFalling) { game.Update(1.0f); } game.PieceFinishedFallingEvent -= eventHandler; }
public static void RemoveEvent(eEvents _event, GameEventHandler _handler) { EventSystem.Instance.RemoveEvent(_event, _handler); }