mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 15:17:36 +02:00
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:
@ -15,11 +15,12 @@ namespace HeavenStudio.Games.Loaders
|
||||
{
|
||||
new GameAction("bop", "Bop")
|
||||
{
|
||||
function = delegate { KarateMan.instance.ToggleBop(eventCaller.currentEntity["toggle"]); },
|
||||
defaultLength = 0.5f,
|
||||
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.ToggleBop(e.beat, e.length, e["toggle2"], e["toggle"]); },
|
||||
resizable = true,
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("toggle", true, "Bop", "Whether to bop to the beat or not")
|
||||
new Param("toggle2", true, "Bop", "Whether to bop to the beat or not"),
|
||||
new Param("toggle", false, "Bop (Auto)", "Whether to auto bop to the beat or not")
|
||||
},
|
||||
inactiveFunction = delegate { KarateMan.ToggleBopUnloaded(eventCaller.currentEntity["toggle"]); }
|
||||
},
|
||||
@ -476,7 +477,7 @@ namespace HeavenStudio.Games
|
||||
SetBgAndShadowCol(WantBgChangeStart, WantBgChangeLength, bgType, (int) currentShadowType, bgColour, customShadowColour, (int)currentBgEffect);
|
||||
SetBgTexture(textureType, textureFilterType, filterColour, filterColour);
|
||||
UpdateMaterialColour(BodyColor, HighlightColor, ItemColor);
|
||||
ToggleBop(WantBop);
|
||||
ToggleBop(0, 0, false, WantBop);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
@ -1033,12 +1034,22 @@ namespace HeavenStudio.Games
|
||||
Wind.windMain = windStrength;
|
||||
}
|
||||
|
||||
public void ToggleBop(bool toggle)
|
||||
public void ToggleBop(float beat, float length, bool toggle, bool autoBop)
|
||||
{
|
||||
Joe.shouldBop = autoBop;
|
||||
if (toggle)
|
||||
Joe.bop.length = Single.MaxValue;
|
||||
else
|
||||
Joe.bop.length = 0;
|
||||
{
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat + i, delegate
|
||||
{
|
||||
Joe.Bop();
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void ToggleBopUnloaded(bool toggle)
|
||||
|
@ -13,6 +13,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
public Animator anim;
|
||||
public Animator FaceAnim;
|
||||
public GameEvent bop = new GameEvent();
|
||||
public bool shouldBop = true;
|
||||
public SpriteRenderer[] Shadows;
|
||||
|
||||
public Color BombGlowTint;
|
||||
@ -94,11 +95,9 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
anim.Play("Beat", -1, 0);
|
||||
}
|
||||
|
||||
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1, false) && cond.songPositionInBeats > bop.startBeat && cond.songPositionInBeats < bop.startBeat + bop.length && cond.songPositionInBeats >= unPrepareTime && !inCombo)
|
||||
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1, false) && shouldBop && cond.songPositionInBeats >= unPrepareTime && !inCombo)
|
||||
{
|
||||
anim.speed = 1f;
|
||||
anim.Play("Beat", -1, 0);
|
||||
lastChargeTime = Single.MinValue;
|
||||
Bop();
|
||||
}
|
||||
|
||||
if (inCombo && shouldComboId == -2)
|
||||
@ -182,6 +181,13 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
|
||||
}
|
||||
|
||||
public void Bop()
|
||||
{
|
||||
anim.speed = 1f;
|
||||
anim.Play("Beat", -1, 0);
|
||||
lastChargeTime = Single.MinValue;
|
||||
}
|
||||
|
||||
public bool Punch(int forceHand = 0)
|
||||
{
|
||||
if (GameManager.instance.currentGame != "karateman") return false;
|
||||
|
Reference in New Issue
Block a user