UUUUUUUUUUUUUUUUH

This commit is contained in:
ThomasCharester committed 2026-10-18 18:40:45 +03:00
1 parent e8393a28ad
commit f0bb83c869
110 files changed
+55065 -21232

No files matched your search

+21 -2
View File
@@ -12,6 +12,7 @@ using ObservableCollections;
using R3;
using Reflex.Core;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.SceneManagement;
namespace Code.Game.TestingLevel
@@ -29,12 +30,21 @@ namespace Code.Game.TestingLevel
{
Cursor.lockState = CursorLockMode.Locked;
#if UNITY_EDITOR
Context.InputService.EnableMap(ActionMappings.Debug);
Context.InputService.BindActionPerformed((int)ActionMappings.Debug, (int)DebugActions.ToggleBattleMode, ToggleBattleMode);
#endif
Context.InputService.EnableMap(ActionMappings.OpenMovement);
Context.AudioService.SetAudioListener(Context.Camera.Camera.GetComponent<AudioListener>());
await Context.Camera.SwitchState(CameraMode.OpenMovement);
if (Context.StateMachine.CurrentState == AppStates.BattleState) return;
Context.AudioService.SetAudioListener(Context.Camera.Camera.GetComponent<AudioListener>());
var waitForContainer =
Context.SceneContainerManager.ScenesContainers
.ObserveDictionaryAdd()
@@ -94,8 +104,17 @@ namespace Code.Game.TestingLevel
playerMovementController.Freeze = false;
}
private void ToggleBattleMode(InputAction.CallbackContext obj)
{
Context.StateMachine.SwitchState(AppStates.BattleState).Forget();
}
public override async UniTask ExitState()
{
#if UNITY_EDITOR
Context.InputService.DisableMap(ActionMappings.Debug);
Context.InputService.UnbindActionPerformed((int)ActionMappings.Debug, (int)DebugActions.ToggleBattleMode, ToggleBattleMode);
#endif
Context.InputService.DisableMap(ActionMappings.OpenMovement);
if (Context.StateMachine.NextState == AppStates.BattleState) return;