mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-08 18:55:07 +00:00
Rally: Ball tweaks
This commit is contained in:
parent
7ddeffaf34
commit
482a6b532a
3 changed files with 11 additions and 3 deletions
|
@ -280,7 +280,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!4 &4959957736091286558
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -93,6 +93,8 @@ namespace RhythmHeavenMania.Games.RhythmRally
|
|||
whistleBeat = game.targetBeat + 0.5f;
|
||||
}
|
||||
|
||||
game.ball.SetActive(false);
|
||||
|
||||
MultiSound.Play(new MultiSound.Sound[] { new MultiSound.Sound("rhythmRally/Whistle", whistleBeat) });
|
||||
}
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ namespace RhythmHeavenMania.Games.RhythmRally
|
|||
curveHeight = 3f;
|
||||
|
||||
curveToUse.transform.localScale = new Vector3(1f, curveHeight, 1f);
|
||||
ball.transform.position = curveToUse.GetPoint(Mathf.Clamp(curvePosition, 0, 1));
|
||||
ball.transform.position = curveToUse.GetPoint(Mathf.Max(0, curvePosition));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -261,6 +261,9 @@ namespace RhythmHeavenMania.Games.RhythmRally
|
|||
|
||||
public void Serve(float beat, RallySpeed speed)
|
||||
{
|
||||
if (!ball.activeSelf)
|
||||
ball.SetActive(true);
|
||||
|
||||
served = true;
|
||||
missed = false;
|
||||
started = true;
|
||||
|
@ -308,6 +311,9 @@ namespace RhythmHeavenMania.Games.RhythmRally
|
|||
opponentAnim.Play("Ready1");
|
||||
}
|
||||
|
||||
if (!ball.activeSelf)
|
||||
ball.SetActive(true);
|
||||
|
||||
StartCoroutine(TossTrailCo());
|
||||
}
|
||||
|
||||
|
@ -337,7 +343,7 @@ namespace RhythmHeavenMania.Games.RhythmRally
|
|||
{
|
||||
playerAnim.Play("Pose", 0, 0);
|
||||
opponentAnim.Play("Pose", 0, 0);
|
||||
ball.gameObject.SetActive(false); // temporary solution, should realistically just fall down
|
||||
ball.SetActive(false); // temporary solution, should realistically just fall down
|
||||
inPose = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue