private void Awake() { _animator = gameObject.GetComponent <Animator>(); _rb = gameObject.GetComponent <Rigidbody2D>(); patrolBetweenPoints = gameObject.GetComponent <PatrolBetweenPoints>(); }
void Start() { patrolBetweenPoints = gameObject.GetComponent <PatrolBetweenPoints>(); }