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(); }
internal static void SetupCamera(Camera cameraToSetUp, Microsoft.Xna.Framework.GraphicsDeviceManager graphicsDeviceManager) { CameraSetup.graphicsDeviceManager = graphicsDeviceManager; ResetWindow(); ResetCamera(cameraToSetUp); FlatRedBall.FlatRedBallServices.GraphicsOptions.SizeOrOrientationChanged += HandleResolutionChange; }
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); }
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); }
protected virtual void InitializeEntity(bool addToManagers) { // Generated Initialize LoadStaticContent(ContentManagerName); CameraInstance = FlatRedBall.SpriteManager.Camera; PostInitialize(); if (addToManagers) { AddToManagers(null); } }
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; }
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); } }
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) { }