Skip to content

Commit

Permalink
Add action to PlayResultScreen.cs (YARC-Official#518)
Browse files Browse the repository at this point in the history
This action triggers when the results screen is enabled or exited. Added for the upcoming need of the stage kit to know when to trigger different cues
  • Loading branch information
TheFatBastid authored Jul 6, 2023
1 parent a067c0a commit 4e6b3f5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Assets/Script/Menu/PlayResultScreen/PlayResultScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ public class PlayResultScreen : MonoBehaviour
public HashSet<PlayerManager.Player> disqualified;
public HashSet<PlayerManager.Player> bot;

public static event Action<bool> OnEnabled;

void OnEnable()
{
// Populate header information
Expand Down Expand Up @@ -97,6 +99,8 @@ void OnEnable()
CreatePlayerCards();

StartCoroutine(EnableAnimation());

OnEnabled?.Invoke(true);
}

/// <summary>
Expand Down Expand Up @@ -308,6 +312,7 @@ public void PlayRestart()
public void PlayExit()
{
Play.Instance.Exit();
OnEnabled?.Invoke(false);
}
}
}
}

0 comments on commit 4e6b3f5

Please sign in to comment.