void PerformPlayerVsDoorCollision() { if (door != null && door.IsOpen && player.Intersects(door)) { CCSimpleAudioEngine.SharedEngine.PlayEffect("EnteringDoor"); try { bool isLastLevel = (LevelManager.Self.CurrentLevel + 1 == LevelManager.Self.NumberOfLevels); if (isLastLevel) { GameDelegate.GoToLevelSelectScene(); } else { DestroyLevel(); LevelManager.Self.CurrentLevel++; GoToLevel(LevelManager.Self.CurrentLevel); } } catch (Exception e) { int m = 3; } } }
private void ApplyInput(float seconds) { if (controller != null && controller.IsConnected) { controller.UpdateInputValues(); player.ApplyInput(controller.HorizontalRatio, controller.JumpPressed); if (controller.BackPressed) { GameDelegate.GoToLevelSelectScene(); } } else { touchScreen.UpdateInputValues(); player.ApplyInput(touchScreen.HorizontalRatio, touchScreen.WasJumpPressed); } }
private void HandleBackClicked(object sender, EventArgs args) { GameDelegate.GoToLevelSelectScene(); }