Esempio n. 1
0
        public Scene(int bufferWidth, int bufferHeight)
            : base(GameBase.Instance)
        {
            DeactivationHandler = null;
            DoNotUseBackBuffer = true;

            _spriteBatch = null;
            _renderController = new RenderController();

            _status = Status.Inactive;
            _transitionTimer = new Timer("scene.transitiontimer", HandleTransitionCompletion);

            _nextSceneType = null;

            _backBuffer = null;
            _bufferDimensions = new Point(bufferWidth, bufferHeight);
            _clearColour = Color.Black;
            _bufferTint = Color.Transparent;
            _crossfadeDuration = Default_Crossfade_Duration;
            CrossFadeTextureName = "";

            _gameObjects = new List<IGameObject>();
            _temporaryObjects = new List<ITemporary>();

            GameBase.Instance.Components.Add(this);
            Enabled = false;
            Visible = false;

            GlobalTimerController.GlobalTimer.RegisterUpdateCallback(_transitionTimer.Tick);
        }
Esempio n. 2
0
        public Scene()
            : base(GameBase.Instance)
        {
            DeactivationHandler = null;

            SpriteBatch = null;
            Renderer = new RenderController();
            CurrentState = Status.Inactive;
            ClearColour = Color.Black;
            CrossfadeDuration = Default_Crossfade_Duration;
            CrossFadeTextureName = "";

            _transitionTimer = new Timer("scene.transitiontimer", HandleTransitionCompletion);
            _nextSceneType = null;

            _gameObjects = new List<IGameObject>();
            _temporaryObjects = new List<ITemporary>();

            GameBase.Instance.Components.Add(this);
            Enabled = false;
            Visible = false;

            GlobalTimerController.GlobalTimer.RegisterUpdateCallback(_transitionTimer.Tick);
        }