Exemplo n.º 1
0
 void Update()
 {
     if (gcScript.playerTurn != true)
     {
         if (rgbody2D.velocity.x < Mathf.Abs(.1f) && rgbody2D.velocity.y < Mathf.Abs(.1f))
         {
             awayTime -= Time.deltaTime;
         }
         Debug.Log(awayTime);
         if (awayTime < 0)
         {
             gcScript.endEnemyAction();
         }
     }
 }
Exemplo n.º 2
0
 void Update()
 {
     if (gcScript.playerTurn != true)
     {
         if (rgbody2D.velocity.x < Mathf.Abs(.1f) && rgbody2D.velocity.y < Mathf.Abs(.1f))
         {
             awayTime -= Time.deltaTime;
         }
         if (awayTime < 0)
         {
             gcScript.endEnemyAction();
         }
     }
     if (hScript.health < 1)
     {
         doDeath();
     }
 }