mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 10:47:39 +02:00
Clappy Trio and Fork Lifter finished + small additions/fixes (#400)
* The funny * Yar har har har * 1 two tree * Hilarious! * procedurally spawning in stuff * bored meeting * A lot! * Assistant stop added * Added Bops * Added Sounds * Added miss stuff!! Only need the miss anim for the pigs!!! * Tweaks * Bugfixes! * anim fix anim fix * STRAIGHT! * Sound offsets fixed * added the new anims to implement * new sheet * loopSpin implemented * woah * mis stuff * doen done done * Various fixes * Fixed clappy trio bop bug * Epic tings * Added color and screen shake * Small things * redid sheets a little * Fixed burger preview * Almost done with forklifter * Bg color and fixed 4 peas for fork lifter * icon * bg stuff for tambourine and forklfiter --------- Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
This commit is contained in:
@ -35,6 +35,15 @@ namespace HeavenStudio.Games.Loaders
|
||||
new Param("toggle", false, "Alt", "Whether or not the alternate version should be played")
|
||||
}
|
||||
},
|
||||
new GameAction("sign", "Sign Enter")
|
||||
{
|
||||
function = delegate { var e = eventCaller.currentEntity; ClappyTrio.instance.Sign(e.beat, e.length, e["ease"]); },
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("ease", EasingFunction.Ease.Linear, "Ease", "Which ease should the sign move with?"),
|
||||
},
|
||||
resizable = true
|
||||
},
|
||||
new GameAction("change lion count", "Change Lion Count")
|
||||
{
|
||||
function = delegate { ClappyTrio.instance.ChangeLionCount((int)eventCaller.currentEntity["valA"]); },
|
||||
@ -75,10 +84,16 @@ namespace HeavenStudio.Games
|
||||
private ClappyTrioPlayer ClappyTrioPlayer;
|
||||
|
||||
public bool playerHitLast = false;
|
||||
public bool missed;
|
||||
bool shouldBop;
|
||||
|
||||
public GameEvent bop = new GameEvent();
|
||||
|
||||
[SerializeField] Animator signAnim;
|
||||
float signStartBeat;
|
||||
float signLength;
|
||||
EasingFunction.Ease lastEase;
|
||||
|
||||
public static ClappyTrio instance { get; set; }
|
||||
|
||||
MultiSound clapSounds = null;
|
||||
@ -106,6 +121,24 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
if (shouldBop) Bop(cond.songPositionInBeats);
|
||||
}
|
||||
if (cond.isPlaying && !cond.isPaused)
|
||||
{
|
||||
float normalizedBeat = cond.GetPositionFromBeat(signStartBeat, signLength);
|
||||
|
||||
if (normalizedBeat > 0 && normalizedBeat <= 1)
|
||||
{
|
||||
EasingFunction.Function func = EasingFunction.GetEasingFunction(lastEase);
|
||||
float newPos = func(0, 1, normalizedBeat);
|
||||
signAnim.DoNormalizedAnimation("Enter", newPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Sign(float beat, float length, int ease)
|
||||
{
|
||||
signStartBeat = beat;
|
||||
signLength = length;
|
||||
lastEase = (EasingFunction.Ease)ease;
|
||||
}
|
||||
|
||||
private void InitLions()
|
||||
@ -195,7 +228,8 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
SetFace(i, 1);
|
||||
}
|
||||
} else
|
||||
}
|
||||
else if (missed)
|
||||
{
|
||||
var a = EventCaller.GetAllInGameManagerList("clappyTrio", new string[] { "clap" });
|
||||
var b = a.FindAll(c => c.beat < beat);
|
||||
|
Reference in New Issue
Block a user