rest of the games converted
This commit is contained in:
parent
6218dda878
commit
2e53d1327f
|
|
@ -76,9 +76,6 @@ namespace HeavenStudio
|
|||
// Conductor is currently paused, but not fully stopped
|
||||
public bool isPaused;
|
||||
|
||||
// Last reported beat based on song position
|
||||
private double lastReportedBeat = 0f;
|
||||
|
||||
// Metronome tick sound enabled
|
||||
public bool metronome = false;
|
||||
Util.Sound metronomeSound;
|
||||
|
|
@ -381,6 +378,7 @@ namespace HeavenStudio
|
|||
}
|
||||
}
|
||||
|
||||
[Obsolete("Conductor.ReportBeat is deprecated. Please use the OnBeatPulse callback instead.")]
|
||||
public bool ReportBeat(ref double lastReportedBeat, double offset = 0, bool shiftBeatToOffset = true)
|
||||
{
|
||||
bool result = songPositionInBeats + (shiftBeatToOffset ? offset : 0f) >= (lastReportedBeat) + 1f;
|
||||
|
|
|
|||
|
|
@ -204,8 +204,6 @@ namespace HeavenStudio.Games
|
|||
private List<GameObject> Spectators;
|
||||
|
||||
//bop-type animations
|
||||
private GameEvent bop = new GameEvent();
|
||||
private GameEvent specBop = new GameEvent();
|
||||
private GameEvent noBop = new GameEvent();
|
||||
private GameEvent noResponse = new GameEvent();
|
||||
private GameEvent noCall = new GameEvent();
|
||||
|
|
@ -356,30 +354,28 @@ namespace HeavenStudio.Games
|
|||
}
|
||||
}
|
||||
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
var cond = Conductor.instance;
|
||||
if (goBopIdol)
|
||||
{
|
||||
if (!(cond.songPositionInBeatsAsDouble >= noBop.startBeat && cond.songPositionInBeatsAsDouble < noBop.startBeat + noBop.length))
|
||||
{
|
||||
idolAnimator.Play("IdolBeat" + GetPerformanceSuffix(), 0, 0);
|
||||
Blue.PlayAnimState("Beat");
|
||||
Orange.PlayAnimState("Beat");
|
||||
}
|
||||
}
|
||||
if (goBopSpec)
|
||||
{
|
||||
if (!(cond.songPositionInBeatsAsDouble >= noSpecBop.startBeat && cond.songPositionInBeatsAsDouble < noSpecBop.startBeat + noSpecBop.length))
|
||||
BopAll();
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
var cond = Conductor.instance;
|
||||
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1))
|
||||
{
|
||||
if (goBopIdol)
|
||||
{
|
||||
if (!(cond.songPositionInBeatsAsDouble >= noBop.startBeat && cond.songPositionInBeatsAsDouble < noBop.startBeat + noBop.length))
|
||||
{
|
||||
idolAnimator.Play("IdolBeat" + GetPerformanceSuffix(), 0, 0);
|
||||
Blue.PlayAnimState("Beat");
|
||||
Orange.PlayAnimState("Beat");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cond.ReportBeat(ref specBop.lastReportedBeat, specBop.startBeat % 1))
|
||||
{
|
||||
if (goBopSpec)
|
||||
{
|
||||
if (!(cond.songPositionInBeatsAsDouble >= noSpecBop.startBeat && cond.songPositionInBeatsAsDouble < noSpecBop.startBeat + noSpecBop.length))
|
||||
BopAll();
|
||||
}
|
||||
}
|
||||
|
||||
//idol jumping physics
|
||||
float jumpPos = cond.GetPositionFromBeat(idolJumpStartTime, 1f);
|
||||
|
|
|
|||
|
|
@ -230,16 +230,17 @@ namespace HeavenStudio.Games
|
|||
}
|
||||
}
|
||||
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
if (goBopFlip) SingleBop((int)WhoBops.Flippers);
|
||||
if (goBopTuck) SingleBop((int)WhoBops.CaptainTuck);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
var cond = Conductor.instance;
|
||||
if (cond.isPlaying && !cond.isPaused)
|
||||
{
|
||||
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1))
|
||||
{
|
||||
if (goBopFlip) SingleBop((int)WhoBops.Flippers);
|
||||
if (goBopTuck) SingleBop((int)WhoBops.CaptainTuck);
|
||||
}
|
||||
if (isWalking)
|
||||
{
|
||||
float normalizedBeat = cond.GetPositionFromBeat(walkStartBeat, walkLength);
|
||||
|
|
|
|||
|
|
@ -129,6 +129,11 @@ namespace HeavenStudio.Games
|
|||
instance = this;
|
||||
}
|
||||
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
playerInstance.SingleBop();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
BackgroundColorUpdate();
|
||||
|
|
|
|||
|
|
@ -49,16 +49,11 @@ namespace HeavenStudio.Games.Scripts_ForkLifter
|
|||
{
|
||||
Stab(null);
|
||||
}
|
||||
|
||||
if (Conductor.instance.ReportBeat(ref lastReportedBeat) && anim.IsAnimationNotPlaying() && shouldBop)
|
||||
{
|
||||
SingleBop();
|
||||
}
|
||||
}
|
||||
|
||||
public void SingleBop()
|
||||
{
|
||||
anim.DoScaledAnimationAsync("Player_Bop", 0.5f);
|
||||
if (anim.IsAnimationNotPlaying() && shouldBop) anim.DoScaledAnimationAsync("Player_Bop", 0.5f);
|
||||
}
|
||||
|
||||
public void Eat()
|
||||
|
|
|
|||
|
|
@ -1166,6 +1166,11 @@ namespace HeavenStudio.Games
|
|||
Wind.windMain = windStrength;
|
||||
}
|
||||
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
Joe.RequestBop();
|
||||
}
|
||||
|
||||
public void ToggleBop(double beat, float length, bool toggle, bool autoBop)
|
||||
{
|
||||
Joe.bop.length = autoBop ? float.MaxValue : 0;
|
||||
|
|
|
|||
|
|
@ -51,6 +51,12 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
}
|
||||
public bool inNuriLock { get { return (Conductor.instance.songPositionInBeatsAsDouble >= noNuriJabTime && Conductor.instance.songPositionInBeatsAsDouble < noNuriJabTime + 1f); } }
|
||||
|
||||
public void RequestBop()
|
||||
{
|
||||
var cond = Conductor.instance;
|
||||
if (cond.songPositionInBeatsAsDouble > bop.startBeat && cond.songPositionInBeatsAsDouble < bop.startBeat + bop.length && cond.songPositionInBeatsAsDouble >= unPrepareTime && !inCombo) Bop();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
var cond = Conductor.instance;
|
||||
|
|
@ -95,11 +101,6 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
anim.Play("Beat", -1, 0);
|
||||
}
|
||||
|
||||
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1, false) && cond.songPositionInBeatsAsDouble > bop.startBeat && cond.songPositionInBeatsAsDouble < bop.startBeat + bop.length && cond.songPositionInBeatsAsDouble >= unPrepareTime && !inCombo)
|
||||
{
|
||||
Bop();
|
||||
}
|
||||
|
||||
if (inCombo && shouldComboId == -2)
|
||||
{
|
||||
float missProg = cond.GetPositionFromBeat(lastComboMissTime, 3f);
|
||||
|
|
|
|||
|
|
@ -336,18 +336,19 @@ namespace HeavenStudio.Games
|
|||
}
|
||||
}
|
||||
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
if (goBop)
|
||||
{
|
||||
PlayStepperAnim("Bop", true, 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
var cond = Conductor.instance;
|
||||
if (cond.isPlaying && !cond.isPaused)
|
||||
{
|
||||
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1))
|
||||
{
|
||||
if (goBop)
|
||||
{
|
||||
PlayStepperAnim("Bop", true, 0.5f);
|
||||
}
|
||||
}
|
||||
if (queuedInputs.Count > 0)
|
||||
{
|
||||
foreach (var input in queuedInputs)
|
||||
|
|
|
|||
|
|
@ -157,10 +157,9 @@ namespace HeavenStudio.Games
|
|||
}
|
||||
}
|
||||
|
||||
private void LateUpdate()
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
if (Conductor.instance.ReportBeat(ref lastReportedBeat)
|
||||
&& !BossAnim.IsPlayingAnimationName("BossCall")
|
||||
if (!BossAnim.IsPlayingAnimationName("BossCall")
|
||||
&& !BossAnim.IsPlayingAnimationName("BossSignal")
|
||||
&& bossBop)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -349,24 +349,24 @@ namespace HeavenStudio.Games
|
|||
}
|
||||
}
|
||||
|
||||
private void LateUpdate()
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
if (Conductor.instance.ReportBeat(ref lastReportedBeat)) {
|
||||
if ((MonkAnim.IsAnimationNotPlaying() || MonkAnim.IsPlayingAnimationName("Bop") || MonkAnim.IsPlayingAnimationName("Idle"))
|
||||
if ((MonkAnim.IsAnimationNotPlaying() || MonkAnim.IsPlayingAnimationName("Bop") || MonkAnim.IsPlayingAnimationName("Idle"))
|
||||
&& monkBop
|
||||
&& !isStaring)
|
||||
{
|
||||
MonkAnim.DoScaledAnimationAsync("Bop", 0.5f);
|
||||
}
|
||||
&& !isStaring)
|
||||
{
|
||||
MonkAnim.DoScaledAnimationAsync("Bop", 0.5f);
|
||||
}
|
||||
|
||||
if (!MonkAnim.IsPlayingAnimationName("Blush") || !MonkAnim.IsPlayingAnimationName("Stare")) {
|
||||
if (growLevel == 4) BrowAnim.DoScaledAnimationAsync("Bop", 0.5f);
|
||||
if (growLevel > 0) StacheAnim.DoScaledAnimationAsync($"Bop{growLevel}", 0.5f);
|
||||
}
|
||||
if (!MonkAnim.IsPlayingAnimationName("Blush") || !MonkAnim.IsPlayingAnimationName("Stare"))
|
||||
{
|
||||
if (growLevel == 4) BrowAnim.DoScaledAnimationAsync("Bop", 0.5f);
|
||||
if (growLevel > 0) StacheAnim.DoScaledAnimationAsync($"Bop{growLevel}", 0.5f);
|
||||
}
|
||||
|
||||
if (CloudMonkey.activeInHierarchy) {
|
||||
CloudMonkey.GetComponent<Animator>().DoScaledAnimationAsync("Bop", 0.5f);
|
||||
}
|
||||
if (CloudMonkey.activeInHierarchy) //Why activeInHierarchy? - Rasmus
|
||||
{
|
||||
CloudMonkey.GetComponent<Animator>().DoScaledAnimationAsync("Bop", 0.5f); //DONT DO THIS!!! GetComponent is a really expensive operation - Rasmus
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ namespace HeavenStudio.Games.Scripts_OctopusMachine
|
|||
public bool isSqueezed;
|
||||
public bool isPreparing;
|
||||
public double queuePrepare;
|
||||
public double lastReportedBeat = 0f;
|
||||
double lastSqueezeBeat;
|
||||
bool isActive = true;
|
||||
|
||||
|
|
@ -65,10 +64,9 @@ namespace HeavenStudio.Games.Scripts_OctopusMachine
|
|||
}
|
||||
}
|
||||
|
||||
void LateUpdate()
|
||||
public void RequestBop()
|
||||
{
|
||||
if (Conductor.instance.ReportBeat(ref lastReportedBeat)
|
||||
&& !anim.IsPlayingAnimationName("Bop")
|
||||
if (!anim.IsPlayingAnimationName("Bop")
|
||||
&& !anim.IsPlayingAnimationName("Happy")
|
||||
&& !anim.IsPlayingAnimationName("Angry")
|
||||
&& !anim.IsPlayingAnimationName("Oops")
|
||||
|
|
|
|||
|
|
@ -206,7 +206,6 @@ namespace HeavenStudio.Games
|
|||
bool autoAction;
|
||||
double intervalStartBeat;
|
||||
float beatInterval = 1f;
|
||||
double lastReportedBeat;
|
||||
|
||||
static List<double> queuedSqueezes = new();
|
||||
static List<double> queuedReleases = new();
|
||||
|
|
@ -253,6 +252,23 @@ namespace HeavenStudio.Games
|
|||
}
|
||||
}
|
||||
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
if (bopIterate >= 3)
|
||||
{
|
||||
bopStatus =
|
||||
bopIterate = 0;
|
||||
autoAction = false;
|
||||
}
|
||||
|
||||
if (autoAction) bopIterate++;
|
||||
|
||||
foreach (var octo in octopodes)
|
||||
{
|
||||
octo.RequestBop();
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
BackgroundColorUpdate();
|
||||
|
|
@ -261,17 +277,6 @@ namespace HeavenStudio.Games
|
|||
if (Text.text is "Wrong! Try Again!" or "Good!") Text.text = "";
|
||||
queuePrepare = double.MaxValue;
|
||||
}
|
||||
|
||||
if (Conductor.instance.ReportBeat(ref lastReportedBeat))
|
||||
{
|
||||
if (bopIterate >= 3) {
|
||||
bopStatus =
|
||||
bopIterate = 0;
|
||||
autoAction = false;
|
||||
}
|
||||
|
||||
if (autoAction) bopIterate++;
|
||||
}
|
||||
}
|
||||
|
||||
public void ChangeText(string text, string youText)
|
||||
|
|
|
|||
|
|
@ -152,7 +152,6 @@ namespace HeavenStudio.Games
|
|||
|
||||
public Paddlers paddlers;
|
||||
|
||||
public GameEvent bop = new GameEvent();
|
||||
private bool goBop = true;
|
||||
|
||||
public static RhythmRally instance;
|
||||
|
|
@ -357,16 +356,6 @@ namespace HeavenStudio.Games
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Paddler bop animation.
|
||||
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1))
|
||||
{
|
||||
if (goBop && !inPose)
|
||||
{
|
||||
BopSingle();
|
||||
}
|
||||
}
|
||||
|
||||
opponentServing = false;
|
||||
|
||||
//update camera
|
||||
|
|
@ -375,6 +364,14 @@ namespace HeavenStudio.Games
|
|||
GameCamera.AdditionalFoV = cameraFOV;
|
||||
}
|
||||
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
if (goBop && !inPose)
|
||||
{
|
||||
BopSingle();
|
||||
}
|
||||
}
|
||||
|
||||
public void Bop(double beat, float length, bool bop, bool bopAuto)
|
||||
{
|
||||
goBop = bopAuto;
|
||||
|
|
|
|||
|
|
@ -84,22 +84,20 @@ namespace HeavenStudio.Games
|
|||
instance = this;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
if (shouldBop) SomenPlayer.DoScaledAnimationAsync("HeadBob", 0.5f);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
var cond = Conductor.instance;
|
||||
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1) && shouldBop)
|
||||
{
|
||||
SomenPlayer.Play("HeadBob", -1, 0);
|
||||
}
|
||||
|
||||
if (PlayerInput.GetIsAction(InputAction_BasicPress) && !IsExpectingInputNow(InputAction_BasicPress))
|
||||
{
|
||||
SoundByte.PlayOneShotGame("rhythmSomen/somen_mistake");
|
||||
FrontArm.Play("ArmPluck", -1, 0);
|
||||
backArm.Play("BackArmNothing", 0, 0);
|
||||
FrontArm.DoScaledAnimationAsync("ArmPluck", 0.5f);
|
||||
backArm.DoScaledAnimationAsync("BackArmNothing", 0.5f);
|
||||
hasSlurped = false;
|
||||
EffectSweat.Play("BlobSweating", -1, 0);
|
||||
EffectSweat.DoScaledAnimationAsync("BlobSweating", 0.5f);
|
||||
ScoreMiss();
|
||||
}
|
||||
}
|
||||
|
|
@ -108,7 +106,7 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
if (!missed)
|
||||
{
|
||||
backArm.Play("BackArmLift", 0, 0);
|
||||
backArm.DoScaledAnimationAsync("BackArmLift", 0.5f);
|
||||
FrontArm.DoScaledAnimationAsync("ArmSlurp", 0.5f);
|
||||
hasSlurped = true;
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
|
|
@ -117,8 +115,8 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
if (hasSlurped)
|
||||
{
|
||||
backArm.Play("BackArmNothing", 0, 0);
|
||||
FrontArm.Play("ArmNothing", 0, 0);
|
||||
backArm.DoScaledAnimationAsync("BackArmNothing", 0.5f);
|
||||
FrontArm.DoScaledAnimationAsync("ArmNothing", 0.5f);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
|
@ -136,7 +134,7 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
new BeatAction.Action(beat + i, delegate
|
||||
{
|
||||
SomenPlayer.Play("HeadBob", -1, 0);
|
||||
SomenPlayer.DoScaledAnimationAsync("HeadBob", 0.5f);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
|
@ -155,9 +153,9 @@ namespace HeavenStudio.Games
|
|||
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat, delegate { FarCrane.Play("Drop", -1, 0);}),
|
||||
new BeatAction.Action(beat + 1.0f, delegate { FarCrane.Play("Open", -1, 0);}),
|
||||
new BeatAction.Action(beat + 1.5f, delegate { FarCrane.Play("Lift", -1, 0);}),
|
||||
new BeatAction.Action(beat, delegate { FarCrane.DoScaledAnimationAsync("Drop", 0.5f);}),
|
||||
new BeatAction.Action(beat + 1.0f, delegate { FarCrane.DoScaledAnimationAsync("Open", 0.5f);}),
|
||||
new BeatAction.Action(beat + 1.5f, delegate { FarCrane.DoScaledAnimationAsync("Lift", 0.5f);}),
|
||||
});
|
||||
|
||||
}
|
||||
|
|
@ -174,9 +172,9 @@ namespace HeavenStudio.Games
|
|||
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat, delegate { CloseCrane.Play("DropClose", -1, 0);}),
|
||||
new BeatAction.Action(beat + 1.0f, delegate { CloseCrane.Play("OpenClose", -1, 0);}),
|
||||
new BeatAction.Action(beat + 1.5f, delegate { CloseCrane.Play("LiftClose", -1, 0);}),
|
||||
new BeatAction.Action(beat, delegate { CloseCrane.DoScaledAnimationAsync("DropClose", 0.5f);}),
|
||||
new BeatAction.Action(beat + 1.0f, delegate { CloseCrane.DoScaledAnimationAsync("OpenClose", 0.5f);}),
|
||||
new BeatAction.Action(beat + 1.5f, delegate { CloseCrane.DoScaledAnimationAsync("LiftClose", 0.5f);}),
|
||||
});
|
||||
|
||||
}
|
||||
|
|
@ -195,12 +193,12 @@ namespace HeavenStudio.Games
|
|||
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat, delegate { CloseCrane.Play("DropClose", -1, 0);}),
|
||||
new BeatAction.Action(beat, delegate { FarCrane.Play("Drop", -1, 0);}),
|
||||
new BeatAction.Action(beat + 1.0f, delegate { CloseCrane.Play("OpenClose", -1, 0);}),
|
||||
new BeatAction.Action(beat + 1.0f, delegate { FarCrane.Play("Open", -1, 0);}),
|
||||
new BeatAction.Action(beat + 1.5f, delegate { CloseCrane.Play("LiftClose", -1, 0);}),
|
||||
new BeatAction.Action(beat + 1.5f, delegate { FarCrane.Play("Lift", -1, 0);}),
|
||||
new BeatAction.Action(beat, delegate { CloseCrane.DoScaledAnimationAsync("DropClose", 0.5f);}),
|
||||
new BeatAction.Action(beat, delegate { FarCrane.DoScaledAnimationAsync("Drop", 0.5f);}),
|
||||
new BeatAction.Action(beat + 1.0f, delegate { CloseCrane.DoScaledAnimationAsync("OpenClose", 0.5f);}),
|
||||
new BeatAction.Action(beat + 1.0f, delegate { FarCrane.DoScaledAnimationAsync("Open", 0.5f);}),
|
||||
new BeatAction.Action(beat + 1.5f, delegate { CloseCrane.DoScaledAnimationAsync("LiftClose", 0.5f);}),
|
||||
new BeatAction.Action(beat + 1.5f, delegate { FarCrane.DoScaledAnimationAsync("Lift", 0.5f);}),
|
||||
});
|
||||
|
||||
}
|
||||
|
|
@ -212,35 +210,35 @@ namespace HeavenStudio.Games
|
|||
|
||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat, delegate { EffectExclam.Play("ExclamAppear", -1, 0);}),
|
||||
new BeatAction.Action(beat, delegate { EffectExclam.DoScaledAnimationAsync("ExclamAppear", 0.5f);}),
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void CatchSuccess(PlayerActionEvent caller, float state)
|
||||
{
|
||||
backArm.Play("BackArmNothing", 0, 0);
|
||||
backArm.DoScaledAnimationAsync("BackArmNothing", 0, 0);
|
||||
hasSlurped = false;
|
||||
splashEffect.Play();
|
||||
if (state >= 1f || state <= -1f)
|
||||
{
|
||||
SoundByte.PlayOneShotGame("rhythmSomen/somen_splash");
|
||||
FrontArm.Play("ArmPluckNG", -1, 0);
|
||||
EffectSweat.Play("BlobSweating", -1, 0);
|
||||
FrontArm.DoScaledAnimationAsync("ArmPluckNG", 0.5f);
|
||||
EffectSweat.DoScaledAnimationAsync("BlobSweating", 0.5f);
|
||||
missed = true;
|
||||
return;
|
||||
}
|
||||
SoundByte.PlayOneShotGame("rhythmSomen/somen_catch");
|
||||
SoundByte.PlayOneShotGame("rhythmSomen/somen_catch_old", volume: 0.25f);
|
||||
FrontArm.Play("ArmPluckOK", -1, 0);
|
||||
EffectHit.Play("HitAppear", -1, 0);
|
||||
FrontArm.DoScaledAnimationAsync("ArmPluckOK", 0.5f);
|
||||
EffectHit.DoScaledAnimationAsync("HitAppear", 0.5f);
|
||||
missed = false;
|
||||
}
|
||||
|
||||
public void CatchMiss(PlayerActionEvent caller)
|
||||
{
|
||||
missed = true;
|
||||
EffectShock.Play("ShockAppear", -1, 0);
|
||||
EffectShock.DoScaledAnimationAsync("ShockAppear", 0.5f);
|
||||
}
|
||||
|
||||
public void CatchEmpty(PlayerActionEvent caller)
|
||||
|
|
|
|||
|
|
@ -218,26 +218,27 @@ namespace HeavenStudio.Games
|
|||
ReporterBlink();
|
||||
}
|
||||
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
if (shouldBop && canBop)
|
||||
{
|
||||
if (UnityEngine.Random.Range(1, 18) == 1)
|
||||
{
|
||||
wrestlerAnim.DoScaledAnimationAsync("BopPec");
|
||||
}
|
||||
else
|
||||
{
|
||||
wrestlerAnim.DoScaledAnimationAsync("Bop");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
var cond = Conductor.instance;
|
||||
|
||||
if (cond.isPlaying && !cond.isPaused)
|
||||
{
|
||||
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1))
|
||||
{
|
||||
if (shouldBop && canBop)
|
||||
{
|
||||
if (UnityEngine.Random.Range(1, 18) == 1)
|
||||
{
|
||||
wrestlerAnim.DoScaledAnimationAsync("BopPec");
|
||||
}
|
||||
else
|
||||
{
|
||||
wrestlerAnim.DoScaledAnimationAsync("Bop");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (PlayerInput.GetIsAction(InputAction_BasicPress) && !IsExpectingInputNow(InputAction_BasicPress) && !shouldNotInput)
|
||||
{
|
||||
if ((PlayerInput.CurrentControlStyle != InputController.ControlStyles.Touch)
|
||||
|
|
|
|||
|
|
@ -169,16 +169,14 @@ namespace HeavenStudio.Games
|
|||
instance = this;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
if (goBopSamurai) player.Bop();
|
||||
if (goBopChild) childParent.GetComponent<NtrSamuraiChild>().Bop();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
var cond = Conductor.instance;
|
||||
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1))
|
||||
{
|
||||
if (goBopSamurai) player.Bop();
|
||||
if (goBopChild) childParent.GetComponent<NtrSamuraiChild>().Bop();
|
||||
}
|
||||
|
||||
if (PlayerInput.GetIsAction(InputAction_AltDown))
|
||||
DoStep();
|
||||
if (PlayerInput.GetIsAction(InputAction_AltUp) && player.isStepping())
|
||||
|
|
|
|||
|
|
@ -228,6 +228,18 @@ namespace HeavenStudio.Games
|
|||
colorEnd = defaultBGColor;
|
||||
}
|
||||
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
if (shouldBop)
|
||||
{
|
||||
Bop();
|
||||
}
|
||||
if (spaceGrampsShouldBop)
|
||||
{
|
||||
GrampsBop();
|
||||
}
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
|
@ -237,17 +249,6 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
scroll.NormalizedX -= xBaseSpeed * xScrollMultiplier * Time.deltaTime;
|
||||
scroll.NormalizedY -= yBaseSpeed * yScrollMultiplier * Time.deltaTime;
|
||||
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1))
|
||||
{
|
||||
if (shouldBop)
|
||||
{
|
||||
Bop();
|
||||
}
|
||||
if (spaceGrampsShouldBop)
|
||||
{
|
||||
GrampsBop();
|
||||
}
|
||||
}
|
||||
if (isShootingStar)
|
||||
{
|
||||
float normalizedBeat = cond.GetPositionFromBeat(shootingStarStartBeat, shootingStarLength);
|
||||
|
|
|
|||
|
|
@ -123,15 +123,16 @@ namespace HeavenStudio.Games
|
|||
instance = this;
|
||||
}
|
||||
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
if (shouldBop) SingleBop();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
var cond = Conductor.instance;
|
||||
if (cond.isPlaying && !cond.isPaused)
|
||||
{
|
||||
if (shouldBop && cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1))
|
||||
{
|
||||
SingleBop();
|
||||
}
|
||||
GiraffeUpdate(cond);
|
||||
JumpUpdate(cond);
|
||||
ScrollUpdate(cond);
|
||||
|
|
|
|||
|
|
@ -257,23 +257,24 @@ namespace HeavenStudio.Games
|
|||
instance = this;
|
||||
}
|
||||
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
if (shouldBop)
|
||||
{
|
||||
foreach (var girl in npcGirls)
|
||||
{
|
||||
girl.Bop();
|
||||
}
|
||||
player.Bop();
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
var cond = Conductor.instance;
|
||||
|
||||
if (cond.isPlaying && !cond.isPaused)
|
||||
{
|
||||
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1))
|
||||
{
|
||||
if (shouldBop)
|
||||
{
|
||||
foreach (var girl in npcGirls)
|
||||
{
|
||||
girl.Bop();
|
||||
}
|
||||
player.Bop();
|
||||
}
|
||||
}
|
||||
if (queuedPoses.Count > 0)
|
||||
{
|
||||
foreach (var pose in queuedPoses)
|
||||
|
|
|
|||
|
|
@ -262,20 +262,20 @@ namespace HeavenStudio.Games
|
|||
return default(SuperCurveObject.Path);
|
||||
}
|
||||
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
if (shouldBop)
|
||||
{
|
||||
SingleBop();
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
var cond = Conductor.instance;
|
||||
BackgroundColorUpdate();
|
||||
if (cond.isPlaying && !cond.isPaused)
|
||||
{
|
||||
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1))
|
||||
{
|
||||
if (shouldBop)
|
||||
{
|
||||
SingleBop();
|
||||
}
|
||||
}
|
||||
|
||||
if (PlayerInput.CurrentControlStyle == InputController.ControlStyles.Touch)
|
||||
{
|
||||
TossKid next = GetCurrentReceiver();
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace HeavenStudio.Games.Scripts_TossBoys
|
|||
|
||||
public void Bop()
|
||||
{
|
||||
if (!anim.IsAnimationNotPlaying() || crouch || preparing) return;
|
||||
if (crouch || preparing) return;
|
||||
DoAnimationScaledAsync("Bop", 0.5f);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -116,18 +116,20 @@ namespace HeavenStudio.Games
|
|||
instance = this;
|
||||
}
|
||||
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
var cond = Conductor.instance;
|
||||
if (!goBop) return;
|
||||
if ((!playerReady) && cond.songPositionInBeatsAsDouble > playerBopStart)
|
||||
playerAnim.DoScaledAnimationAsync("Bop");
|
||||
|
||||
if (cond.songPositionInBeatsAsDouble > girlBopStart)
|
||||
girlAnim.DoScaledAnimationAsync("Bop");
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
var cond = Conductor.instance;
|
||||
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1) && goBop)
|
||||
{
|
||||
if ((!playerReady) && cond.songPositionInBeatsAsDouble > playerBopStart)
|
||||
playerAnim.DoScaledAnimationAsync("Bop");
|
||||
|
||||
if (cond.songPositionInBeatsAsDouble > girlBopStart)
|
||||
girlAnim.DoScaledAnimationAsync("Bop");
|
||||
}
|
||||
|
||||
if (cond.isPlaying && !cond.isPaused)
|
||||
{
|
||||
if (queuedInputs.Count > 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue