/// <summary> /// Records the current state of the world from the perspective of a Character /// </summary> public void Observe(Character character, int gameTick, NavMeshContainer nav, AgentCommandType usedAction) { agentPosition = character.transform.position; tick = gameTick; didNothing = usedAction == AgentCommandType.DONOTHING; entities.Clear(); AddAllVisibleObjects(character); navMeshIndices = GetAllVisibleVertexIndices(character, nav); }
public static Observation FromCharacter(string agentID, Character character, int gameTick, NavMeshContainer nav, AgentCommandType usedAction) { Observation obs = new Observation(agentID); obs.Observe(character, gameTick, nav, usedAction); return(obs); }