public void GetHelp() { if (hp <= nowhp) { ChangeDirection(); gt.GetThings(transform.position + moveDirection * 3, Random.Range(0, 3)); nowhp -= 500; } }
public void LoseThing() { if (hp <= nowhp) { getPosition = transform.position + rightOrLeft * 3; rightOrLeft = -rightOrLeft; gt.GetThings(getPosition, Random.Range(0, 3)); nowhp -= 500; } }
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); }