Space Soccer Improvements (#382)

* SupahScrollSetUp

* Scrolls now, with issues, also added a flames animation

* Started implementing new multiple space kickers

* bg recolor space soccer

* Recolorable dots!

* we circular motitating n shit

* ReAdded Enter and exit stuff

* I despise unexplainable bugs

* The balls are so buggy 😱

* Trying to fix someting

* Fixed Scroll Stutter

* Fixed a whiff bug

* Updated sounds and added ease event for space kickers

* Fixed some bugs

* Changed some names

* new option for quiz show random presses

* Board meeting bug fixes

* Testing Curve stuff

* Converted all code to use new curves, need to fix all issues

* Playing around with keypoint values, will probably expose them so someone else can mess with them

* curves be like

* Fixed stuff

* BALLS FIXED

* Fixed clappy trio stuff

* Added player move event

* Almost fixed, just need to fix wonkiness with high kick toe

* Fixed da bug

* Board meeting and quiz show tweaks

* Fix for board meeting and enter/exit presets for space soccer

* Stop ball added

* Updated how scroll works
This commit is contained in:
Rapandrasmus
2023-04-26 14:43:35 +02:00
committed by GitHub
parent 7858bdba3d
commit ac1804a901
63 changed files with 2930 additions and 6163 deletions

View File

@ -35,12 +35,13 @@ namespace HeavenStudio.Games.Loaders
},
new GameAction("randomPresses", "Random Presses")
{
function = delegate { var e = eventCaller.currentEntity; QuizShow.instance.RandomPress(e.beat, e.length, e["min"], e["max"], e["random"]); },
function = delegate { var e = eventCaller.currentEntity; QuizShow.instance.RandomPress(e.beat, e.length, e["min"], e["max"], e["random"], e["con"]); },
parameters = new List<Param>()
{
new Param("min", new EntityTypes.Integer(0, 666, 0), "Minimum", "The minimum number of presses this block will do."),
new Param("max", new EntityTypes.Integer(0, 666, 1), "Maximum", "The maximum number of presses this block will do."),
new Param("random", QuizShow.WhichButtonRandom.Random, "Which Buttons", "Which buttons will be pressed randomly?")
new Param("random", QuizShow.WhichButtonRandom.Random, "Which Buttons", "Which buttons will be pressed randomly?"),
new Param("con", true, "Consecutive Presses", "Will the presses be consecutive? As in if the first press doesn't trigger, the ones proceeding will not either.")
},
resizable = true
},
@ -54,7 +55,7 @@ namespace HeavenStudio.Games.Loaders
new Param("sound", true, "Play Time-Up Sound?", "Should the Time-Up sound play at the end of the interval?"),
new Param("con", false, "Consecutive", "Disables everything that happens at the end of the interval if ticked on."),
new Param("visual", true, "Stopwatch (Visual)", "Should the stopwatch visually appear?"),
new Param("audio", true, "Stopwatch (Audio)", "Should the sounds of the stopwatch play?")
new Param("audio", QuizShow.ClockAudio.Both, "Stopwatch (Audio)", "Should the sounds of the stopwatch play?")
}
},
new GameAction("revealAnswer", "Reveal Answer")
@ -109,6 +110,13 @@ namespace HeavenStudio.Games
{
public class QuizShow : Minigame
{
public enum ClockAudio
{
Both,
Start,
End,
Neither
}
public enum HeadStage
{
Stage0 = 0,
@ -221,35 +229,68 @@ namespace HeavenStudio.Games
currentStage = stage;
}
public void RandomPress(float beat, float length, int min, int max, int whichButtons)
public void RandomPress(float beat, float length, int min, int max, int whichButtons, bool consecutive)
{
if (min > max) return;
int pressAmount = UnityEngine.Random.Range(min, max + 1);
if (pressAmount < 1) return;
List<BeatAction.Action> buttonEvents = new List<BeatAction.Action>();
for (int i = 0; i < pressAmount; i++)
if (consecutive)
{
bool dpad = UnityEngine.Random.Range(0, 2) == 1;
switch (whichButtons)
for (int i = 0; i < pressAmount; i++)
{
case (int)WhichButtonRandom.Random:
break;
case (int)WhichButtonRandom.DpadOnly:
dpad = true;
break;
case (int)WhichButtonRandom.AOnly:
dpad = false;
break;
case (int)WhichButtonRandom.AlternatingDpad:
dpad = i % 2 == 0;
break;
case (int)WhichButtonRandom.AlternatingA:
dpad = i % 2 != 0;
break;
bool dpad = UnityEngine.Random.Range(0, 2) == 1;
switch (whichButtons)
{
case (int)WhichButtonRandom.Random:
break;
case (int)WhichButtonRandom.DpadOnly:
dpad = true;
break;
case (int)WhichButtonRandom.AOnly:
dpad = false;
break;
case (int)WhichButtonRandom.AlternatingDpad:
dpad = i % 2 == 0;
break;
case (int)WhichButtonRandom.AlternatingA:
dpad = i % 2 != 0;
break;
}
float spawnBeat = beat + i * length;
buttonEvents.Add(new BeatAction.Action(spawnBeat, delegate { HostPressButton(spawnBeat, dpad); }));
}
float spawnBeat = beat + i * length;
buttonEvents.Add(new BeatAction.Action(spawnBeat, delegate { HostPressButton(spawnBeat, dpad); }));
}
else
{
for (int i = 0; i < max; i++)
{
if (pressAmount == 0) break;
if (UnityEngine.Random.Range(0, 2) == 1 && Mathf.Abs(i - max) != pressAmount) continue;
bool dpad = UnityEngine.Random.Range(0, 2) == 1;
switch (whichButtons)
{
case (int)WhichButtonRandom.Random:
break;
case (int)WhichButtonRandom.DpadOnly:
dpad = true;
break;
case (int)WhichButtonRandom.AOnly:
dpad = false;
break;
case (int)WhichButtonRandom.AlternatingDpad:
dpad = i % 2 == 0;
break;
case (int)WhichButtonRandom.AlternatingA:
dpad = i % 2 != 0;
break;
}
float spawnBeat = beat + i * length;
buttonEvents.Add(new BeatAction.Action(spawnBeat, delegate { HostPressButton(spawnBeat, dpad); }));
pressAmount--;
}
}
BeatAction.New(instance.gameObject, buttonEvents);
}
@ -311,7 +352,7 @@ namespace HeavenStudio.Games
intervalStarted = true;
}
public void PassTurn(float beat, float length, bool timeUpSound, bool consecutive, bool visualClock, bool audioClock)
public void PassTurn(float beat, float length, bool timeUpSound, bool consecutive, bool visualClock, int audioClock)
{
if (queuedInputs.Count == 0) return;
if (shouldPrepareArms)
@ -341,11 +382,12 @@ namespace HeavenStudio.Games
playerBeatInterval = beatInterval;
playerIntervalStartBeat = beat + length;
float timeUpBeat = 0f;
if (audioClock)
if (audioClock == (int)ClockAudio.Both || audioClock == (int)ClockAudio.Start)
{
Jukebox.PlayOneShotGame("quizShow/timerStart");
timeUpBeat = 0.5f;
}
}
if (audioClock == (int)ClockAudio.End) timeUpBeat = 0.5f;
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
{
@ -353,7 +395,7 @@ namespace HeavenStudio.Games
{
if (!consecutive)
{
if (audioClock) Jukebox.PlayOneShotGame("quizShow/timerStop");
if (audioClock == (int)ClockAudio.Both || audioClock == (int)ClockAudio.End) Jukebox.PlayOneShotGame("quizShow/timerStop");
contesteeLeftArmAnim.DoScaledAnimationAsync("LeftRest", 0.5f);
contesteeRightArmAnim.DoScaledAnimationAsync("RightRest", 0.5f);
shouldPrepareArms = true;