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(); }
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(); }