Example #1
0
 public void Update()
 {
     _lastAttack += Time.deltaTime;
     if (gm.isGameOver() == true)
     {
         Destroy(this.gameObject);
     }
     else
     {
         move();
     }
     if (_lastAttack >= frequence && enemy != null)
     {
         _lastAttack = 0;
         if (enemy.GetDamage(damage) == true)
         {
             enemy = null;
         }
     }
 }