コード例 #1
0
ファイル: AStarEngine.cs プロジェクト: chenyunpet/MyScript
    /**
     * Initialise the A Star machine to run a search
     * @param the Goal we are searching towards
     * @param the Storage which will store the open and closed lists
     * @param the map which will get the neighbours, heuristic/action costs for the search
     */
    public void Setup(AStarGoal _goal, AStarStorage _storage, AStarMap _aStarMap)
    {
        Goal    = _goal;
        Storage = _storage;

        Map = _aStarMap;
        Storage.ResetStorage(Map);
    }
コード例 #2
0
ファイル: AStarEngine.cs プロジェクト: chenyunpet/MyScript
    /**
     * Cleanup
     */

    public void Cleanup()
    {
        Goal    = null;
        Map     = null;
        Storage = null;

        CurrentNode = null;
        Start       = 0;
        End         = 0;
    }
コード例 #3
0
ファイル: GOAPManager.cs プロジェクト: huokele/shadow-gun
    public void Clean()
    {
        AStar.Cleanup();
        AStar = null;

        Map = null;

        Storage = null;

        Goal = null;
    }
コード例 #4
0
    public void Clean()
    {
        AStar.Cleanup();
        AStar = null;

        //mapPlanner->Cleanup();
        Map = null;

        //storage->Cleanup();
        Storage = null;

        //goalPlanner->Cleanup();
        Goal = null;
    }
コード例 #5
0
    public GOAPManager(Agent ai)
    {
        Owner = ai;
        Map   = new AStarGOAPMap();       //Initialise the AStar Planner
        //Map.Initialise(Owner);
        //Map.BuildActionsEffectsTable();//Build the action effects table

        Storage = new AStarStorage();

        Goal = new AStarGOAPGoal();

        AStar = new AStarEngine();

        //AStar.Setup(Goal,Storage,Map);
    }