Added inactive functions

I'm going to flesh it out more in the next commit
This commit is contained in:
Slaith
2022-03-02 13:59:35 -08:00
parent 197332c2a5
commit 7e291e0bfa
7 changed files with 101 additions and 39 deletions

View File

@ -60,7 +60,7 @@ namespace RhythmHeavenMania
}
public void CallEvent(Beatmap.Entity entity)
public void CallEvent(Beatmap.Entity entity, bool gameActive)
{
string[] details = entity.datamodel.Split('/');
Minigames.Minigame game = minigames.Find(c => c.name == details[0]);
@ -71,8 +71,14 @@ namespace RhythmHeavenMania
if (details.Length > 2) currentSwitchGame = details[2];
Minigames.GameAction action = game.actions.Find(c => c.actionName == details[1]);
action.function.Invoke();
if (gameActive)
{
action.function.Invoke();
}
else
{
action.inactiveFunction.Invoke();
}
}
catch (Exception ex)
{