示例#1
0
 void Update()
 {
     if (transform.parent != null)
     {
         transform.parent = null;
     }
     Renderer.sprite = IsExit ? ExitAnimation.GetNext() : EntryAnimation.GetNext();
     transform.Rotate(0, 0, 100.0f * Time.deltaTime);
 }
    void SetAnimation()
    {
        if (spawn)
        {
            RendererRun.sprite  = AnimationSpawn.GetNext();
            RendererDust.sprite = null;

            spawn = !AnimationSpawn.IsFinished();
        }
        else
        {
            RendererRun.sprite  = AnimationRun.GetNext();
            RendererDust.sprite = AnimationDust.GetNext();
        }
    }
示例#3
0
 void SetAnimation()
 {
     if (GameState.isDead)
     {
         RendererRun.sprite  = AnimationDead.GetNext();
         RendererDust.sprite = null;
     }
     else if (spawn)
     {
         RendererRun.sprite  = AnimationIdle.GetNext();
         RendererDust.sprite = null;
     }
     else
     {
         RendererRun.sprite  = AnimationRun.GetNext();
         RendererDust.sprite = AnimationDust.GetNext();
     }
 }