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 UnityEditor;
using UnityEngine; using UnityEngine;
using Jukebox;
namespace HeavenStudio.Games.Loaders namespace HeavenStudio.Games.Loaders
{ {
using static Minigames; using static Minigames;
public static class AgbMarcherLoader 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>() return new Minigame("marchingOrders", "Marching Orders", "ffb108", false, false, new List<GameAction>()
{ {
new GameAction("bop", "Bop") new GameAction("bop", "Bop")
@ -148,11 +174,6 @@ namespace HeavenStudio.Games.Loaders
new GameAction("face turn", "Direction to Turn (old)") new GameAction("face turn", "Direction to Turn (old)")
{ {
hidden = true, hidden = true,
function = delegate {
var e = eventCaller.currentEntity;
MarchingOrders.instance.FaceTurn(e.beat, e["type"], e["type2"], false);
},
defaultLength = 4f,
parameters = new List<Param>() parameters = new List<Param>()
{ {
new Param("type", MarchingOrders.Direction.Right, "Direction", "The direction the sergeant wants the cadets to face"), new Param("type", MarchingOrders.Direction.Right, "Direction", "The direction the sergeant wants the cadets to face"),

View file

@ -33,7 +33,7 @@ namespace HeavenStudio.Games.Loaders
}, },
new GameAction("jump (back to front)", "Back to Front Jumps") new GameAction("jump (back to front)", "Back to Front Jumps")
{ {
function =delegate { PajamaParty.instance.DoFiveJump(eventCaller.currentEntity.beat); }, function = delegate { PajamaParty.instance.DoFiveJump(eventCaller.currentEntity.beat); },
defaultLength = 4f, defaultLength = 4f,
inactiveFunction = delegate { PajamaParty.WarnFiveJump(eventCaller.currentEntity.beat); } inactiveFunction = delegate { PajamaParty.WarnFiveJump(eventCaller.currentEntity.beat); }
}, },