// Start is called before the first frame update void Start() { currentState = State.IDLE; player = FindObjectOfType <ShipCon>().gameObject; rb = GetComponent <Rigidbody2D>(); guns = FindObjectOfType <EnemyProjectileManager>(); gunFire = GetComponent <AudioSource>(); }
// Start is called before the first frame update void Start() { rb = GetComponent <Rigidbody2D>(); //rb.AddForce(transform.up * speed); if (rb == null) { Debug.Log("RigidBody ref is null"); } //Fire(); Guns = FindObjectOfType <EnemyProjectileManager>(); }