Better Sound Sequences (#190)

* add way of creating sound sequences in inspector

- actually implement GameAction preFunction
- implement sound scheduling for Jukebox and MultiSound

* Dj School: fix turntable effect being parented to root

* Pajama Party: fix sleep action type not carrying over between transitions
This commit is contained in:
minenice55
2023-01-04 23:04:31 -05:00
committed by GitHub
parent 22133a5c54
commit 87d20b8c8f
28 changed files with 392 additions and 108 deletions

View File

@ -89,6 +89,23 @@ namespace HeavenStudio
}
}
public void CallPreEvent(DynamicBeatmap.DynamicEntity entity)
{
string[] details = entity.datamodel.Split('/');
Minigames.Minigame game = minigames.Find(c => c.name == details[0]);
try
{
currentEntity = entity;
Minigames.GameAction action = game.actions.Find(c => c.actionName == details[1]);
action.preFunction.Invoke();
}
catch (Exception ex)
{
Debug.LogWarning("Event not found! May be spelled wrong or it is not implemented.\n" + ex);
}
}
public static List<DynamicBeatmap.DynamicEntity> GetAllInGameManagerList(string gameName, string[] include)
{
List<DynamicBeatmap.DynamicEntity> temp1 = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel.Split('/')[0] == gameName);