From 07663c4919a38223436951839454b55305fe3998 Mon Sep 17 00:00:00 2001 From: minenice55 Date: Sat, 20 Aug 2022 23:13:52 -0400 Subject: [PATCH] finish conversions --- Assets/Scripts/Games/AirRally/AirRally.cs | 55 ++++++++----- Assets/Scripts/Games/BlueBear/BlueBear.cs | 12 ++- .../Games/BuiltToScaleDS/BuiltToScaleDS.cs | 16 +++- Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs | 38 ++++++--- Assets/Scripts/Games/CoinToss/CoinToss.cs | 77 ++++++++++++------- Assets/Scripts/Games/CropStomp/CropStomp.cs | 18 ++++- .../DrummingPractice/DrummingPractice.cs | 51 ++++++++---- .../Games/FirstContact/FirstContact.cs | 64 +++++++++++---- Assets/Scripts/Games/ForkLifter/ForkLifter.cs | 56 +++++++++++--- Assets/Scripts/Games/MrUpbeat/MrUpbeat.cs | 26 +++++-- .../Scripts/Games/RhythmRally/RhythmRally.cs | 77 ++++++++++++++----- .../Scripts/Games/RhythmSomen/RhythmSomen.cs | 23 +++++- Assets/Scripts/Games/SpaceDance/SpaceDance.cs | 23 +++++- .../Scripts/Games/SpaceSoccer/SpaceSoccer.cs | 27 +++++-- .../Games/Tram&Pauline/TramAndPauline.cs | 17 +++- .../Games/WizardsWaltz/WizardsWaltz.cs | 13 +++- Assets/Scripts/Minigames.cs | 14 ++-- 17 files changed, 451 insertions(+), 156 deletions(-) diff --git a/Assets/Scripts/Games/AirRally/AirRally.cs b/Assets/Scripts/Games/AirRally/AirRally.cs index 7b947d42..8103d93e 100644 --- a/Assets/Scripts/Games/AirRally/AirRally.cs +++ b/Assets/Scripts/Games/AirRally/AirRally.cs @@ -16,26 +16,45 @@ namespace HeavenStudio.Games.Loaders { return new Minigame("airRally", "Air Rally", "008c97", false, false, new List() { - new GameAction("set distance", delegate { AirRally.instance.SetDistance(e.currentEntity.type); }, .5f, false, new List() + new GameAction("set distance", "Set Distance") { - new Param("type", AirRally.DistanceSound.close, "Type", "How far is Forthington?") - }), + function = delegate { AirRally.instance.SetDistance(e.currentEntity.type); }, + defaultLength = .5f, + parameters = new List() + { + new Param("type", AirRally.DistanceSound.close, "Type", "How far is Forthington?") + } + }, //new GameAction("start rally", delegate { AirRally.instance.StartRally(true); }, .5f, false), - new GameAction("rally", delegate { AirRally.instance.Rally(e.currentEntity.beat, e.currentEntity.toggle, e.currentEntity.length); }, 2f, true, new List() - { - new Param("toggle", false, "Silent", "Make Forthington Silent"), - }), - new GameAction("ba bum bum bum", delegate { AirRally.instance.BaBumBumBum(e.currentEntity.beat, e.currentEntity.toggle, e.currentEntity.type); }, 7f, false, new List() - { - new Param("toggle", false, "Count", "Make Forthington Count"), - new Param("type", AirRally.DistanceSound.close, "Type", "How far is Forthington?") - }), - new GameAction("forthington voice lines", delegate { AirRally.instance.ForthVoice(e.currentEntity.type, e.currentEntity.type2); }, 1f, false, new List() - { - new Param("type", AirRally.CountSound.one, "Type", "The number Forthington will say"), - new Param("type", AirRally.DistanceSound.close, "Type", "How far is Forthington?") - }), - + new GameAction("rally", "Rally") + { + function = delegate { AirRally.instance.Rally(e.currentEntity.beat, e.currentEntity.toggle, e.currentEntity.length); }, + defaultLength = 2f, + resizable = true, + parameters = new List() + { + new Param("toggle", false, "Silent", "Make Forthington Silent"), + } + }, + new GameAction("ba bum bum bum", "Ba Bum Bum Bum") + { + function = delegate { AirRally.instance.BaBumBumBum(e.currentEntity.beat, e.currentEntity.toggle, e.currentEntity.type); }, + defaultLength = 7f, + parameters = new List() + { + new Param("toggle", false, "Count", "Make Forthington Count"), + new Param("type", AirRally.DistanceSound.close, "Type", "How far is Forthington?") + } + }, + new GameAction("forthington voice lines", "Forthington Voice Lines") + { + function = delegate { AirRally.instance.ForthVoice(e.currentEntity.type, e.currentEntity.type2); }, + parameters = new List() + { + new Param("type", AirRally.CountSound.one, "Type", "The number Forthington will say"), + new Param("type", AirRally.DistanceSound.close, "Type", "How far is Forthington?") + } + } }); } } diff --git a/Assets/Scripts/Games/BlueBear/BlueBear.cs b/Assets/Scripts/Games/BlueBear/BlueBear.cs index 1f5e0a69..6ffee5cd 100644 --- a/Assets/Scripts/Games/BlueBear/BlueBear.cs +++ b/Assets/Scripts/Games/BlueBear/BlueBear.cs @@ -13,8 +13,16 @@ namespace HeavenStudio.Games.Loaders public static Minigame AddGame(EventCaller eventCaller) { return new Minigame("blueBear", "Blue Bear", "B4E6F6", false, false, new List() { - new GameAction("donut", delegate { BlueBear.instance.SpawnTreat(eventCaller.currentEntity.beat, false); }, 3, false), - new GameAction("cake", delegate { BlueBear.instance.SpawnTreat(eventCaller.currentEntity.beat, true); }, 4, false), + new GameAction("donut", "Donut") + { + function = delegate { BlueBear.instance.SpawnTreat(eventCaller.currentEntity.beat, false); }, + defaultLength = 3, + }, + new GameAction("cake", "Cake") + { + function = delegate { BlueBear.instance.SpawnTreat(eventCaller.currentEntity.beat, true); }, + defaultLength = 4, + }, }); } } diff --git a/Assets/Scripts/Games/BuiltToScaleDS/BuiltToScaleDS.cs b/Assets/Scripts/Games/BuiltToScaleDS/BuiltToScaleDS.cs index a8130a54..20bbbaf4 100644 --- a/Assets/Scripts/Games/BuiltToScaleDS/BuiltToScaleDS.cs +++ b/Assets/Scripts/Games/BuiltToScaleDS/BuiltToScaleDS.cs @@ -15,11 +15,19 @@ namespace HeavenStudio.Games.Loaders public static Minigame AddGame(EventCaller eventCaller) { return new Minigame("builtToScaleDS", "Built To Scale (DS)", "00BB00", true, false, new List() { - new GameAction("spawn blocks", delegate { }, 1f, true), - new GameAction("play piano", delegate { BuiltToScaleDS.instance.PlayPiano(eventCaller.currentEntity.beat, eventCaller.currentEntity.length, eventCaller.currentEntity.type); }, 1f, true, new List() + new GameAction("spawn blocks", "Spawn Blocks") { - new Param("type", new EntityTypes.Integer(-24, 24, 0), "Semitones", "The number of semitones up or down this note should be pitched") - } ), + resizable = true + }, + new GameAction("play piano", "Play Note") + { + function = delegate { BuiltToScaleDS.instance.PlayPiano(eventCaller.currentEntity.beat, eventCaller.currentEntity.length, eventCaller.currentEntity.type); }, + resizable = true, + parameters = new List() + { + new Param("type", new EntityTypes.Integer(-24, 24, 0), "Semitones", "The number of semitones up or down this note should be pitched") + } + }, }); } } diff --git a/Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs b/Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs index 9555292f..ef5503a4 100644 --- a/Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs +++ b/Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs @@ -12,18 +12,38 @@ namespace HeavenStudio.Games.Loaders public static Minigame AddGame(EventCaller eventCaller) { return new Minigame("clappyTrio", "The Clappy Trio", "29E7FF", false, false, new List() { - new GameAction("clap", delegate { ClappyTrio.instance.Clap(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, 1, true), - new GameAction("bop", delegate { ClappyTrio.instance.Bop(eventCaller.currentEntity.beat); } ), - new GameAction("prepare", delegate { ClappyTrio.instance.Prepare(eventCaller.currentEntity.toggle ? 3 : 0); }, parameters: new List() + new GameAction("clap", "Clap") { - new Param("toggle", false, "Alt", "Whether or not the alternate version should be played") - }), - new GameAction("change lion count", delegate { ClappyTrio.instance.ChangeLionCount((int)eventCaller.currentEntity.valA); }, 0.5f, false, new List() + function = delegate { ClappyTrio.instance.Clap(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, + resizable = true + }, + new GameAction("bop", "Bop") { - new Param("valA", new EntityTypes.Integer(3, 8, 3), "Lion Count", "The amount of lions") - }), + function = delegate { ClappyTrio.instance.Bop(eventCaller.currentEntity.beat); } + }, + new GameAction("prepare", "Prepare Stance") + { + function = delegate { ClappyTrio.instance.Prepare(eventCaller.currentEntity.toggle ? 3 : 0); }, + parameters = new List() + { + new Param("toggle", false, "Alt", "Whether or not the alternate version should be played") + } + }, + new GameAction("change lion count", "Change Lion Count") + { + function = delegate { ClappyTrio.instance.ChangeLionCount((int)eventCaller.currentEntity.valA); }, + defaultLength = 0.5f, + parameters = new List() + { + new Param("valA", new EntityTypes.Integer(3, 8, 3), "Lion Count", "The amount of lions") + } + }, // This is still here for backwards-compatibility but is hidden in the editor - new GameAction("prepare_alt", delegate { ClappyTrio.instance.Prepare(3); }, hidden: true), + new GameAction("prepare_alt", "") + { + function = delegate { ClappyTrio.instance.Prepare(3); }, + hidden = true + }, }); } } diff --git a/Assets/Scripts/Games/CoinToss/CoinToss.cs b/Assets/Scripts/Games/CoinToss/CoinToss.cs index c1923e09..dd46aa4e 100644 --- a/Assets/Scripts/Games/CoinToss/CoinToss.cs +++ b/Assets/Scripts/Games/CoinToss/CoinToss.cs @@ -14,40 +14,63 @@ namespace HeavenStudio.Games.Loaders { return new Minigame("coinToss", "Coin Toss", "B4E6F6", false, false, new List() { - new GameAction("toss", delegate { CoinToss.instance.TossCoin(eventCaller.currentEntity.beat, eventCaller.currentEntity.toggle); }, 7, false, parameters: new List() + new GameAction("toss", "Toss Coin") { - new Param("toggle", false, "Audience Reaction", "Enable Audience Reaction"), - }), + function = delegate { CoinToss.instance.TossCoin(eventCaller.currentEntity.beat, eventCaller.currentEntity.toggle); }, + defaultLength = 7, + parameters = new List() + { + new Param("toggle", false, "Audience Reaction", "Enable Audience Reaction"), + } + }, + new GameAction("set background color", "Set Background Color") + { + function = delegate { var e = eventCaller.currentEntity; CoinToss.instance.ChangeBackgroundColor(e.colorA, 0f); CoinToss.instance.ChangeBackgroundColor(e.colorB, 0f, true); }, + defaultLength = 0.5f, + parameters = new List() + { + new Param("colorA", CoinToss.defaultBgColor, "Background Color", "The background color to change to"), + new Param("colorB", CoinToss.defaultFgColor, "Foreground Color", "The foreground color to change to") + } + }, + new GameAction("fade background color", "Fade Background Color") + { + function = delegate { var e = eventCaller.currentEntity; CoinToss.instance.FadeBackgroundColor(e.colorA, e.colorB, e.length); CoinToss.instance.FadeBackgroundColor(e.colorC, e.colorD, e.length, true); }, + resizable = true, + parameters = new List() + { + new Param("colorA", Color.white, "BG Start Color", "The starting color in the fade"), + new Param("colorB", CoinToss.defaultBgColor, "BG End Color", "The ending color in the fade"), + new Param("colorC", Color.white, "FG Start Color", "The starting color in the fade"), + new Param("colorD", CoinToss.defaultFgColor, "FG End Color", "The ending color in the fade") + } + }, - new GameAction("set background color", delegate { var e = eventCaller.currentEntity; CoinToss.instance.ChangeBackgroundColor(e.colorA, 0f); CoinToss.instance.ChangeBackgroundColor(e.colorB, 0f, true); }, 0.5f, false, new List() - { - new Param("colorA", CoinToss.defaultBgColor, "Background Color", "The background color to change to"), - new Param("colorB", CoinToss.defaultFgColor, "Foreground Color", "The foreground color to change to") - } ), - new GameAction("fade background color", delegate { var e = eventCaller.currentEntity; CoinToss.instance.FadeBackgroundColor(e.colorA, e.colorB, e.length); CoinToss.instance.FadeBackgroundColor(e.colorC, e.colorD, e.length, true); }, 1f, true, new List() - { - new Param("colorA", Color.white, "BG Start Color", "The starting color in the fade"), - new Param("colorB", CoinToss.defaultBgColor, "BG End Color", "The ending color in the fade"), - new Param("colorC", Color.white, "FG Start Color", "The starting color in the fade"), - new Param("colorD", CoinToss.defaultFgColor, "FG End Color", "The ending color in the fade") - } ), - - - //left in for backwards-compatibility, but cannot be placed - - new GameAction("set foreground color", delegate { var e = eventCaller.currentEntity; CoinToss.instance.ChangeBackgroundColor(e.colorA, 0f, true); }, 0.5f, false, new List - + new GameAction("set foreground color", "") { - new Param("colorA", CoinToss.defaultFgColor, "Foreground Color", "The foreground color to change to") + function = delegate { var e = eventCaller.currentEntity; CoinToss.instance.ChangeBackgroundColor(e.colorA, 0f, true); }, + defaultLength = 0.5f, + parameters = new List + + { + new Param("colorA", CoinToss.defaultFgColor, "Foreground Color", "The foreground color to change to") - }, hidden: true ), + }, + hidden = true + }, - new GameAction("fade foreground color", delegate { var e = eventCaller.currentEntity; CoinToss.instance.FadeBackgroundColor(e.colorA, e.colorB, e.length, true); }, 1f, true, new List() + new GameAction("fade foreground color", "") { - new Param("colorA", Color.white, "Start Color", "The starting color in the fade"), - new Param("colorB", CoinToss.defaultFgColor, "End Color", "The ending color in the fade") - }, hidden: true ), + function = delegate { var e = eventCaller.currentEntity; CoinToss.instance.FadeBackgroundColor(e.colorA, e.colorB, e.length, true); }, + resizable = true, + parameters = new List() + { + new Param("colorA", Color.white, "Start Color", "The starting color in the fade"), + new Param("colorB", CoinToss.defaultFgColor, "End Color", "The ending color in the fade") + }, + hidden = true + }, }, new List() {"ntr", "aim"}, "ntrcoin", "en", diff --git a/Assets/Scripts/Games/CropStomp/CropStomp.cs b/Assets/Scripts/Games/CropStomp/CropStomp.cs index 72926f72..2b71ac99 100644 --- a/Assets/Scripts/Games/CropStomp/CropStomp.cs +++ b/Assets/Scripts/Games/CropStomp/CropStomp.cs @@ -13,9 +13,21 @@ namespace HeavenStudio.Games.Loaders public static Minigame AddGame(EventCaller eventCaller) { return new Minigame("cropStomp", "Crop Stomp", "BFDEA6", false, false, new List() { - new GameAction("start marching", delegate { CropStomp.instance.StartMarching(eventCaller.currentEntity.beat); }, 2f, false, inactiveFunction: delegate { CropStomp.MarchInactive(eventCaller.currentEntity.beat); }), - new GameAction("veggies", delegate { }, 4f, true), - new GameAction("mole", delegate { }, 2f, false), + new GameAction("start marching", "Start Marching") + { + function = delegate { CropStomp.instance.StartMarching(eventCaller.currentEntity.beat); }, + defaultLength = 2f, + inactiveFunction = delegate { CropStomp.MarchInactive(eventCaller.currentEntity.beat); } + }, + new GameAction("veggies", "Veggies") + { + defaultLength = 4f, + resizable = true + }, + new GameAction("mole", "Mole") + { + defaultLength = 2f + }, }); } } diff --git a/Assets/Scripts/Games/DrummingPractice/DrummingPractice.cs b/Assets/Scripts/Games/DrummingPractice/DrummingPractice.cs index 6bf253de..c9669717 100644 --- a/Assets/Scripts/Games/DrummingPractice/DrummingPractice.cs +++ b/Assets/Scripts/Games/DrummingPractice/DrummingPractice.cs @@ -14,25 +14,44 @@ namespace HeavenStudio.Games.Loaders public static Minigame AddGame(EventCaller eventCaller) { return new Minigame("drummingPractice", "Drumming Practice", "2BCF33", false, false, new List() { - new GameAction("bop", delegate { var e = eventCaller.currentEntity; DrummingPractice.instance.SetBop(e.beat, e.length); }, 0.5f, true), - new GameAction("drum", delegate { var e = eventCaller.currentEntity; DrummingPractice.instance.Prepare(e.beat, e.toggle); }, 2f, parameters: new List() + new GameAction("bop", "Bop") { - new Param("toggle", true, "Applause", "Whether or not an applause should be played on a successful hit") - }), - new GameAction("set mii", delegate { var e = eventCaller.currentEntity; DrummingPractice.instance.SetMiis(e.type, e.type2, e.type3, e.toggle); }, 0.5f, parameters: new List() + function = delegate { var e = eventCaller.currentEntity; DrummingPractice.instance.SetBop(e.beat, e.length); }, + defaultLength = 0.5f, + resizable = true + }, + new GameAction("drum", "Hit Drum") { - new Param("type", DrummingPractice.MiiType.Random, "Player Mii", "The Mii that the player will control"), - new Param("type2", DrummingPractice.MiiType.Random, "Left Mii", "The Mii on the left"), - new Param("type3", DrummingPractice.MiiType.Random, "Right Mii", "The Mii on the right"), - new Param("toggle", false, "Set All to Player", "Sets all Miis to the Player's Mii") - }), - new GameAction("set background color", delegate {var e = eventCaller.currentEntity; DrummingPractice.instance.SetBackgroundColor(e.colorA, e.colorB, e.colorC); }, 0.5f, false, new List() + function = delegate { var e = eventCaller.currentEntity; DrummingPractice.instance.Prepare(e.beat, e.toggle); }, + defaultLength = 2f, + parameters = new List() + { + new Param("toggle", true, "Applause", "Whether or not an applause should be played on a successful hit") + } + }, + new GameAction("set mii", "Set Miis") { - new Param("colorA", new Color(43/255f, 207/255f, 51/255f), "Color A", "The top-most color of the background gradient"), - new Param("colorB", new Color(1, 1, 1), "Color B", "The bottom-most color of the background gradient"), - new Param("colorC", new Color(1, 247/255f, 0), "Streak Color", "The color of streaks that appear on a successful hit") - }) - + function = delegate { var e = eventCaller.currentEntity; DrummingPractice.instance.SetMiis(e.type, e.type2, e.type3, e.toggle); }, + defaultLength = 0.5f, + parameters = new List() + { + new Param("type", DrummingPractice.MiiType.Random, "Player Mii", "The Mii that the player will control"), + new Param("type2", DrummingPractice.MiiType.Random, "Left Mii", "The Mii on the left"), + new Param("type3", DrummingPractice.MiiType.Random, "Right Mii", "The Mii on the right"), + new Param("toggle", false, "Set All to Player", "Sets all Miis to the Player's Mii") + } + }, + new GameAction("set background color", "Set Background Color") + { + function = delegate {var e = eventCaller.currentEntity; DrummingPractice.instance.SetBackgroundColor(e.colorA, e.colorB, e.colorC); }, + defaultLength = 0.5f, + parameters = new List() + { + new Param("colorA", new Color(43/255f, 207/255f, 51/255f), "Color A", "The top-most color of the background gradient"), + new Param("colorB", new Color(1, 1, 1), "Color B", "The bottom-most color of the background gradient"), + new Param("colorC", new Color(1, 247/255f, 0), "Streak Color", "The color of streaks that appear on a successful hit") + } + } }); } } diff --git a/Assets/Scripts/Games/FirstContact/FirstContact.cs b/Assets/Scripts/Games/FirstContact/FirstContact.cs index 80384be0..f0b4e4da 100644 --- a/Assets/Scripts/Games/FirstContact/FirstContact.cs +++ b/Assets/Scripts/Games/FirstContact/FirstContact.cs @@ -11,26 +11,58 @@ namespace HeavenStudio.Games.Loaders { return new Minigame("firstContact", "First Contact", "008c97", false, false, new List() { - new GameAction("beat intervals", delegate { FirstContact.instance.SetIntervalStart(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, 4f, true), - new GameAction("alien speak", delegate { FirstContact.instance.alienSpeak(eventCaller.currentEntity.beat, eventCaller.currentEntity.valA); }, 0.5f, false, new List() + new GameAction("beat intervals", "Start Interval") { - new Param("valA", new EntityTypes.Float(.8f, 1.5f, 1f), "Pitch") - }), - new GameAction("alien turnover", delegate { FirstContact.instance.alienTurnOver(eventCaller.currentEntity.beat); }, 0.5f, false), - new GameAction("alien success", delegate { FirstContact.instance.alienSuccess(eventCaller.currentEntity.beat); }, 1f, false), - new GameAction("mission control", delegate { FirstContact.instance.missionControlDisplay(eventCaller.currentEntity.beat, eventCaller.currentEntity.toggle, eventCaller.currentEntity.length); }, 1f, true, new List + function = delegate { FirstContact.instance.SetIntervalStart(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, + defaultLength = 4f, + resizable = true + }, + new GameAction("alien speak", "Alien Speak") { - new Param("toggle", false, "Stay", "If it's the end of the remix/song") - }), - new GameAction("look at", delegate { FirstContact.instance.lookAtDirection(eventCaller.currentEntity.type, eventCaller.currentEntity.type); }, .5f, false, new List() + function = delegate { FirstContact.instance.alienSpeak(eventCaller.currentEntity.beat, eventCaller.currentEntity.valA); }, + defaultLength = 0.5f, + parameters = new List() + { + new Param("valA", new EntityTypes.Float(.8f, 1.5f, 1f), "Pitch") + } + }, + new GameAction("alien turnover", "Alien Turnover") { - new Param("type", FirstContact.alienLookAt.lookAtTranslator, "alien look at what", "[Alien] will look at what"), - new Param("type", FirstContact.translatorLookAt.lookAtAlien, "translator look at what", "[Translator] will look at what"), - }), - new GameAction("live bar beat", delegate { FirstContact.instance.liveBarBeat(eventCaller.currentEntity.toggle); }, .5f, false, new List() + function = delegate { FirstContact.instance.alienTurnOver(eventCaller.currentEntity.beat); }, + defaultLength = 0.5f, + }, + new GameAction("alien success", "Confirm Response") { - new Param("toggle", true, "On Beat", "If the live bar animation will be on beat or not") - }), + function = delegate { FirstContact.instance.alienSuccess(eventCaller.currentEntity.beat); }, + }, + new GameAction("mission control", "Show Mission Control") + { + function = delegate { var e = eventCaller.currentEntity; FirstContact.instance.missionControlDisplay(e.beat, e.toggle, e.length); }, + resizable = true, + parameters = new List + { + new Param("toggle", false, "Stay", "If it's the end of the remix/song") + } + }, + new GameAction("look at", "Look At") + { + function = delegate { FirstContact.instance.lookAtDirection(eventCaller.currentEntity.type, eventCaller.currentEntity.type); }, + defaultLength = .5f, + parameters = new List() + { + new Param("type", FirstContact.alienLookAt.lookAtTranslator, "alien look at what", "[Alien] will look at what"), + new Param("type", FirstContact.translatorLookAt.lookAtAlien, "translator look at what", "[Translator] will look at what"), + } + }, + new GameAction("live bar beat", "Live Bar Beat") + { + function = delegate { FirstContact.instance.liveBarBeat(eventCaller.currentEntity.toggle); }, + defaultLength = .5f, + parameters = new List() + { + new Param("toggle", true, "On Beat", "If the live bar animation will be on beat or not") + } + }, //new GameAction("Version of First Contact", delegate { FirstContact.instance.versionOfFirstContact(eventCaller.currentEntity.type); }, .5f, false, new List //{ diff --git a/Assets/Scripts/Games/ForkLifter/ForkLifter.cs b/Assets/Scripts/Games/ForkLifter/ForkLifter.cs index 30ddc798..9ba65292 100644 --- a/Assets/Scripts/Games/ForkLifter/ForkLifter.cs +++ b/Assets/Scripts/Games/ForkLifter/ForkLifter.cs @@ -14,18 +14,54 @@ namespace HeavenStudio.Games.Loaders public static Minigame AddGame(EventCaller eventCaller) { return new Minigame("forkLifter", "Fork Lifter", "FFFFFF", false, false, new List() { - new GameAction("flick", delegate { var e = eventCaller.currentEntity; ForkLifter.instance.Flick(e.beat, e.type); }, 3, false, new List() + new GameAction("flick", "Flick Food") { - new Param("type", ForkLifter.FlickType.Pea, "Object", "The object to be flicked") - }), - new GameAction("prepare", delegate { ForkLifter.instance.ForkLifterHand.Prepare(); }, 0.5f), - new GameAction("gulp", delegate { ForkLifter.playerInstance.Eat(); }), - new GameAction("sigh", delegate { Jukebox.PlayOneShot("games/forkLifter/sigh"); }), + function = delegate { var e = eventCaller.currentEntity; ForkLifter.instance.Flick(e.beat, e.type); }, + defaultLength = 3, + parameters = new List() + { + new Param("type", ForkLifter.FlickType.Pea, "Object", "The object to be flicked") + } + }, + new GameAction("prepare", "Prepare Hand") + { + function = delegate { ForkLifter.instance.ForkLifterHand.Prepare(); }, + defaultLength = 0.5f + }, + new GameAction("gulp", "Swallow") + { + function = delegate { ForkLifter.playerInstance.Eat(); } + }, + new GameAction("sigh", "Sigh") + { + + function = delegate { Jukebox.PlayOneShot("games/forkLifter/sigh"); } + }, // These are still here for backwards-compatibility but are hidden in the editor - new GameAction("pea", delegate { ForkLifter.instance.Flick(eventCaller.currentEntity.beat, 0); }, 3, hidden: true), - new GameAction("topbun", delegate { ForkLifter.instance.Flick(eventCaller.currentEntity.beat, 1); }, 3, hidden: true), - new GameAction("burger", delegate { ForkLifter.instance.Flick(eventCaller.currentEntity.beat, 2); }, 3, hidden: true), - new GameAction("bottombun", delegate { ForkLifter.instance.Flick(eventCaller.currentEntity.beat, 3); }, 3, hidden: true), + new GameAction("pea", "") + { + function = delegate { ForkLifter.instance.Flick(eventCaller.currentEntity.beat, 0); }, + defaultLength = 3, + hidden = true + }, + new GameAction("topbun", "") + { + function = delegate { ForkLifter.instance.Flick(eventCaller.currentEntity.beat, 1); }, + defaultLength = 3, + hidden = true + }, + new GameAction("burger", "") + { + function = delegate { ForkLifter.instance.Flick(eventCaller.currentEntity.beat, 2); }, + defaultLength = 3, + hidden = true + }, + new GameAction("bottombun", "") + { + function = delegate { ForkLifter.instance.Flick(eventCaller.currentEntity.beat, 3); }, + defaultLength = 3, + hidden = true + }, }); } } diff --git a/Assets/Scripts/Games/MrUpbeat/MrUpbeat.cs b/Assets/Scripts/Games/MrUpbeat/MrUpbeat.cs index f497af3d..7da7b4ac 100644 --- a/Assets/Scripts/Games/MrUpbeat/MrUpbeat.cs +++ b/Assets/Scripts/Games/MrUpbeat/MrUpbeat.cs @@ -15,12 +15,28 @@ namespace HeavenStudio.Games.Loaders public static Minigame AddGame(EventCaller eventCaller) { return new Minigame("mrUpbeat", "Mr. Upbeat", "FFFFFF", false, false, new List() { - new GameAction("prepare", delegate { MrUpbeat.instance.SetInterval(eventCaller.currentEntity.beat); }, 0.5f, true, inactiveFunction: delegate { MrUpbeat.Beep(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }), - new GameAction("go", delegate { MrUpbeat.instance.Go(eventCaller.currentEntity.beat); }, 4f, true), - new GameAction("ding!", delegate { MrUpbeat.instance.Ding(eventCaller.currentEntity.toggle); }, 0.5f, parameters: new List() + new GameAction("prepare", "Prepare") { - new Param("toggle", false, "Applause") - }), + function = delegate { MrUpbeat.instance.SetInterval(eventCaller.currentEntity.beat); }, + defaultLength = 0.5f, + resizable = true, + inactiveFunction = delegate { MrUpbeat.Beep(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); } + }, + new GameAction("go", "Start Stepping") + { + function = delegate { MrUpbeat.instance.Go(eventCaller.currentEntity.beat); }, + defaultLength = 4f, + resizable = true + }, + new GameAction("ding!", "Finish Stepping") + { + function = delegate { MrUpbeat.instance.Ding(eventCaller.currentEntity.toggle); }, + defaultLength = 0.5f, + parameters = new List() + { + new Param("toggle", false, "Applause") + } + }, }); } } diff --git a/Assets/Scripts/Games/RhythmRally/RhythmRally.cs b/Assets/Scripts/Games/RhythmRally/RhythmRally.cs index c4dfbcb7..ea51dd14 100644 --- a/Assets/Scripts/Games/RhythmRally/RhythmRally.cs +++ b/Assets/Scripts/Games/RhythmRally/RhythmRally.cs @@ -14,24 +14,65 @@ namespace HeavenStudio.Games.Loaders public static Minigame AddGame(EventCaller eventCaller) { return new Minigame("rhythmRally", "Rhythm Rally", "FFFFFF", true, false, new List() { - new GameAction("bop", delegate { RhythmRally.instance.Bop(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, 0.5f, true), - new GameAction("whistle", delegate { RhythmRally.instance.PlayWhistle(); }, 0.5f), - new GameAction("toss ball", delegate { RhythmRally.instance.Toss(eventCaller.currentEntity.beat, eventCaller.currentEntity.length, 6f, true); }, 2f), - new GameAction("rally", delegate { RhythmRally.instance.Serve(eventCaller.currentEntity.beat, RhythmRally.RallySpeed.Normal); }, 4f, true), - new GameAction("slow rally", delegate { RhythmRally.instance.Serve(eventCaller.currentEntity.beat, RhythmRally.RallySpeed.Slow); }, 8f, true), - new GameAction("fast rally", delegate { RhythmRally.instance.PrepareFastRally(eventCaller.currentEntity.beat, RhythmRally.RallySpeed.Fast); }, 6f), - new GameAction("superfast rally", delegate { RhythmRally.instance.PrepareFastRally(eventCaller.currentEntity.beat, RhythmRally.RallySpeed.SuperFast); }, 12f), - new GameAction("pose", delegate { RhythmRally.instance.Pose(); }, 0.5f), - new GameAction("camera", delegate { - var e = eventCaller.currentEntity; - var rotation = new Vector3(0, e.valA, 0); - RhythmRally.instance.ChangeCameraAngle(rotation, e.valB, e.length, (Ease)e.type, (RotateMode)e.type2); - }, 4, true, new List() { - new Param("valA", new EntityTypes.Integer(-360, 360, 0), "Angle", "The rotation of the camera around the center of the table"), - new Param("valB", new EntityTypes.Float(0.5f, 4f, 1), "Zoom", "The camera's level of zoom (Lower value = Zoomed in)"), - new Param("type", Ease.Linear, "Ease", "The easing function to use"), - new Param("type2", RotateMode.Fast, "Rotation Mode", "The rotation mode to use") - } ), + new GameAction("bop", "Bop") + { + function = delegate { RhythmRally.instance.Bop(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, + defaultLength = 0.5f, + resizable = true + }, + new GameAction("whistle", "Whisle") + { + function = delegate { RhythmRally.instance.PlayWhistle(); }, + defaultLength = 0.5f + }, + new GameAction("toss ball", "Toss Ball") + { + function = delegate { RhythmRally.instance.Toss(eventCaller.currentEntity.beat, eventCaller.currentEntity.length, 6f, true); }, + defaultLength = 2f + }, + new GameAction("rally", "Rally") + { + function = delegate { RhythmRally.instance.Serve(eventCaller.currentEntity.beat, RhythmRally.RallySpeed.Normal); }, + defaultLength = 4f, + resizable = true + }, + new GameAction("slow rally", "Slow Rally") + { + function = delegate { RhythmRally.instance.Serve(eventCaller.currentEntity.beat, RhythmRally.RallySpeed.Slow); }, + defaultLength = 8f, + resizable = true + }, + new GameAction("fast rally", "Fast Rally") + { + function = delegate { RhythmRally.instance.PrepareFastRally(eventCaller.currentEntity.beat, RhythmRally.RallySpeed.Fast); }, + defaultLength = 6f + }, + new GameAction("superfast rally", "Superfast Rally") + { + function = delegate { RhythmRally.instance.PrepareFastRally(eventCaller.currentEntity.beat, RhythmRally.RallySpeed.SuperFast); }, + defaultLength = 12f + }, + new GameAction("pose", "End Pose") + { + function = delegate { RhythmRally.instance.Pose(); }, + defaultLength = 0.5f + }, + new GameAction("camera", "Camera Controls") + { + function = delegate { + var e = eventCaller.currentEntity; + var rotation = new Vector3(0, e.valA, 0); + RhythmRally.instance.ChangeCameraAngle(rotation, e.valB, e.length, (Ease)e.type, (RotateMode)e.type2); + }, + defaultLength = 4, + resizable = true, + parameters = new List() { + new Param("valA", new EntityTypes.Integer(-360, 360, 0), "Angle", "The rotation of the camera around the center of the table"), + new Param("valB", new EntityTypes.Float(0.5f, 4f, 1), "Zoom", "The camera's level of zoom (Lower value = Zoomed in)"), + new Param("type", Ease.Linear, "Ease", "The easing function to use"), + new Param("type2", RotateMode.Fast, "Rotation Mode", "The rotation mode to use") + } + }, }); } } diff --git a/Assets/Scripts/Games/RhythmSomen/RhythmSomen.cs b/Assets/Scripts/Games/RhythmSomen/RhythmSomen.cs index 25b567e0..8931558e 100644 --- a/Assets/Scripts/Games/RhythmSomen/RhythmSomen.cs +++ b/Assets/Scripts/Games/RhythmSomen/RhythmSomen.cs @@ -11,10 +11,25 @@ namespace HeavenStudio.Games.Loaders public static Minigame AddGame(EventCaller eventCaller) { return new Minigame("rhythmSomen", "Rhythm Sōmen", "000000", false, false, new List() { - new GameAction("crane (far)", delegate { RhythmSomen.instance.DoFarCrane(eventCaller.currentEntity.beat); }, 4.0f, false), - new GameAction("crane (close)", delegate { RhythmSomen.instance.DoCloseCrane(eventCaller.currentEntity.beat); }, 3.0f, false), - new GameAction("crane (both)", delegate { RhythmSomen.instance.DoBothCrane(eventCaller.currentEntity.beat); }, 4.0f, false), - new GameAction("offbeat bell", delegate { RhythmSomen.instance.DoBell(eventCaller.currentEntity.beat); }, 1.0f, false), + new GameAction("crane (far)", "Far Crane") + { + function = delegate { RhythmSomen.instance.DoFarCrane(eventCaller.currentEntity.beat); }, + defaultLength = 4.0f, + }, + new GameAction("crane (close)", "Close Crane") + { + function = delegate { RhythmSomen.instance.DoCloseCrane(eventCaller.currentEntity.beat); }, + defaultLength = 3.0f, + }, + new GameAction("crane (both)", "Both Cranes") + { + function = delegate { RhythmSomen.instance.DoBothCrane(eventCaller.currentEntity.beat); }, + defaultLength = 4.0f, + }, + new GameAction("offbeat bell", "Offbeat Warning") + { + function = delegate { RhythmSomen.instance.DoBell(eventCaller.currentEntity.beat); }, + }, }); } } diff --git a/Assets/Scripts/Games/SpaceDance/SpaceDance.cs b/Assets/Scripts/Games/SpaceDance/SpaceDance.cs index 6f1c647c..73079024 100644 --- a/Assets/Scripts/Games/SpaceDance/SpaceDance.cs +++ b/Assets/Scripts/Games/SpaceDance/SpaceDance.cs @@ -11,10 +11,25 @@ namespace HeavenStudio.Games.Loaders public static Minigame AddGame(EventCaller eventCaller) { return new Minigame("spaceDance", "Space Dance \n[WIP don't use]", "000000", false, false, new List() { - new GameAction("turn right", delegate { SpaceDance.instance.DoTurnRight(eventCaller.currentEntity.beat); }, 2.0f, false), - new GameAction("sit down", delegate { SpaceDance.instance.DoSitDown(eventCaller.currentEntity.beat); }, 2.0f, false), - new GameAction("punch", delegate { SpaceDance.instance.DoPunch(eventCaller.currentEntity.beat); }, 2.0f, false), - new GameAction("bop", delegate { SpaceDance.instance.Bop(eventCaller.currentEntity.beat); }, 1.0f, false), + new GameAction("turn right", "Turn Right") + { + function = delegate { SpaceDance.instance.DoTurnRight(eventCaller.currentEntity.beat); }, + defaultLength = 2.0f, + }, + new GameAction("sit down", "Sit Down") + { + function = delegate { SpaceDance.instance.DoSitDown(eventCaller.currentEntity.beat); }, + defaultLength = 2.0f, + }, + new GameAction("punch", "Punch") + { + function = delegate { SpaceDance.instance.DoPunch(eventCaller.currentEntity.beat); }, + defaultLength = 2.0f, + }, + new GameAction("bop", "Bop") + { + function = delegate { SpaceDance.instance.Bop(eventCaller.currentEntity.beat); }, + }, }); } } diff --git a/Assets/Scripts/Games/SpaceSoccer/SpaceSoccer.cs b/Assets/Scripts/Games/SpaceSoccer/SpaceSoccer.cs index 59c3e546..a0a7293d 100644 --- a/Assets/Scripts/Games/SpaceSoccer/SpaceSoccer.cs +++ b/Assets/Scripts/Games/SpaceSoccer/SpaceSoccer.cs @@ -12,17 +12,30 @@ namespace HeavenStudio.Games.Loaders public static Minigame AddGame(EventCaller eventCaller) { return new Minigame("spaceSoccer", "Space Soccer", "B888F8", false, false, new List() { - new GameAction("ball dispense", delegate { SpaceSoccer.instance.Dispense(eventCaller.currentEntity.beat, !eventCaller.currentEntity.toggle); }, 2f, - parameters: new List() + new GameAction("ball dispense", "Ball Dispense") + { + function = delegate { SpaceSoccer.instance.Dispense(eventCaller.currentEntity.beat, !eventCaller.currentEntity.toggle); }, + defaultLength = 2f, + parameters = new List() { new Param("toggle", false, "Disable Sound", "Disables the dispense sound") }, - inactiveFunction: delegate { if (!eventCaller.currentEntity.toggle) { SpaceSoccer.DispenseSound(eventCaller.currentEntity.beat); } }), - new GameAction("high kick-toe!", delegate { }, 3f, false, new List() + inactiveFunction = delegate { if (!eventCaller.currentEntity.toggle) { SpaceSoccer.DispenseSound(eventCaller.currentEntity.beat); } } + }, + new GameAction("high kick-toe!", "High Kick-Toe!") { - new Param("swing", new EntityTypes.Float(0, 1, 0.5f), "Swing", "The amount of swing") - }), - new GameAction("keep-up", delegate { }, 4f, true, hidden: true), + defaultLength = 3f, + parameters = new List() + { + new Param("swing", new EntityTypes.Float(0, 1, 0.5f), "Swing", "The amount of swing") + } + }, + // This is still here for "backwards-compatibility" but is hidden in the editor (it does absolutely nothing however) + new GameAction("keep-up", "") + { + defaultLength = 4f, + resizable = true + }, }); } } diff --git a/Assets/Scripts/Games/Tram&Pauline/TramAndPauline.cs b/Assets/Scripts/Games/Tram&Pauline/TramAndPauline.cs index abc5b749..43c8ea39 100644 --- a/Assets/Scripts/Games/Tram&Pauline/TramAndPauline.cs +++ b/Assets/Scripts/Games/Tram&Pauline/TramAndPauline.cs @@ -12,11 +12,20 @@ namespace HeavenStudio.Games.Loaders { return new Minigame("tram&Pauline", "Tram & Pauline \n[WIP]", "000000", false, false, new List() { - new GameAction("curtains", delegate { TramAndPauline.instance.Curtains(eventCaller.currentEntity.beat); }, 0.5f), - new GameAction("SFX", delegate { var e = eventCaller.currentEntity; TramAndPauline.instance.SFX(e.beat, e.toggle); }, 2.5f, false, new List() + new GameAction("curtains", "Curtains") { - new Param("type", TramAndPauline.SoundEffects.Henge, "calls", "the sound effects to choose from"), - }), + function = delegate { TramAndPauline.instance.Curtains(eventCaller.currentEntity.beat); }, + defaultLength = 0.5f + }, + new GameAction("SFX", "SFX") + { + function = delegate { var e = eventCaller.currentEntity; TramAndPauline.instance.SFX(e.beat, e.toggle); }, + defaultLength = 2.5f, + parameters = new List() + { + new Param("type", TramAndPauline.SoundEffects.Henge, "calls", "the sound effects to choose from"), + } + }, }); } diff --git a/Assets/Scripts/Games/WizardsWaltz/WizardsWaltz.cs b/Assets/Scripts/Games/WizardsWaltz/WizardsWaltz.cs index 16315f38..d41d4887 100644 --- a/Assets/Scripts/Games/WizardsWaltz/WizardsWaltz.cs +++ b/Assets/Scripts/Games/WizardsWaltz/WizardsWaltz.cs @@ -15,8 +15,17 @@ namespace HeavenStudio.Games.Loaders public static Minigame AddGame(EventCaller eventCaller) { return new Minigame("wizardsWaltz", "Wizard's Waltz \n(Mahou Tsukai)", "FFEF9C", false, false, new List() { - new GameAction("start interval", delegate { WizardsWaltz.instance.SetIntervalStart(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, 4f, true), - new GameAction("plant", delegate { WizardsWaltz.instance.SpawnFlower(eventCaller.currentEntity.beat); }, 0.5f, false), + new GameAction("start interval", "Start Interval") + { + function = delegate { WizardsWaltz.instance.SetIntervalStart(eventCaller.currentEntity.beat, eventCaller.currentEntity.length); }, + defaultLength = 4f, + resizable = true + }, + new GameAction("plant", "Plant") + { + function = delegate { WizardsWaltz.instance.SpawnFlower(eventCaller.currentEntity.beat); }, + defaultLength = 0.5f, + }, }); } } diff --git a/Assets/Scripts/Minigames.cs b/Assets/Scripts/Minigames.cs index 193a028f..e2ab698b 100644 --- a/Assets/Scripts/Minigames.cs +++ b/Assets/Scripts/Minigames.cs @@ -137,13 +137,13 @@ namespace HeavenStudio { public string actionName; public string displayName; - public EventCallback function; - public float defaultLength; - public bool resizable; - public List parameters; - public bool hidden; - public EventCallback inactiveFunction; - public EventCallback preFunction; + public EventCallback function = delegate { }; + public float defaultLength = 1; + public bool resizable = false; + public List parameters = null; + public bool hidden = false; + public EventCallback inactiveFunction = delegate { }; + public EventCallback preFunction = delegate { }; /// /// Creates a block that can be used in the editor. The block's function and attributes are defined in the parentheses.