Ejemplo n.º 1
0
 void IRenderManagerInternal.RenderScene(ISceneInternal scene)
 {
     // Draw the active scene's game objects which contain renderable components
     foreach (IGameObject rootGameObject in scene.GameObjects.Where(go => go.IsActive))
     {
         DrawGameObjects(rootGameObject);
     }
 }
Ejemplo n.º 2
0
        internal GameObject(string name, ISceneInternal scene)
        {
            Name = name;
            (this as IGameObjectInternal).Scene = scene;

            // Every GameObject will always have a Transform component by default
            Transform = AddComponent <Transform>();
        }
Ejemplo n.º 3
0
        /// <inheritdoc />
        public override void Draw(GameTime gameTime)
        {
            lock (_currentScenes)
            {
                _currentDrawableScenes.AddRange(_currentScenes);
            }
            for (int i = 0; i < _currentDrawableScenes.Count; i++)
            {
                ISceneInternal scene = _currentDrawableScenes[i];
                if (scene.State == SceneState.Ready && scene.BeginDraw())
                {
                    scene.Draw(gameTime);
                    scene.EndDraw();
                }
            }

            _currentDrawableScenes.Clear();
        }
Ejemplo n.º 4
0
        /// <inheritdoc />
        public override void Update(GameTime gameTime)
        {
            lock (_currentScenes)
            {
                _currentUpdateableScenes.AddRange(_currentScenes);
            }

            for (int i = _currentUpdateableScenes.Count - 1; i >= 0; i--)
            {
                ISceneInternal scene = _currentUpdateableScenes[i];
                if (scene.State == SceneState.Ready && scene.Enabled)
                {
                    scene.Update(gameTime);
                }
            }

            _currentUpdateableScenes.Clear();
        }
Ejemplo n.º 5
0
 static partial void FillBinaryConditionsCustom(MutagenFrame frame, ISceneInternal item)
 {
     ConditionBinaryCreateTranslation.FillConditionsList(item.Conditions, frame);
 }