コード例 #1
0
ファイル: testAI.cs プロジェクト: TonyDongGuaPi/joework
    public void MakeFSM()
    {
        //List<Node> tempPath = GetComponent<FindPath>().GetFinalPath(this.gameObject, target);
        List <Node> tempPath = myAxing.GetFinalPath(this.gameObject, target);

        follow = new FollowPathState();
        follow.SetWayPoints(tempPath);
        follow.AddTransition(Transition.SeePlayerTrans, StateID.ChaseingplayerId);

        chase = new ChasePlayerState();
        chase.AddTransition(Transition.LosePlayerTrans, StateID.FollowPathId);

        fsm = new FSM_Manager();
        fsm.AddFsmState(follow);
        fsm.AddFsmState(chase);

        //SetTransition(Transition.LosePlayerTrans);
    }