void Start() { PM = GameObject.FindObjectOfType <PlayerMini>(); bulletKeep = KeepMax; }
void Start() { rb = GetComponent <Rigidbody2D>(); SoundManagerScript.PlaySound(SoundManagerScript.EnemyBullet); player = GameObject.FindGameObjectWithTag("Player_Mini").transform; if (player != null) { PM = GameObject.FindObjectOfType <PlayerMini>(); } targetDirection = (PM.transform.position - transform.position).normalized * speed; rb.velocity = new Vector2(targetDirection.x, targetDirection.y); }
public bool equalsMini(PlayerMini other) { return (this.pId == other.pId && this.pType == other.pType); }