Rhytm minigame base
This commit is contained in:
1 parent
258900d1d6
commit
329cc98ade
7696 files changed
+238891
-619017
No files matched your search
@@ -45,6 +45,8 @@ namespace Code.Game.TestingLevel
|
||||
|
||||
Context.InputService.BindActionPerformed((int)ActionMappings.Debug, (int)DebugActions.ToggleBattleMode,
|
||||
ToggleBattleMode);
|
||||
Context.InputService.BindActionPerformed((int)ActionMappings.Debug, (int)DebugActions.ToggleMinigames,
|
||||
ToggleMinigames);
|
||||
#endif
|
||||
|
||||
Context.InputService.EnableMap(ActionMappings.OpenMovement);
|
||||
@@ -52,7 +54,7 @@ namespace Code.Game.TestingLevel
|
||||
|
||||
await Context.Camera.SwitchState(CameraMode.OpenMovement);
|
||||
|
||||
if (Context.StateMachine.CurrentState == AppStates.BattleState) return;
|
||||
if (Context.StateMachine.CurrentState is AppStates.BattleState or AppStates.MusicMinigame) return;
|
||||
|
||||
Context.AudioService.SetAudioListener(Context.Camera.Camera.GetComponent<AudioListener>());
|
||||
|
||||
@@ -121,6 +123,11 @@ namespace Code.Game.TestingLevel
|
||||
playerMovementController.Freeze = false;
|
||||
}
|
||||
|
||||
private void ToggleMinigames(InputAction.CallbackContext obj)
|
||||
{
|
||||
Context.StateMachine.SwitchState(AppStates.MusicMinigame).Forget();
|
||||
}
|
||||
|
||||
private void ToggleBattleMode(InputAction.CallbackContext obj)
|
||||
{
|
||||
Context.StateMachine.SwitchState(AppStates.BattleState).Forget();
|
||||
@@ -132,10 +139,12 @@ namespace Code.Game.TestingLevel
|
||||
Context.InputService.DisableMap(ActionMappings.Debug);
|
||||
Context.InputService.UnbindActionPerformed((int)ActionMappings.Debug, (int)DebugActions.ToggleBattleMode,
|
||||
ToggleBattleMode);
|
||||
Context.InputService.UnbindActionPerformed((int)ActionMappings.Debug, (int)DebugActions.ToggleMinigames,
|
||||
ToggleMinigames);
|
||||
#endif
|
||||
Context.InputService.DisableMap(ActionMappings.OpenMovement);
|
||||
|
||||
if (Context.StateMachine.NextState == AppStates.BattleState) return;
|
||||
if (Context.StateMachine.NextState is AppStates.BattleState or AppStates.MusicMinigame) return;
|
||||
|
||||
await Context.SceneLoader.UnloadSceneAsync(SceneId.Testing);
|
||||
await Context.SceneLoader.UnloadSceneAsync(SceneId.FirstTestingSegment);
|
||||
|
||||
Reference in new issue
Block a user