public Input_AI_Expand(Input_AI input, IBattleField battlefield, CharController_Direct _self, FB.FFSM.AI_StateTable table, AILevel aiLevel) { this.selfCC = _self; this.battlefield = battlefield; this.input = input; this.aiLevel = aiLevel; this.ai_table = table; //ai改变属性 AILevelChange(); vIdlePos = (battlefield as BattleField).GetRealChar(selfCC.idCare).transform.position; enemyCC = battlefield.GetAllCCBySide(1)[0] as CharController_Direct; //enemyCC.SetCCLife(0); stateTable = (battlefield as BattleField).GetRealChar(selfCC.idCare).transform.GetComponent <FB.FFSM.com_FightFSM>().stateTable; Start(); ChangeState(StateMachine.idle); ai_attackstate_map = new Dictionary <int, List <AI_StateItem> >(); for (int i = 0; i <= 3; i++) { ai_attackstate_map[i] = new List <AI_StateItem>();//0 移动系列 } if (ai_table == null || ai_table.allstates == null) { return; } foreach (var a in ai_table.allstates) { ai_attackstate_map[a.attacktype].Add(a); } }
public void Init(IBattleField battlefield, CharController_Direct _self, Input_AI_Expand.AILevel ailevel) { // curState = ; curState = new Command(Vector2.zero, PadButton.None); ai_expand = new Input_AI_Expand(this, battlefield, _self, _self.fightFSM.aiStateTable, ailevel); }