Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GameConnections{TCitizen}"/> class.
 /// </summary>
 /// <param name="timeInfo">An object that provides the game time information.</param>
 /// <param name="citizenConnection">A proxy object that provides a way to call the game-specific methods of the <see cref="Citizen"/> struct.</param>
 /// <param name="citizenManager">A proxy object that provides a way to call the game-specific methods of the <see cref="global::CitizenManager"/> class.</param>
 /// <param name="buildingManager">A proxy object that provides a way to call the game-specific methods of the <see cref="global::BuildingManager"/> class.</param>
 /// <param name="simulationManager">A proxy object that provides a way to call the game-specific methods of the <see cref="global::SimulationManager"/> class.</param>
 /// <param name="transferManager">A proxy object that provides a way to call the game-specific methods of the <see cref="global::TransferManager"/> class.</param>
 public GameConnections(
     ITimeInfo timeInfo,
     ICitizenConnection <TCitizen> citizenConnection,
     ICitizenManagerConnection citizenManager,
     IBuildingManagerConnection buildingManager,
     ISimulationManagerConnection simulationManager,
     ITransferManagerConnection transferManager)
 {
     TimeInfo          = timeInfo ?? throw new ArgumentNullException(nameof(timeInfo));
     CitizenConnection = citizenConnection ?? throw new ArgumentNullException(nameof(citizenConnection));
     CitizenManager    = citizenManager ?? throw new ArgumentNullException(nameof(citizenManager));
     BuildingManager   = buildingManager ?? throw new ArgumentNullException(nameof(buildingManager));
     SimulationManager = simulationManager ?? throw new ArgumentNullException(nameof(simulationManager));
     TransferManager   = transferManager ?? throw new ArgumentNullException(nameof(transferManager));
 }
 public RealTimeEventManager(
     RealTimeConfig config,
     ICityEventsProvider eventProvider,
     IEventManagerConnection eventManager,
     IBuildingManagerConnection buildingManager,
     ISimulationManagerConnection simulationManager,
     ITimeInfo timeInfo)
 {
     this.config            = config ?? throw new ArgumentNullException(nameof(config));
     this.eventProvider     = eventProvider ?? throw new ArgumentNullException(nameof(eventProvider));
     this.eventManager      = eventManager ?? throw new ArgumentNullException(nameof(eventManager));
     this.buildingManager   = buildingManager ?? throw new ArgumentNullException(nameof(buildingManager));
     this.simulationManager = simulationManager ?? throw new ArgumentNullException(nameof(simulationManager));
     this.timeInfo          = timeInfo ?? throw new ArgumentNullException(nameof(timeInfo));
     upcomingEvents         = new LinkedList <ICityEvent>();
 }