Пример #1
0
 public void Enter(GameObjectList gameObjects)
 {
     foreach (var system in _enterSystems)
     {
         system.Method(system.RequiredComponents.Length == 0
             ? gameObjects
             : gameObjects.All(system.RequiredComponents));
     }
 }
Пример #2
0
        public void Exit(GameObjectList gameObjects)
        {
            foreach (var system in _exitSystems)
            {
                system.Method(system.RequiredComponents.Length == 0
                    ? gameObjects
                    : gameObjects.All(system.RequiredComponents));
            }

            ClearSubScenes(gameObjects);
        }
Пример #3
0
        public void Draw(GameTime gameTime, GameObjectList gameObjects)
        {
            foreach (var system in _drawSystems)
            {
                system.Method(gameTime,
                              system.RequiredComponents.Length == 0
                        ? gameObjects
                        : gameObjects.All(system.RequiredComponents));
            }

            foreach (var subScene in _subScenes)
            {
                subScene.Draw(gameTime, gameObjects);
            }
        }