Example #1
0
        /// <summary>
        /// Constructs an engine loader with the given parameters using the default admin and default storages
        /// </summary>
        /// <param name="targetLogicFrameLength">the frame length in seconds of logic updates which the engine will attempt to keep</param>
        /// <param name="targetMaxRenderFrameLength">the frame length in seconds of render updates which the engine will try to stay below</param>
        /// <param name="componentTypePagePower">the size of component type pages as a power of 2</param>
        /// <param name="componentTypePageCount">the number of component type pages to start with, this can affect memory and performance</param>
        /// <param name="systemPagePower">the size of system pages as a power of 2</param>
        /// <param name="systemPageCount">the number of system pages to start with, this can affect memory and performance</param>
        /// <param name="entityPagePower">the size of entity pages as a power of 2</param>
        /// <param name="entityPageCount">the number of entity pages to start with, this can affect memory and performance</param>
        /// <param name="entityComponentPagePower">the size of entity-component link pages as a power of 2</param>
        /// <param name="entityComponentPageCount">the number of entity-component link pages to start with, this can affect memory and performance</param>
        protected EngineLoader(float targetLogicFrameLength = 1f / 60f, float targetMaxRenderFrameLength = 1f / 30f,
                               int componentTypePagePower   = 8, int componentTypePageCount = 1, int systemPagePower   = 8, int systemPageCount          = 1,
                               int entityPagePower          = 8, int entityPageCount = 1, int entityComponentPagePower = 8, int entityComponentPageCount = 1)
        {
            IComponentTypeRegistry registry = new ComponentTypeRegistry(componentTypePagePower, componentTypePageCount);

            Admin = new EntityAdmin(targetLogicFrameLength, targetMaxRenderFrameLength, registry,
                                    new SystemRegistry(systemPagePower, systemPageCount), new EntityBuffer(registry, 47, 47, entityPagePower, entityComponentPagePower, entityPagePower, systemPagePower,
                                                                                                           entityPageCount, entityComponentPageCount, entityPageCount, systemPageCount));
        }
Example #2
0
 public AdminInterfaceCities()
 {
     EntityAdmin = new CityAdmin();
 }
 public AdminInterfaceCountries()
 {
     EntityAdmin = new CountryAdmin();
 }
Example #4
0
 public AdminInterfacePictures()
 {
     EntityAdmin = new PictureAdmin();
 }
Example #5
0
 /// <summary>
 /// Sets the Admin field so that this system has access to the admin
 /// </summary>
 /// <param name="admin">the admin controlling this system</param>
 public void SetAdmin(IEntityAdmin admin)
 {
     Admin = admin;
 }
 public AdminInterfaceTours()
 {
     EntityAdmin = new TourAdmin();
 }
Example #7
0
 public AdminInterfaceHotels()
 {
     EntityAdmin = new HotelAdmin();
 }
Example #8
0
 /// <summary>
 /// Construct an engine loader with the given admin
 /// </summary>
 /// <param name="admin">The admin to run this engine instance</param>
 protected EngineLoader(IEntityAdmin admin)
 {
     Admin = admin;
 }
Example #9
0
 /// <summary>
 /// Constructs an engine loader with the given parameters using the default admin
 /// </summary>
 /// <param name="targetLogicFrameLength">the frame length in seconds of logic updates which the engine will attempt to keep</param>
 /// <param name="targetMaxRenderFrameLength">the frame length in seconds of render updates which the engine will try to stay below</param>
 /// <param name="componentTypeRegistry">the component type registry to use to store component types</param>
 /// <param name="systemRegistry">the system registry to store systems</param>
 /// <param name="entityBuffer">the entity buffer to use to store entities</param>
 protected EngineLoader(IComponentTypeRegistry componentTypeRegistry,
                        ISystemRegistry systemRegistry, IEntityBuffer entityBuffer, float targetLogicFrameLength = 1f / 60f, float targetMaxRenderFrameLength = 1f / 30f)
 {
     Admin = new EntityAdmin(targetLogicFrameLength, targetMaxRenderFrameLength, componentTypeRegistry, systemRegistry, entityBuffer);
 }
Example #10
0
 public AdminInterfaceAttractions()
 {
     EntityAdmin = new AttractionAdmin();
 }