// Start is called before the first frame update private void Start() { monsterMovement = GetComponent <MonsterMovement>(); monsterAudioManager = GetComponent <MonsterAudioManager>(); monsterStateGoToSound = GetComponent <MonsterStateGoToSound>(); monsterStateGoToSound.OnExitState += ExitStateGoToSound; monsterStateInvestigatePoint = GetComponent <MonsterStateInvestigate>(); monsterStateInvestigatePoint.OnExitState += ExitStateInvestigatePoint; monsterStateWander = GetComponent <MonsterStateWander>(); monsterStateWander.EnterState(); currentState = MonsterState.Wander; }
void Awake() { inst = this; // Setup singleton }