当前位置: 首页>>代码示例>>C#>>正文


C# DisplayOrientation类代码示例

本文整理汇总了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);
     }
 }
开发者ID:chillerman91,项目名称:GameAiChrisDaniel,代码行数:7,代码来源:Gamewin.cs

示例2: DrawScreen

 protected override void DrawScreen(SpriteBatch batch, DisplayOrientation screenOrientation)
 {
     Globals.map.Draw(batch);
     Globals.Mobs.Draw(batch);
     player.Draw(batch);
     HUDPlayerInfo.Draw(batch);
 }
开发者ID:chillerman91,项目名称:GameAiChrisDaniel,代码行数:7,代码来源:Gameplay.cs

示例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);
 }
开发者ID:chillerman91,项目名称:GameAiChrisDaniel,代码行数:7,代码来源:Options.cs

示例4: UpdateScreen

 protected override void UpdateScreen(GameTime gameTime, DisplayOrientation displayOrientation)
 {
     if (input.CheckMousePress(gameButton))
     {
         changeScreenDelegate(ScreenState.Gameplay);
     }
 }
开发者ID:chillerman91,项目名称:GameAiChrisDaniel,代码行数:7,代码来源:Title.cs

示例5: GetOrientation

		private Orientation GetOrientation(DisplayOrientation xnaOrientation)
		{
			Orientation = xnaOrientation == DisplayOrientation.LandscapeLeft ||
				xnaOrientation == DisplayOrientation.LandscapeRight
				? Orientation.Landscape : Orientation.Portrait;
			return Orientation;
		}
开发者ID:caihuanqing0617,项目名称:DeltaEngine.Xna,代码行数:7,代码来源:XnaWindow.cs

示例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);
        }
开发者ID:khbecker,项目名称:FNA,代码行数:27,代码来源:GraphicsDeviceManager.cs

示例7: DrawScreen

 protected override void DrawScreen(SpriteBatch spriteBatch, DisplayOrientation screenOrientation)
 {
     background.Draw(spriteBatch);
     road.Draw(spriteBatch);
     car.Draw(spriteBatch);
     hazards.Draw(spriteBatch);
 }
开发者ID:Vintharas,项目名称:WP7projects,代码行数:7,代码来源:MainGame.cs

示例8: DrawScreen

 protected override void DrawScreen(SpriteBatch spriteBatch, DisplayOrientation screenOrientation)
 {
     background.Draw(spriteBatch);
     titleText.Draw(spriteBatch);
     startButton.Draw(spriteBatch);
     exitButton.Draw(spriteBatch);
 }
开发者ID:Vintharas,项目名称:WP7projects,代码行数:7,代码来源:Title.cs

示例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;
 }
开发者ID:Cyberbanan,项目名称:voxeliq,代码行数:8,代码来源:ScreenConfig.cs

示例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);
 }
开发者ID:chillerman91,项目名称:GameAiChrisDaniel,代码行数:8,代码来源:Title.cs

示例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;
     }
 }
开发者ID:Vintharas,项目名称:WP7projects,代码行数:11,代码来源:MainGame.cs

示例12: UpdateScreen

        protected override void UpdateScreen(GameTime gameTime, DisplayOrientation displayOrientation)
        {
            if(input.CheckMousePress(fullscreenButton))
            {
                graphics.ToggleFullScreen();
            }

            if(input.CheckMousePress(backButton))
            {
                changeScreenDelegate(ScreenState.Title);
            }
        }
开发者ID:chillerman91,项目名称:GameAiChrisDaniel,代码行数:12,代码来源:Options.cs

示例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);
     }
 }
开发者ID:Vintharas,项目名称:WP7projects,代码行数:13,代码来源:Title.cs

示例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 );
 }
开发者ID:dreasgrech,项目名称:FPE3Sandbox,代码行数:13,代码来源:AccelerometerSensor.cs

示例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;
     }
 }
开发者ID:Heliflyer,项目名称:helios,代码行数:13,代码来源:Monitor.cs


注:本文中的DisplayOrientation类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。