Skip to content

Commit

Permalink
Fixed various bugs related to playerUI menu state toggle.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fueredoriku committed Oct 23, 2024
1 parent e7eafbf commit 1d069e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion Assets/Scripts/Player/PlayerSpecificManager.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Collections;
using System.Collections.Generic;
using UnityEditor.UI;
using UnityEngine;
using UnityEngine.InputSystem;

Expand Down
6 changes: 4 additions & 2 deletions Assets/Scripts/Player/PlayerStateController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,10 @@ void FixedUpdate()
}

if (Interact && !ui.GetBuildToggle())
SetState(PlayerStates.FREE);

{
OnInteract();
//SetState(PlayerStates.FREE);
}
break;
}
}
Expand Down
1 change: 1 addition & 0 deletions Assets/Scripts/Player/PlayerUi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public void SetActiveUI(bool value)

public void ToggleBuildMenu()
{
if (playerStateController.CurrentState == PlayerStates.BUILDING) { return; }
buildToggle = !buildToggle;
SetActiveUI(buildToggle);
if (buildToggle)
Expand Down

0 comments on commit 1d069e2

Please sign in to comment.