// Start is called before the first frame update void Start() { isDead = false; _animator = gameObject.GetComponent <Animator>(); _patrol = gameObject.GetComponentInChildren <Patrol>(); // _slashEffect = GetComponentInChildren<ParticleSystem>(); }
// Start is called before the first frame update void Start() { _lightCoroutine = true; _collider = GetComponent <PolygonCollider2D>(); _collider.points = new Vector2[4]; _patrol = gameObject.GetComponentInParent <Patrol>(); _originalSpeed = _patrol.speed; _playerDetected = false; _playerController = GameManager.instance.player.GetComponent <PlayerController>(); _controller = gameObject.GetComponentInParent <EnemyController>(); }