void CreateAction(JSON js, int actionIndex, string id = "") { BattleActionData actionData = BattleActionTypes.GetBattleActionData(this, js, actionIndex); if (actionData != null) { listOfActionData.Add(actionData); } }
public BattleAction(AICharacter aiChar, BattleActionScript actionScript, BattleActionData actionData) { _aiCharacter = aiChar; _actionScript = actionScript; _actionData = actionData; }
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); }