Gameplay: Timing windows use a "smart" BPM scaling system (#86)

* Game: Pajama Party

* Pajama Party: bg setup, Mako jump

* Pajama Party: mako jumping

* Pajama Party: prep landing anim references

* Pajama Party: several anims, improved 3d scene

* Pajama Party: bg cleanup

* Pajama Party: Mako sleeping anims

* Pajama Party: All Mako anims, add sounds to fs

* Pajama Party: prep monkey prefab

* Pajama Party: thrown pillow, prep sequences

* Pajama Party: make embarrassed catch not loop

whoops

* Pajama Party: sound adjust, prefab work

* Pajama Party: monkey spawning, basic jumping

* Pajama Party: jump sequence

no input detection or landing yet

* Pajama Party: anims override

* Pajama Party: jump cue functional

comes with improvements and bugfixes to PlayerActionEvent

* Pajama Party: sleep cue functional

* Pajama Party: some notes

* PlayerActionEvent: more bugfixes

* Pajama Party: fully functional throw cue

* Pajama Party: start animating sleep cue

* Pajama Party: feature-complete

* Pajama Party: unfuck layering

* Pajama Party: icon

also adds Fan Club's concept icon

* Pajama Party: cues while unloaded

* inverse-scale timing windows based on speed

* Fan Club: move to new input system

* Fan Club: allow forced animations during calls

* Crop Stomp: fix camera shake regression
This commit is contained in:
minenice55
2022-06-03 23:15:56 -04:00
committed by GitHub
parent 3a5273d31b
commit 52ecce8c3e
4 changed files with 156 additions and 191 deletions

View File

@ -83,7 +83,8 @@ namespace HeavenStudio.Games
BigCall,
Squat,
Wink,
Dab
Dab,
None
}
public enum KamoneResponseType {
Through,
@ -127,6 +128,7 @@ namespace HeavenStudio.Games
public GameEvent specBop = new GameEvent();
public GameEvent noBop = new GameEvent();
public GameEvent noResponse = new GameEvent();
public GameEvent noCall = new GameEvent();
public GameEvent noSpecBop = new GameEvent();
private static int performanceType = (int) IdolPerformanceType.Normal;
@ -174,7 +176,6 @@ namespace HeavenStudio.Games
Player.player = true;
}
Spectators.Add(mobj);
fan.Init();
//prepare spawn point of next spectator
spawnPos.x += RADIUS * 2;
@ -313,6 +314,12 @@ namespace HeavenStudio.Games
noResponse.startBeat = beat;
}
private void DisableCall(float beat, float length)
{
noCall.length = length;
noCall.startBeat = beat;
}
private void DisableSpecBop(float beat, float length)
{
float bt = Conductor.instance.songPositionInBeats;
@ -335,6 +342,7 @@ namespace HeavenStudio.Games
idolJumpStartTime = Single.MinValue;
DisableResponse(beat, length + 0.5f);
DisableBop(beat, length + 0.5f);
DisableCall(beat, length + 0.5f);
switch (type)
{
@ -388,6 +396,7 @@ namespace HeavenStudio.Games
idolAnimator.Play("IdolDab" + GetPerformanceSuffix(), -1, 0);
Jukebox.PlayOneShotGame("fanClub/arisa_dab");
break;
default: break;
}
}
@ -429,6 +438,17 @@ namespace HeavenStudio.Games
}
}
private void DoIdolPeace(bool sync = true)
{
if (!(Conductor.instance.songPositionInBeats >= noCall.startBeat && Conductor.instance.songPositionInBeats < noCall.startBeat + noCall.length))
{
if (sync)
idolAnimator.Play("IdolPeace" + GetPerformanceSuffix(), -1, 0);
else
idolAnimator.Play("IdolPeaceNoSync" + GetPerformanceSuffix(), -1, 0);
}
}
private void DoIdolResponse()
{
if (responseToggle)
@ -438,6 +458,21 @@ namespace HeavenStudio.Games
}
}
private void DoIdolCall(int part = 0, bool big = false)
{
if (!(Conductor.instance.songPositionInBeats >= noCall.startBeat && Conductor.instance.songPositionInBeats < noCall.startBeat + noCall.length))
{
if (big)
{
idolAnimator.Play("IdolBigCall" + part + GetPerformanceSuffix(), -1, 0);
}
else
{
idolAnimator.Play("IdolCall" + part + GetPerformanceSuffix(), -1, 0);
}
}
}
const float HAIS_LENGTH = 4.5f;
public void CallHai(float beat, bool noSound = false, int type = 0)
{
@ -458,11 +493,11 @@ namespace HeavenStudio.Games
BeatAction.New(Arisa, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolPeace" + GetPerformanceSuffix(), -1, 0);}),
new BeatAction.Action(beat + 1f, delegate { Arisa.GetComponent<Animator>().Play("IdolPeace" + GetPerformanceSuffix(), -1, 0);}),
new BeatAction.Action(beat + 2f, delegate { Arisa.GetComponent<Animator>().Play("IdolPeace" + GetPerformanceSuffix(), -1, 0);}),
new BeatAction.Action(beat, delegate { DoIdolPeace();}),
new BeatAction.Action(beat + 1f, delegate { DoIdolPeace();}),
new BeatAction.Action(beat + 2f, delegate { DoIdolPeace();}),
new BeatAction.Action(beat + 2.5f, delegate { DisableSpecBop(beat + 2.5f, 5f);}),
new BeatAction.Action(beat + 3f, delegate { Arisa.GetComponent<Animator>().Play("IdolPeaceNoSync" + GetPerformanceSuffix()); PlayPrepare(); }),
new BeatAction.Action(beat + 3f, delegate { DoIdolPeace(false); PlayPrepare(); }),
new BeatAction.Action(beat + 4f, delegate { PlayOneClap(beat + 4f); DoIdolClaps();}),
new BeatAction.Action(beat + 5f, delegate { PlayOneClap(beat + 5f); DoIdolClaps();}),
@ -498,14 +533,10 @@ namespace HeavenStudio.Games
public void CallKamone(float beat, bool noSound = false, int type = 0, int responseType = (int) KamoneResponseType.Through)
{
bool doJump = (responseType == (int) KamoneResponseType.Jump || responseType == (int) KamoneResponseType.JumpFast);
BeatAction.Action call0;
BeatAction.Action call1;
bool isBig = (responseType == (int) KamoneResponseType.ThroughFast || responseType == (int) KamoneResponseType.JumpFast);
DisableResponse(beat, 2f);
if (responseType == (int) KamoneResponseType.ThroughFast || responseType == (int) KamoneResponseType.JumpFast)
if (isBig)
{
call0 = new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolBigCall0" + GetPerformanceSuffix(), -1, 0); });
call1 = new BeatAction.Action(beat + 1f, delegate { Arisa.GetComponent<Animator>().Play("IdolBigCall1" + GetPerformanceSuffix(), -1, 0); });
if (!noSound)
{
MultiSound.Play(new MultiSound.Sound[] {
@ -517,9 +548,6 @@ namespace HeavenStudio.Games
}
else
{
call0 = new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolCall0" + GetPerformanceSuffix(), -1, 0); });
call1 = new BeatAction.Action(beat + 0.75f, delegate { Arisa.GetComponent<Animator>().Play("IdolCall1" + GetPerformanceSuffix(), -1, 0); });
if (!noSound)
{
MultiSound.Play(new MultiSound.Sound[] {
@ -534,15 +562,15 @@ namespace HeavenStudio.Games
DisableBop(beat, (doJump) ? 6.25f : 5.25f);
DisableSpecBop(beat + 0.5f, 6f);
Prepare(beat + 1f);
Prepare(beat + 1f, 3);
Prepare(beat + 2.5f);
Prepare(beat + 3f, 2);
Prepare(beat + 4f, 1);
BeatAction.New(Arisa, new List<BeatAction.Action>()
{
call0,
call1,
new BeatAction.Action(beat, delegate { DoIdolCall(0, isBig); }),
new BeatAction.Action(beat + (isBig ? 1f : 0.75f), delegate { DoIdolCall(1, isBig); }),
new BeatAction.Action(beat + 1f, delegate { PlayPrepare(); }),
new BeatAction.Action(beat + 2f, delegate { PlayLongClap(beat + 2f); DoIdolResponse(); }),
@ -648,11 +676,11 @@ namespace HeavenStudio.Games
{
string clipName = Spectators[i].GetComponent<Animator>().GetCurrentAnimatorClipInfo(0)[0].clip.name;
if (clipName == "FanBeat" || clipName == "NoPose")
Spectators[i].GetComponent<Animator>().Play(anim);
Spectators[i].GetComponent<Animator>().Play(anim, -1, 0);
}
continue;
}
Spectators[i].GetComponent<Animator>().Play(anim);
Spectators[i].GetComponent<Animator>().Play(anim, -1, 0);
}
}