mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-25 11:05:16 +00:00
Fixed stuff also scaled now yippee
This commit is contained in:
parent
16ce508b03
commit
c6fb8880a0
2 changed files with 51 additions and 47 deletions
|
@ -20,7 +20,7 @@ namespace HeavenStudio.Games.Scripts_WorkingDough
|
||||||
}
|
}
|
||||||
private State currentState;
|
private State currentState;
|
||||||
|
|
||||||
private double startBeat;
|
private double startBeat = double.MinValue;
|
||||||
|
|
||||||
private bool big;
|
private bool big;
|
||||||
|
|
||||||
|
@ -63,6 +63,8 @@ namespace HeavenStudio.Games.Scripts_WorkingDough
|
||||||
var cond = Conductor.instance;
|
var cond = Conductor.instance;
|
||||||
|
|
||||||
if (cond.isPlaying && !cond.isPaused)
|
if (cond.isPlaying && !cond.isPaused)
|
||||||
|
{
|
||||||
|
if (startBeat > double.MinValue)
|
||||||
{
|
{
|
||||||
Vector3 pos = new Vector3();
|
Vector3 pos = new Vector3();
|
||||||
double beat = cond.songPositionInBeats;
|
double beat = cond.songPositionInBeats;
|
||||||
|
@ -102,7 +104,9 @@ namespace HeavenStudio.Games.Scripts_WorkingDough
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
transform.position = pos;
|
if (startBeat <= beat) transform.position = pos;
|
||||||
|
else transform.position = new Vector3(-80, -80);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,12 +127,12 @@ namespace HeavenStudio.Games.Scripts_WorkingDough
|
||||||
if (big)
|
if (big)
|
||||||
{
|
{
|
||||||
SoundByte.PlayOneShotGame("workingDough/bigPlayer");
|
SoundByte.PlayOneShotGame("workingDough/bigPlayer");
|
||||||
game.doughDudesPlayer.GetComponent<Animator>().Play("BigDoughJump", 0, 0);
|
game.doughDudesPlayer.GetComponent<Animator>().DoScaledAnimationAsync("BigDoughJump", 0.5f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SoundByte.PlayOneShotGame("workingDough/smallPlayer");
|
SoundByte.PlayOneShotGame("workingDough/smallPlayer");
|
||||||
game.doughDudesPlayer.GetComponent<Animator>().Play("SmallDoughJump", 0, 0);
|
game.doughDudesPlayer.GetComponent<Animator>().DoScaledAnimationAsync("SmallDoughJump", 0.5f);
|
||||||
}
|
}
|
||||||
Update();
|
Update();
|
||||||
return;
|
return;
|
||||||
|
@ -138,14 +142,14 @@ namespace HeavenStudio.Games.Scripts_WorkingDough
|
||||||
{
|
{
|
||||||
SoundByte.PlayOneShotGame("workingDough/bigPlayer");
|
SoundByte.PlayOneShotGame("workingDough/bigPlayer");
|
||||||
SoundByte.PlayOneShotGame("workingDough/hitBigPlayer");
|
SoundByte.PlayOneShotGame("workingDough/hitBigPlayer");
|
||||||
game.doughDudesPlayer.GetComponent<Animator>().Play("BigDoughJump", 0, 0);
|
game.doughDudesPlayer.GetComponent<Animator>().DoScaledAnimationAsync("BigDoughJump", 0.5f);
|
||||||
game.backgroundAnimator.Play("BackgroundFlash", 0, 0);
|
game.backgroundAnimator.Play("BackgroundFlash", 0, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SoundByte.PlayOneShotGame("workingDough/smallPlayer");
|
SoundByte.PlayOneShotGame("workingDough/smallPlayer");
|
||||||
SoundByte.PlayOneShotGame("workingDough/hitSmallPlayer");
|
SoundByte.PlayOneShotGame("workingDough/hitSmallPlayer");
|
||||||
game.doughDudesPlayer.GetComponent<Animator>().Play("SmallDoughJump", 0, 0);
|
game.doughDudesPlayer.GetComponent<Animator>().DoScaledAnimationAsync("SmallDoughJump", 0.5f);
|
||||||
}
|
}
|
||||||
bool hasGandw = false;
|
bool hasGandw = false;
|
||||||
if (gandw != null) hasGandw = gandw.activeSelf;
|
if (gandw != null) hasGandw = gandw.activeSelf;
|
||||||
|
@ -171,7 +175,7 @@ namespace HeavenStudio.Games.Scripts_WorkingDough
|
||||||
{
|
{
|
||||||
currentState = State.Weak;
|
currentState = State.Weak;
|
||||||
startBeat = beat;
|
startBeat = beat;
|
||||||
game.doughDudesPlayer.GetComponent<Animator>().Play("SmallDoughJump", 0, 0);
|
game.doughDudesPlayer.GetComponent<Animator>().DoScaledAnimationAsync("SmallDoughJump", 0.5f);
|
||||||
SoundByte.PlayOneShotGame("workingDough/smallPlayer");
|
SoundByte.PlayOneShotGame("workingDough/smallPlayer");
|
||||||
SoundByte.PlayOneShotGame("workingDough/tooBig");
|
SoundByte.PlayOneShotGame("workingDough/tooBig");
|
||||||
Update();
|
Update();
|
||||||
|
@ -179,7 +183,7 @@ namespace HeavenStudio.Games.Scripts_WorkingDough
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GameObject.Instantiate(game.breakParticleEffect, game.breakParticleHolder);
|
GameObject.Instantiate(game.breakParticleEffect, game.breakParticleHolder);
|
||||||
game.doughDudesPlayer.GetComponent<Animator>().Play("BigDoughJump", 0, 0);
|
game.doughDudesPlayer.GetComponent<Animator>().DoScaledAnimationAsync("BigDoughJump", 0.5f);
|
||||||
SoundByte.PlayOneShotGame("workingDough/bigPlayer");
|
SoundByte.PlayOneShotGame("workingDough/bigPlayer");
|
||||||
SoundByte.PlayOneShotGame("workingDough/tooSmall");
|
SoundByte.PlayOneShotGame("workingDough/tooSmall");
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
|
|
|
@ -365,7 +365,7 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
//Jump and play sound
|
//Jump and play sound
|
||||||
new BeatAction.Action(beat + 0.1f, delegate { arrowSRLeftNPC.sprite = whiteArrowSprite; }),
|
new BeatAction.Action(beat + 0.1f, delegate { arrowSRLeftNPC.sprite = whiteArrowSprite; }),
|
||||||
new BeatAction.Action(beat + 1f, delegate { doughDudesNPC.GetComponent<Animator>().Play(isBig ? "BigDoughJump" :"SmallDoughJump", 0, 0); }),
|
new BeatAction.Action(beat + 1f, delegate { doughDudesNPC.GetComponent<Animator>().DoScaledAnimationAsync(isBig ? "BigDoughJump" :"SmallDoughJump", 0.5f); }),
|
||||||
new BeatAction.Action(beat + 1f, delegate { npcImpact.SetActive(true); }),
|
new BeatAction.Action(beat + 1f, delegate { npcImpact.SetActive(true); }),
|
||||||
new BeatAction.Action(beat + 1.1f, delegate { npcImpact.SetActive(false); }),
|
new BeatAction.Action(beat + 1.1f, delegate { npcImpact.SetActive(false); }),
|
||||||
new BeatAction.Action(beat + 1.9f, delegate { arrowSRRightNPC.sprite = redArrowSprite; }),
|
new BeatAction.Action(beat + 1.9f, delegate { arrowSRRightNPC.sprite = redArrowSprite; }),
|
||||||
|
@ -532,12 +532,12 @@ namespace HeavenStudio.Games
|
||||||
}
|
}
|
||||||
if (PlayerInput.Pressed() && !IsExpectingInputNow(InputType.STANDARD_DOWN))
|
if (PlayerInput.Pressed() && !IsExpectingInputNow(InputType.STANDARD_DOWN))
|
||||||
{
|
{
|
||||||
doughDudesPlayer.GetComponent<Animator>().Play("SmallDoughJump", 0, 0);
|
doughDudesPlayer.GetComponent<Animator>().DoScaledAnimationAsync("SmallDoughJump", 0.5f);
|
||||||
SoundByte.PlayOneShotGame("workingDough/smallPlayer");
|
SoundByte.PlayOneShotGame("workingDough/smallPlayer");
|
||||||
}
|
}
|
||||||
else if (PlayerInput.AltPressed() && !IsExpectingInputNow(InputType.STANDARD_ALT_DOWN))
|
else if (PlayerInput.AltPressed() && !IsExpectingInputNow(InputType.STANDARD_ALT_DOWN))
|
||||||
{
|
{
|
||||||
doughDudesPlayer.GetComponent<Animator>().Play("BigDoughJump", 0, 0);
|
doughDudesPlayer.GetComponent<Animator>().DoScaledAnimationAsync("BigDoughJump", 0.5f);
|
||||||
SoundByte.PlayOneShotGame("workingDough/bigPlayer");
|
SoundByte.PlayOneShotGame("workingDough/bigPlayer");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue