/// <summary> /// Called when instatiated /// </summary> public override void Load() { m_Steering = GetComponent <Steering2D>(); m_DataCubeBehavoirs = new Dictionary <DataCubeMode, BehaviorEnum>(); m_Tasks = new Dictionary <DataCubeMode, DataCubeTask>(); m_DataCubeBehavoirs.Add(DataCubeMode.Idle, EnitiyManager.instance.DataCubeSettings.m_IdleBehavoir); m_DataCubeBehavoirs.Add(DataCubeMode.SearchForMemory, EnitiyManager.instance.DataCubeSettings.m_SearchForMemoryBehavoir); m_DataCubeBehavoirs.Add(DataCubeMode.SearchForProcessorTree, EnitiyManager.instance.DataCubeSettings.m_SearchForProssecorTreeBehavoir); m_DataCubeBehavoirs.Add(DataCubeMode.RunFromEnemys, EnitiyManager.instance.DataCubeSettings.m_RunFromEnemyBehavoir); m_Tasks.Add(DataCubeMode.Idle, CheckIdle); m_Tasks.Add(DataCubeMode.SearchForMemory, CheckSearchForMemory); m_Tasks.Add(DataCubeMode.SearchForProcessorTree, CheckForProssecor); m_Tasks.Add(DataCubeMode.RunFromEnemys, RunFormEnemy); OnSpawn.AddListener(StartAllCoroutines); OnPool.AddListener(SetDead); OnPool.AddListener(Stop); m_DataCubeUI = GetComponentInChildren <DataCubeUI>(); m_DataCubeUI.SetBrain(this); UpdateDataCubeBehavoir(); }
public override void Load() { OnSpawn.AddListener(StartAllCoroutine); }