diff --git a/Assets/Scripts/Player/PlayerSpecificManager.cs b/Assets/Scripts/Player/PlayerSpecificManager.cs index f806ac3..8056df0 100644 --- a/Assets/Scripts/Player/PlayerSpecificManager.cs +++ b/Assets/Scripts/Player/PlayerSpecificManager.cs @@ -1,6 +1,5 @@ using System.Collections; using System.Collections.Generic; -using UnityEditor.UI; using UnityEngine; using UnityEngine.InputSystem; diff --git a/Assets/Scripts/Player/PlayerStateController.cs b/Assets/Scripts/Player/PlayerStateController.cs index 1060b42..c7642f7 100644 --- a/Assets/Scripts/Player/PlayerStateController.cs +++ b/Assets/Scripts/Player/PlayerStateController.cs @@ -152,8 +152,10 @@ void FixedUpdate() } if (Interact && !ui.GetBuildToggle()) - SetState(PlayerStates.FREE); - + { + OnInteract(); + //SetState(PlayerStates.FREE); + } break; } } diff --git a/Assets/Scripts/Player/PlayerUi.cs b/Assets/Scripts/Player/PlayerUi.cs index a766c7d..d2d7b9b 100644 --- a/Assets/Scripts/Player/PlayerUi.cs +++ b/Assets/Scripts/Player/PlayerUi.cs @@ -43,6 +43,7 @@ public void SetActiveUI(bool value) public void ToggleBuildMenu() { + if (playerStateController.CurrentState == PlayerStates.BUILDING) { return; } buildToggle = !buildToggle; SetActiveUI(buildToggle); if (buildToggle)