void Update() { Path4 <Agent4> path = Planner4 <Agent4> .GetPlanning(actions, agent, actionGoal, -50); Planner4 <Agent4> .pathPool.Recycle(path); //string pathString = ""; //foreach (ActionBase action in path.actions) { // pathString += "->" + action.GetType().Name; //} //Debug.Log("start" + pathString); }
void Start() { agent.hasWeapon = false; agent.bulletNum = 0; agent.killedNum = 0; actions.Add(new ActionPickWeapon4()); actions.Add(new ActionBuyWeapon4()); actions.Add(new ActionBuyBullet4()); actions.Add(new ActionFire4()); actionGoal = new ActionGoal4(); actionGoal.condition = (Agent4 a) => { return(a.killedNum == 2); }; Path4 <Agent4> path = Planner4 <Agent4> .GetPlanning(actions, agent, actionGoal, -50); string pathString = ""; foreach (ActionBase4 <Agent4> action in path.actions) { pathString += "->" + action.GetType().Name; } Debug.Log("start" + pathString); }