mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 21:57:37 +02:00
Added inactive functions
I'm going to flesh it out more in the next commit
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user