mirror of
https://github.com/ConjureETS/PixelSphinx.git
synced 2026-03-25 19:10:58 +00:00
fixed ejecting failing because of stun
This commit is contained in:
parent
bca04d6125
commit
076c8daf55
@ -250,11 +250,14 @@ public class Astronaut : MonoBehaviour {
|
||||
/// A character is stunned when hit by asteroid.
|
||||
/// </summary>
|
||||
public void Stun()
|
||||
{
|
||||
if (State < AstronautState.Ejecting)
|
||||
{
|
||||
State = AstronautState.Stun;
|
||||
StartCoroutine(StunTimeout());
|
||||
_astronautAnimator.Stun();
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator StunTimeout()
|
||||
{
|
||||
@ -262,9 +265,12 @@ public class Astronaut : MonoBehaviour {
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
if (State < AstronautState.Ejecting)
|
||||
{
|
||||
State = AstronautState.Idle;
|
||||
_astronautAnimator.Idle();
|
||||
}
|
||||
}
|
||||
|
||||
public void OnGUI()
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user