Esempio n. 1
0
 internal static void ResetCamera(Camera cameraToReset)
 {
     FlatRedBall.Camera.Main.Orthogonal       = true;
     FlatRedBall.Camera.Main.OrthogonalHeight = 600;
     FlatRedBall.Camera.Main.OrthogonalWidth  = 800;
     FlatRedBall.Camera.Main.FixAspectRatioYConstant();
 }
Esempio n. 2
0
 internal static void SetupCamera(Camera cameraToSetUp, Microsoft.Xna.Framework.GraphicsDeviceManager graphicsDeviceManager)
 {
     CameraSetup.graphicsDeviceManager = graphicsDeviceManager;
     ResetWindow();
     ResetCamera(cameraToSetUp);
     FlatRedBall.FlatRedBallServices.GraphicsOptions.SizeOrOrientationChanged += HandleResolutionChange;
 }
Esempio n. 3
0
 internal static void ResetCamera(Camera cameraToReset)
 {
     FlatRedBall.Camera.Main.Orthogonal       = true;
     FlatRedBall.Camera.Main.OrthogonalHeight = 270;
     FlatRedBall.Camera.Main.OrthogonalWidth  = 480;
     FlatRedBall.Camera.Main.FixAspectRatioYConstant();
     SetAspectRatioTo(16 / 9m);
 }
Esempio n. 4
0
 internal static void SetupCamera(Camera cameraToSetUp, Microsoft.Xna.Framework.GraphicsDeviceManager graphicsDeviceManager, int width = 800, int height = 600)
 {
         #if WINDOWS || DESKTOP_GL
     FlatRedBall.FlatRedBallServices.Game.Window.AllowUserResizing = false;
     FlatRedBall.FlatRedBallServices.GraphicsOptions.SetResolution(width, height);
         #elif IOS || ANDROID
     FlatRedBall.FlatRedBallServices.GraphicsOptions.SetFullScreen(FlatRedBall.FlatRedBallServices.GraphicsOptions.ResolutionWidth, FlatRedBall.FlatRedBallServices.GraphicsOptions.ResolutionHeight);
         #elif UWP
     FlatRedBall.FlatRedBallServices.GraphicsOptions.SetResolution(width, height);
         #endif
     ResetCamera(cameraToSetUp);
 }
Esempio n. 5
0
        protected virtual void InitializeEntity(bool addToManagers)
        {
            // Generated Initialize
            LoadStaticContent(ContentManagerName);
            CameraInstance = FlatRedBall.SpriteManager.Camera;

            PostInitialize();
            if (addToManagers)
            {
                AddToManagers(null);
            }
        }
Esempio n. 6
0
 internal static void SetupCamera(Camera cameraToSetUp, Microsoft.Xna.Framework.GraphicsDeviceManager graphicsDeviceManager, int width = 480, int height = 270)
 {
                         #if WINDOWS || DESKTOP_GL
     FlatRedBall.FlatRedBallServices.Game.Window.AllowUserResizing = true;
     FlatRedBall.FlatRedBallServices.GraphicsOptions.SetResolution((int)(width * Scale), (int)(height * Scale));
                         #elif IOS || ANDROID
     FlatRedBall.FlatRedBallServices.GraphicsOptions.SetFullScreen(FlatRedBall.FlatRedBallServices.GraphicsOptions.ResolutionWidth, FlatRedBall.FlatRedBallServices.GraphicsOptions.ResolutionHeight);
                         #elif UWP
                         #endif
     ResetCamera(cameraToSetUp);
     FlatRedBall.FlatRedBallServices.GraphicsOptions.SizeOrOrientationChanged += HandleResolutionChange;
 }
		protected virtual void InitializeEntity(bool addToManagers)
		{
			// Generated Initialize
			LoadStaticContent(ContentManagerName);
			CameraInstance = FlatRedBall.SpriteManager.Camera;
			
			PostInitialize();
			if (addToManagers)
			{
				AddToManagers(null);
			}


		}
Esempio n. 8
0
 internal static void ResetCamera(Camera cameraToReset = null)
 {
     if (cameraToReset == null)
     {
         cameraToReset = FlatRedBall.Camera.Main;
     }
     cameraToReset.Orthogonal = Data.Is2D;
     if (Data.Is2D)
     {
         cameraToReset.OrthogonalHeight = Data.ResolutionHeight;
         cameraToReset.OrthogonalWidth  = Data.ResolutionWidth;
         cameraToReset.FixAspectRatioYConstant();
     }
     if (Data.AspectRatio != null)
     {
         SetAspectRatioTo(Data.AspectRatio.Value);
     }
 }
Esempio n. 9
0
 internal static void ResetCamera(Camera cameraToReset = null)
 {
     if (cameraToReset == null)
     {
         cameraToReset = FlatRedBall.Camera.Main;
     }
     cameraToReset.Orthogonal = Data.Is2D;
     if (Data.Is2D)
     {
         cameraToReset.OrthogonalHeight = Data.ResolutionHeight;
         cameraToReset.OrthogonalWidth  = Data.ResolutionWidth;
         cameraToReset.FixAspectRatioYConstant();
     }
     else
     {
         cameraToReset.UsePixelCoordinates3D(0);
     }
     if (Data.AspectRatio != null)
     {
         SetAspectRatioTo(Data.AspectRatio.Value, Data.DominantInternalCoordinates, Data.ResolutionWidth, Data.ResolutionHeight);
     }
 }
 public virtual void Activity(FlatRedBall.Camera camera)
 {
 }