Lots of tweaks, fixes and small additions + bop fixes and bop parity across almost all games with bops. (#331)

* Rhythm rally and cheer readers improvements

* Autobop for fan club

* Implemented new bop parity for fan club, rhythm rally and ssds

* Air rally easing improvements

* Fixed drumming practice stuff

* Tap trial has been unjankified yet again

* Cheer readers and catchy tune bops

* More bop parity

* MORE!!!!

* That should be all of them except space dance and dj school

---------

Co-authored-by: minenice55 <star.elementa@gmail.com>
This commit is contained in:
Rapandrasmus
2023-03-07 18:22:32 +01:00
committed by GitHub
parent f590bd8ff9
commit 182d9fc88c
26 changed files with 814 additions and 250 deletions

View File

@ -19,7 +19,13 @@ namespace HeavenStudio.Games.Loaders
},
new GameAction("bop", "Bop")
{
function = delegate { ClappyTrio.instance.Bop(eventCaller.currentEntity.beat); }
function = delegate { var e = eventCaller.currentEntity; ClappyTrio.instance.BopToggle(e.beat, e.length, e["bop"], e["autoBop"]); },
resizable = true,
parameters = new List<Param>()
{
new Param("bop", true, "Bop", "Should the lions bop?"),
new Param("autoBop", false, "Bop (Auto)", "Should the lions auto bop?")
}
},
new GameAction("prepare", "Prepare Stance")
{
@ -69,6 +75,9 @@ namespace HeavenStudio.Games
private ClappyTrioPlayer ClappyTrioPlayer;
public bool playerHitLast = false;
bool shouldBop;
public GameEvent bop = new GameEvent();
public static ClappyTrio instance { get; set; }
@ -90,6 +99,15 @@ namespace HeavenStudio.Games
}
}
void Update()
{
var cond = Conductor.instance;
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1))
{
if (shouldBop) Bop(cond.songPositionInBeats);
}
}
private void InitLions()
{
float startPos = -3.066667f;
@ -119,11 +137,6 @@ namespace HeavenStudio.Games
clapAction.Delete();
}
private void Update()
{
}
public void Clap(float beat, float length)
{
ClappyTrioPlayer.clapStarted = true;
@ -158,6 +171,22 @@ namespace HeavenStudio.Games
Jukebox.PlayOneShotGame("clappyTrio/ready");
}
public void BopToggle(float beat, float length, bool startBop, bool autoBop)
{
shouldBop = autoBop;
if (startBop)
{
for (int i = 0; i < length; i++)
{
float spawnBeat = beat + i;
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(spawnBeat, delegate { Bop(spawnBeat); })
});
}
}
}
public void Bop(float beat)
{
if (playerHitLast)