Exemple #1
0
 public virtual void Shutdown()
 {
     FlushEntities();
     EntityNetworkManager = null;
     EntitySystemManager.Shutdown();
     EntitySystemManager = null;
     Initialized         = false;
 }
Exemple #2
0
        public void Initialize()
        {
            switch (EngineType)
            {
            case EngineType.Client:
                break;

            case EngineType.Server:
                LoadEntities();
                EntitySystemManager.Initialize();
                Initialized = true;
                InitializeEntities();
                break;
            }
        }
Exemple #3
0
        public EntityManager(EngineType engineType, IEntityNetworkManager entityNetworkManager)
        {
            EngineType = engineType;
            switch (EngineType)
            {
            case EngineType.Client:
                _componentNamespace = "SS14.Client.GameObjects";
                break;

            case EngineType.Server:
                _componentNamespace = "SS14.Server.GameObjects";
                break;
            }
            EntitySystemManager    = new EntitySystemManager(this);
            ComponentFactory       = new ComponentFactory(this, _componentNamespace);
            EntityNetworkManager   = entityNetworkManager;
            ComponentManager       = new ComponentManager();
            EntityTemplateDatabase = new EntityTemplateDatabase(this);
            EntityFactory          = new EntityFactory(EntityTemplateDatabase);
            Clock = 0f;
            Initialize();
        }
Exemple #4
0
 public virtual void Update(float frameTime)
 {
     Clock += frameTime;
     EntitySystemManager.Update(frameTime);
     ProcessEventQueue();
 }