コード例 #1
0
    private float CalculateScore()
    {
        //TODO, call the function in the blackboard instead of calculating here....
        globalEnergy = 0;
        foreach (Agent agent in unitCommander.GetAgents())
        {
            globalEnergy += agent.energy;
        }
        globalEnergy = globalEnergy / unitCommander.GetAgents().Count;

        return(globalEnergy);
    }