コード例 #1
0
 IEnumerator DisableEffect(float duration, Prototype_Enemy.CollisionAction action)
 {
     yield return new WaitForSeconds(duration);
     if (ActiveEffect == action)
     {
         Prototype_Stage.BaseSpeed = Level.Speed;
         ActiveEffect = Prototype_Enemy.CollisionAction.None;
     }
 }
コード例 #2
0
 public void SetSpeed()
 {
     if (ActiveEffect == Prototype_Enemy.CollisionAction.None || ActiveEffect != Prototype_Enemy.CollisionAction.Speed)
     {
         Prototype_Stage.BaseSpeed = Level.Speed * 2f;
         StartCoroutine(DisableEffect(1.5f, Prototype_Enemy.CollisionAction.Speed));
         ActiveEffect = Prototype_Enemy.CollisionAction.Speed;
         Debug.Log("SPEED");
     }
 }
コード例 #3
0
 public void SetSpeed()
 {
     if (ActiveEffect == Prototype_Enemy.CollisionAction.None || ActiveEffect != Prototype_Enemy.CollisionAction.Speed)
     {
         Prototype_Stage.BaseSpeed = Level.Speed * 2f;
         StartCoroutine(DisableEffect(1.5f, Prototype_Enemy.CollisionAction.Speed));
         ActiveEffect = Prototype_Enemy.CollisionAction.Speed;
         Debug.Log("SPEED");
     }
 }
コード例 #4
0
    IEnumerator DisableEffect(float duration, Prototype_Enemy.CollisionAction action)
    {
        yield return(new WaitForSeconds(duration));

        if (ActiveEffect == action)
        {
            Prototype_Stage.BaseSpeed = Level.Speed;
            ActiveEffect = Prototype_Enemy.CollisionAction.None;
        }
    }