mirror of
https://github.com/ConjureETS/PixelSphinx.git
synced 2026-03-25 11:00:59 +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.
|
/// A character is stunned when hit by asteroid.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Stun()
|
public void Stun()
|
||||||
|
{
|
||||||
|
if (State < AstronautState.Ejecting)
|
||||||
{
|
{
|
||||||
State = AstronautState.Stun;
|
State = AstronautState.Stun;
|
||||||
StartCoroutine(StunTimeout());
|
StartCoroutine(StunTimeout());
|
||||||
_astronautAnimator.Stun();
|
_astronautAnimator.Stun();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
IEnumerator StunTimeout()
|
IEnumerator StunTimeout()
|
||||||
{
|
{
|
||||||
@ -262,9 +265,12 @@ public class Astronaut : MonoBehaviour {
|
|||||||
{
|
{
|
||||||
yield return null;
|
yield return null;
|
||||||
}
|
}
|
||||||
|
if (State < AstronautState.Ejecting)
|
||||||
|
{
|
||||||
State = AstronautState.Idle;
|
State = AstronautState.Idle;
|
||||||
_astronautAnimator.Idle();
|
_astronautAnimator.Idle();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void OnGUI()
|
public void OnGUI()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user