public EyeManager(World world, Agent agent, double eyeAngle) { EyeDepth = ConfigManager.Current.AgentEyeDepth; Agent = agent; World = world; var eyeVector = agent.LookAt.Rotated(eyeAngle); EyeStart = agent.Position; EyeEnd = EyeStart + eyeVector * EyeDepth; }
private static void LogAgentIfNeeded(Agent agent) { // Log the agent's network if (ConfigManager.Current.ShouldLogAgentNeuralNetworks) { FileLogger.Current.Log(agent.Brain.ToString()); } }