public BattleActionScriptContainer(AICharacter aiChar, BattleActionScriptContainerData scriptContainerData) { _dictOfBattleActionScripts = new Dictionary <string, BattleActionScript>(); for (int i = 0; i < scriptContainerData.actionScriptDataList.Count; ++i) { BattleActionScriptData scriptData = scriptContainerData.actionScriptDataList[i]; BattleActionScript script = new BattleActionScript(aiChar, this, scriptData); _dictOfBattleActionScripts.Add(script.Id, script); } }
public static BattleAction GetBattleAction(AICharacter aiChar, BattleActionScript script, BattleActionData data) { switch (data.type) { case TYPE.PLAY_ANIM: return(new BattleActionPlayAnim(aiChar, script, data as BattleActionPlayAnimData)); } Debug.LogWarning("Invalid BattleActionData type detected: " + data.type); return(null); }
public BattleActionScript(AICharacter aiChar, BattleActionScriptContainer scriptContainer, BattleActionScriptData actionScriptData) { _scriptContainer = scriptContainer; _actionScriptData = actionScriptData; _speed = actionScriptData.speed; _listOfBattleActions = new List <BattleAction>(); for (int i = 0; i < actionScriptData.listOfActionData.Count; ++i) { BattleAction battleAction = BattleActionTypes.GetBattleAction(aiChar, this, actionScriptData.listOfActionData[i]); _listOfBattleActions.Add(battleAction); } }
public void Init(AICharacter aiCharacter) { _aiCharacter = aiCharacter; if (SteeringManager.Instance.IsInitialized) { OnReadyToRegister(); } else { SteeringManager.Instance.OnInitialized += OnReadyToRegister; } }
override public void Init(AICharacter aiCharacter) { base.Init(aiCharacter); if (BTreeManager.Instance.IsInitialized) { OnReadyToRegister(); } else { BTreeManager.Instance.OnInitialized += OnReadyToRegister; } }
public BattleAction(AICharacter aiChar, BattleActionScript actionScript, BattleActionData actionData) { _aiCharacter = aiChar; _actionScript = actionScript; _actionData = actionData; }
public BattleActionPlayAnim(AICharacter aiChar, BattleActionScript actionScript, BattleActionPlayAnimData actionPlayAnimData) : base(aiChar, actionScript, actionPlayAnimData) { _data = actionPlayAnimData; }
public void Init(AICharacter aiCharacter) { BattleActionScriptContainerData scriptContainerData = new BattleActionScriptContainerData(scriptContainerPath); _scriptContainer = new BattleActionScriptContainer(aiCharacter, scriptContainerData); }
virtual public void Init(AICharacter aiCharacter) { _aiCharacter = aiCharacter; }