use of com.microsoft.Malmo.Schemas.AgentHandlers in project malmo by Microsoft.
the class MissionBehaviour method initAgent.
private void initAgent(MissionInit missionInit) {
reset();
AgentHandlers handlerset = missionInit.getMission().getAgentSection().get(missionInit.getClientRole()).getAgentHandlers();
// Instantiate the various handlers:
for (Object handler : handlerset.getAgentMissionHandlers()) createAndAddHandler(handler);
// If this is a multi-agent mission, need to ensure we have a team reward handler
// to receive rewards from other agents.
List<AgentSection> agents = missionInit.getMission().getAgentSection();
if (agents != null && agents.size() > 1)
addHandler(new RewardFromTeamImplementation());
}
Aggregations