void Start() { movement = GetComponent <EnemyMovment> (); sight = GetComponent <EnemySight> (); weapon = GetComponent <EnemyAttack> (); nearby = GetComponent <EnemyNearby> (); cState = State.Default; movement.ReturnToPatrol(); //Start Patroling prevState = cState; }
private void ToDefault() { if (cState != State.Default) { weapon.Discard(); prevState = cState; cState = State.Default; movement.ReturnToPatrol(); count = 0; } }