add updater for marching orders turn

This commit is contained in:
minenice55 2023-06-10 23:00:30 -04:00
parent 210be54ba3
commit 1c1c731dd1
2 changed files with 28 additions and 7 deletions

View file

@ -18,12 +18,38 @@ using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using Jukebox;
namespace HeavenStudio.Games.Loaders
{
using static Minigames;
public static class AgbMarcherLoader
{
public static Minigame AddGame(EventCaller eventCaller) {
public static Minigame AddGame(EventCaller eventCaller)
{
RiqEntity FaceTurnUpdater(string datamodel, RiqEntity entity)
{
if (datamodel == "marchingOrders/face turn")
{
if (entity["type2"] == (int)MarchingOrders.FaceTurnLength.Normal)
{
entity.datamodel = "marchingOrders/faceTurn";
}
else
{
entity.datamodel = "marchingOrders/faceTurnFast";
}
entity.CreateProperty("direction", entity["type"]);
entity.CreateProperty("point", false);
entity.dynamicData.Remove("type");
entity.dynamicData.Remove("type2");
return entity;
}
return null;
}
RiqBeatmap.OnUpdateEntity += FaceTurnUpdater;
return new Minigame("marchingOrders", "Marching Orders", "ffb108", false, false, new List<GameAction>()
{
new GameAction("bop", "Bop")
@ -148,11 +174,6 @@ namespace HeavenStudio.Games.Loaders
new GameAction("face turn", "Direction to Turn (old)")
{
hidden = true,
function = delegate {
var e = eventCaller.currentEntity;
MarchingOrders.instance.FaceTurn(e.beat, e["type"], e["type2"], false);
},
defaultLength = 4f,
parameters = new List<Param>()
{
new Param("type", MarchingOrders.Direction.Right, "Direction", "The direction the sergeant wants the cadets to face"),