public EntityContext(IClientEngine clientEngine, ITime time, IEngineModels engineModels, IRenderer renderer, BaseEntityList <BaseEntity> entityList) { ClientEngine = clientEngine ?? throw new ArgumentNullException(nameof(clientEngine)); Time = time ?? throw new ArgumentNullException(nameof(time)); EngineModels = engineModels ?? throw new ArgumentNullException(nameof(engineModels)); Renderer = renderer ?? throw new ArgumentNullException(nameof(renderer)); Random = new Random(); EntityList = entityList ?? throw new ArgumentNullException(nameof(entityList)); }
public EntityContext( IServerEngine serverEngine, ITime time, IEngineModels engineModels, IMapInfo mapInfo, GameServer gameServer, ServerEntities entities, GamePhysics gamePhysics, BaseEntityList <BaseEntity> entityList) { ServerEngine = serverEngine ?? throw new ArgumentNullException(nameof(serverEngine)); Time = time ?? throw new ArgumentNullException(nameof(time)); EngineModels = engineModels ?? throw new ArgumentNullException(nameof(engineModels)); MapInfo = mapInfo ?? throw new ArgumentNullException(nameof(mapInfo)); Server = gameServer ?? throw new ArgumentNullException(nameof(gameServer)); Entities = entities ?? throw new ArgumentNullException(nameof(entities)); Physics = gamePhysics ?? throw new ArgumentNullException(nameof(gamePhysics)); EntityList = entityList ?? throw new ArgumentNullException(nameof(entityList)); }
public Enumerator(BaseEntityList <TBaseEntity> entityList) { _entityList = entityList ?? throw new ArgumentNullException(nameof(entityList)); Reset(); }