Exemple #1
0
    public void PrevAgent()
    {
        allFactionAgents = MasterBlackBoard.allGameAgents;

        if (allFactionAgents == null)
        {
            MasterBlackBoard.RefreshAllAgentsList();
        }
        agentCount = allFactionAgents.Count;
        int prevAgentIndex = agentIndex - 1;

        if (prevAgentIndex < 0)
        {
            agentIndex = agentCount - 1;
        }
        else
        {
            agentIndex = prevAgentIndex;
        }
        UpdateAgentUIInfo();
    }
Exemple #2
0
    public void NextAgent()
    {
        MasterBlackBoard.ReadWayPointsFromFile();
        allFactionAgents = MasterBlackBoard.allGameAgents;
        if (allFactionAgents == null)
        {
            MasterBlackBoard.RefreshAllAgentsList();
        }
        agentCount = allFactionAgents.Count;
        int nextAgentIndex = agentIndex + 1;

        if (nextAgentIndex >= agentCount)
        {
            agentIndex = 0;
        }
        else
        {
            agentIndex = nextAgentIndex;
        }
        UpdateAgentUIInfo();
    }