public void SetupAndMove(Transform muzzle) { if (!animator) { animator = GetComponent <Animator>(); } if (!bound) { bound = GetComponent <BoundToScreen>(); } transform.position = muzzle.position; transform.rotation = muzzle.rotation; Move(muzzle.right); }
void Awake() { rigidBody = GetComponent <Rigidbody2D>(); boundsController = GetComponent <BoundToScreen>(); defaultScale = transform.localScale; }