Added a list to keep track of all the scheduled inputs of a minigame

...Along with an Util function to return the closest scheduled input
This commit is contained in:
Pengu123
2022-05-04 20:05:51 +02:00
parent 13a2417f37
commit 6384d28295
2 changed files with 43 additions and 3 deletions

View File

@ -14,10 +14,14 @@ namespace HeavenStudio.Games
public delegate void ActionEventCallback();
public delegate void ActionEventCallbackState(float state);
public delegate void ActionEventCallbackSelf(PlayerActionEvent evt);
public ActionEventCallbackState OnHit; //Function to trigger when an input has been done perfectly
public ActionEventCallback OnMiss; //Function to trigger when an input has been missed
public ActionEventCallback OnBlank; //Function to trigger when an input has been recorded while this is pending
public ActionEventCallbackSelf OnDestroy; //Function to trigger whenever this event gets destroyed. /!\ Shouldn't be used for a minigame! Use OnMiss instead /!\
public float startBeat;
public float timer;
@ -154,6 +158,7 @@ namespace HeavenStudio.Games
public void CleanUp()
{
OnDestroy(this);
Destroy(this.gameObject);
}