Exemplo n.º 1
0
        /// <summary>
        /// Called when the State's Camera needs to be (re)initialized.
        /// </summary>
        public virtual void InitializeCamera()
        {
            var o = Camera;
            Camera = new Camera(Game.DefaultView);

            if (o != null)
            {
                // Restore old positions. Fixes an issue with smooth cameras and window resizing
                Camera.Position = o.Position;
                Camera.ActualPosition = o.ActualPosition;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Called when the State's Camera needs to be (re)initialized.
 /// </summary>
 public virtual void InitializeCamera()
 {
     Camera = new Camera(Game.DefaultView);
 }