本文整理汇总了C#中DisplayOrientation类的典型用法代码示例。如果您正苦于以下问题:C# DisplayOrientation类的具体用法?C# DisplayOrientation怎么用?C# DisplayOrientation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DisplayOrientation类属于命名空间,在下文中一共展示了DisplayOrientation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateScreen
protected override void UpdateScreen(GameTime gameTime, DisplayOrientation displayOrientation)
{
if (input.CheckMousePress(ScreenRectangle))
{
changeScreenDelegate(ScreenState.Title);
}
}
示例2: DrawScreen
protected override void DrawScreen(SpriteBatch batch, DisplayOrientation screenOrientation)
{
Globals.map.Draw(batch);
Globals.Mobs.Draw(batch);
player.Draw(batch);
HUDPlayerInfo.Draw(batch);
}
示例3: DrawScreen
protected override void DrawScreen(SpriteBatch batch, DisplayOrientation displayOrientation)
{
background.Draw(batch);
batch.Draw(optionsText, new Rectangle(0, 0, ScreenWidth, ScreenHeight), Color.White);
fullscreenButton.Draw(batch);
backButton.Draw(batch);
}
示例4: UpdateScreen
protected override void UpdateScreen(GameTime gameTime, DisplayOrientation displayOrientation)
{
if (input.CheckMousePress(gameButton))
{
changeScreenDelegate(ScreenState.Gameplay);
}
}
示例5: GetOrientation
private Orientation GetOrientation(DisplayOrientation xnaOrientation)
{
Orientation = xnaOrientation == DisplayOrientation.LandscapeLeft ||
xnaOrientation == DisplayOrientation.LandscapeRight
? Orientation.Landscape : Orientation.Portrait;
return Orientation;
}
示例6: GraphicsDeviceManager
public GraphicsDeviceManager(Game game)
{
if (game == null)
{
throw new ArgumentNullException("The game cannot be null!");
}
this.game = game;
supportedOrientations = DisplayOrientation.Default;
PreferredBackBufferHeight = DefaultBackBufferHeight;
PreferredBackBufferWidth = DefaultBackBufferWidth;
PreferredBackBufferFormat = SurfaceFormat.Color;
PreferredDepthStencilFormat = DepthFormat.Depth24;
SynchronizeWithVerticalRetrace = true;
if (game.Services.GetService(typeof(IGraphicsDeviceManager)) != null)
{
throw new ArgumentException("Graphics Device Manager Already Present");
}
game.Services.AddService(typeof(IGraphicsDeviceManager), this);
game.Services.AddService(typeof(IGraphicsDeviceService), this);
}
示例7: DrawScreen
protected override void DrawScreen(SpriteBatch spriteBatch, DisplayOrientation screenOrientation)
{
background.Draw(spriteBatch);
road.Draw(spriteBatch);
car.Draw(spriteBatch);
hazards.Draw(spriteBatch);
}
示例8: DrawScreen
protected override void DrawScreen(SpriteBatch spriteBatch, DisplayOrientation screenOrientation)
{
background.Draw(spriteBatch);
titleText.Draw(spriteBatch);
startButton.Draw(spriteBatch);
exitButton.Draw(spriteBatch);
}
示例9: ScreenConfig
public ScreenConfig()
{
// set defaults.
this.Width = 0; // make default resolution 0x0, so that it'll be only set if a platform requires so and sets the values - otherwise the system default will be used.
this.Height = 0;
this.IsFullScreen = false;
this.SupportedOrientations = DisplayOrientation.Default;
}
示例10: DrawScreen
protected override void DrawScreen(SpriteBatch batch, DisplayOrientation displayOrientation)
{
background.Draw(batch);
batch.Draw(titleText, new Rectangle(0, 0, ScreenWidth, ScreenHeight), Color.White);
gameButton.Draw(batch);
optionsButton.Draw(batch);
exitButton.Draw(batch);
}
示例11: UpdateScreen
protected override void UpdateScreen(GameTime gameTime, DisplayOrientation screenOrientation)
{
road.Update(gameTime);
car.Update(gameTime);
hazards.Update(gameTime, car, HandleCarCollision);
if (previousHazardCount != hazards.HazardCount)
{
soundEffects.PlaySound("SoundEffects/HazardPass");
previousHazardCount = hazards.HazardCount;
}
}
示例12: UpdateScreen
protected override void UpdateScreen(GameTime gameTime, DisplayOrientation displayOrientation)
{
if(input.CheckMousePress(fullscreenButton))
{
graphics.ToggleFullScreen();
}
if(input.CheckMousePress(backButton))
{
changeScreenDelegate(ScreenState.Title);
}
}
示例13: UpdateScreen
protected override void UpdateScreen(GameTime gameTime, DisplayOrientation screenOrientation)
{
if (input.IsPressed(ActionStart))
{
soundEffects.PlaySound("SoundEffects/Select");
changeScreenDelegate(ScreenState.MainGame);
}
else if (input.IsPressed(ActionExit))
{
soundEffects.PlaySound("SoundEffects/Select");
changeScreenDelegate(ScreenState.Exit);
}
}
示例14: GetReading
public static AccelerometerReading GetReading(DisplayOrientation orientation)
{
if (orientation == DisplayOrientation.Portrait)
{
return new AccelerometerReading(state,timeStamp);
}
var landLeft = new Vector3(-state.Y, state.X, state.Z);
if (orientation == DisplayOrientation.LandscapeLeft || orientation == DisplayOrientation.Default)
{
return new AccelerometerReading(landLeft, timeStamp);
}
return new AccelerometerReading(landLeft,timeStamp );
}
示例15: Monitor
public Monitor(double left, double top, double width, double height, DisplayOrientation orientation)
: base("Monitor", new Size(width, height))
{
Top = top;
Left = left;
Width = width;
Height = height;
_orientation = orientation;
if (Top == 0 && Left == 0)
{
_fillBackground = false;
}
}