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);
     }
 }
예제 #2
0
        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);
        }
예제 #3
0
        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);
            }
        }
예제 #4
0
        public void Init(AICharacter aiCharacter)
        {
            _aiCharacter = aiCharacter;

            if (SteeringManager.Instance.IsInitialized)
            {
                OnReadyToRegister();
            }
            else
            {
                SteeringManager.Instance.OnInitialized += OnReadyToRegister;
            }
        }
예제 #5
0
        override public void Init(AICharacter aiCharacter)
        {
            base.Init(aiCharacter);

            if (BTreeManager.Instance.IsInitialized)
            {
                OnReadyToRegister();
            }
            else
            {
                BTreeManager.Instance.OnInitialized += OnReadyToRegister;
            }
        }
예제 #6
0
 public BattleAction(AICharacter aiChar, BattleActionScript actionScript, BattleActionData actionData)
 {
     _aiCharacter  = aiChar;
     _actionScript = actionScript;
     _actionData   = actionData;
 }
예제 #7
0
 public BattleActionPlayAnim(AICharacter aiChar, BattleActionScript actionScript, BattleActionPlayAnimData actionPlayAnimData) : base(aiChar, actionScript, actionPlayAnimData)
 {
     _data = actionPlayAnimData;
 }
예제 #8
0
        public void Init(AICharacter aiCharacter)
        {
            BattleActionScriptContainerData scriptContainerData = new BattleActionScriptContainerData(scriptContainerPath);

            _scriptContainer = new BattleActionScriptContainer(aiCharacter, scriptContainerData);
        }
예제 #9
0
 virtual public void Init(AICharacter aiCharacter)
 {
     _aiCharacter = aiCharacter;
 }