Skip to content

Commit

Permalink
Merge pull request #156 from hackerspace-ntnu/fix/ui-ondeath
Browse files Browse the repository at this point in the history
Remove UI wheel on death immediately
  • Loading branch information
Fueredoriku authored Oct 19, 2022
2 parents a638c18 + 541d607 commit f446ffb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Assets/Scripts/Player/PlayerStateController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ public void SetState(PlayerStates state)
break;
case PlayerStates.IN_TURRET_MENU:
anim.SetBool(planningAnimatorParam, false);
ui.SetActiveUI(false);
break;
}

Expand Down
5 changes: 5 additions & 0 deletions Assets/Scripts/Player/PlayerUi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ void Start()
messageUI = GetComponent<MessageUI>();
}

public void SetActiveUI(bool value)
{
ui.SetActive(value);
}

void LateUpdate()
{
//Points the UI to the main camera
Expand Down

0 comments on commit f446ffb

Please sign in to comment.