void Start() { RotationModule = GetComponent <RotationModule_Enemy>(); AttackModule = GetComponent <AttackModule_Enemy>(); HealthController = GetComponent <HealthController>(); HealthController.OnDie += Die; SetState(new IdleState(this)); }
protected void Start() { RotationModule = GetComponent <RotationModule_Enemy>(); MovementModule = GetComponent <MovementModule_Navigation>(); AttackModule = GetComponent <AttackModule_Enemy>(); HealthController = GetComponent <HealthController>(); if (HealthController) { HealthController.OnDie += Die; } if (currentState == null) { SetState(new InativeState(this)); } }