Properties
- ClientBounds -> returns the dimensions of the window or screen.
- IsActive -> Indicates whether the game is currently the active application.
- IsFixedTimeStep -> Gets or sets a value indicating whether to use fixed time steps.
- TargetElapsedTime -> Gets or sets the target time between calls to Update when IsFixedTimeStep is true
- IsMouseVisible -> Gets or sets a value indicating whether to mouse cursor should be visible
2) Game1 resolutions
//set the desired resolutions
Vector2 screen = new Vector2(640, 480);
if (Use720HD)
screen = new Vector2(1280, 720);
graphics.PreferredBackBufferWidth = (int)screen.X;
graphics.PreferredBackBufferHeight = (int)screen.Y;
graphics.ApplyChanges();
//usable TV resolution is about 90 %
int bx = (int)(screen.X * 0.05);
int by = (int)(screen.Y * 0.05);
workBounds = new Rectangle(bx, by,
(int)screen.X - bx, (int)screen.Y - by);
3) To convert angles in degrees to radians, use the MathHelper.ToRadians method.
4) Layers: value between 0.0f and 1.0f with 1.0f "on top" and 0.0f is "on bottom".
5) Origin parameter: the point around which the rotation occurs. (i.e. for center would be new Vector2(texture.Width/2, texture.Height/2))
3) To convert angles in degrees to radians, use the MathHelper.ToRadians method.
4) Layers: value between 0.0f and 1.0f with 1.0f "on top" and 0.0f is "on bottom".
5) Origin parameter: the point around which the rotation occurs. (i.e. for center would be new Vector2(texture.Width/2, texture.Height/2))
No comments:
Post a Comment