private float stateCheckCD; //cooldown for state checking //private EnemyState state; // Start is called before the first frame update private void Start() { strategicEnemy = FindObjectOfType <StrategicEnemyHandler>(); agent = GetComponent <NavMeshAgent>(); animator = GetComponent <Animator>(); weaponManager = GetComponent <WeaponManager>(); entity = GetComponent <Entity>(); entity.SetUp(); sqrDetectionRange = detectionRange * detectionRange; }
private void Awake() { instance = this; }