Пример #1
0
 public void GetHelp()
 {
     if (hp <= nowhp)
     {
         ChangeDirection();
         gt.GetThings(transform.position + moveDirection * 3, Random.Range(0, 3));
         nowhp -= 500;
     }
 }
Пример #2
0
 public void LoseThing()
 {
     if (hp <= nowhp)
     {
         getPosition = transform.position + rightOrLeft * 3;
         rightOrLeft = -rightOrLeft;
         gt.GetThings(getPosition, Random.Range(0, 3));
         nowhp -= 500;
     }
 }
Пример #3
0
 public void Die()
 {
     GetComponent <Collider2D>().enabled = false;
     if (FlyUI.scoreAdd != null)
     {
         FlyUI.scoreAdd(enemyScore);
     }
     GetEnemy.Instance.enemys.Remove(this);
     gt.GetThings(transform.position, Random.Range(0, 10));
     Destroy(this.gameObject);
 }