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


C# SpriteBatch.ScalingDraw方法代码示例

本文整理汇总了C#中Microsoft.Xna.Framework.Graphics.SpriteBatch.ScalingDraw方法的典型用法代码示例。如果您正苦于以下问题:C# SpriteBatch.ScalingDraw方法的具体用法?C# SpriteBatch.ScalingDraw怎么用?C# SpriteBatch.ScalingDraw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft.Xna.Framework.Graphics.SpriteBatch的用法示例。


在下文中一共展示了SpriteBatch.ScalingDraw方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Draw

 public void Draw(SpriteBatch spriteBatch)
 {
     spriteBatch.ScalingDraw(textureBack, new Vector2(drawPosition.X, drawPosition.Y - 20), 1.0f, Color.White);
     DrawNumber(spriteBatch, minutes % 10, drawPosition + new Vector2(34, -4) + new Vector2(29, 0) );
     spriteBatch.ScalingDraw(textureTime, drawPosition + new Vector2(34, -4) + new Vector2(29, 0) + new Vector2(27, 0) + new Vector2(10, 0), 1.0f, new Rectangle(270, 0, 13, 29), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.0f);
     DrawNumber(spriteBatch, seconds / 10 % 10, drawPosition + new Vector2(34, -4) + new Vector2(29, 0) + new Vector2(27, 0) + new Vector2(10, 0) + new Vector2(13, 0) + new Vector2(10, 0));
     DrawNumber(spriteBatch, seconds % 10, drawPosition + new Vector2(34, -4) + new Vector2(29, 0) + new Vector2(27, 0) * 2 + new Vector2(10, 0) + new Vector2(13, 0) + new Vector2(10, 0));
 }
开发者ID:hirama-akihiro,项目名称:DropFight,代码行数:8,代码来源:Timer.cs

示例2: Draw

        public void Draw(SpriteBatch spriteBatch)
        {
            if (isDead == true) return;

            spriteBatch.ScalingDraw(backTexture, new Vector2(drawPosition.X, drawPosition.Y), 1.0f, Color.White);
            for (int i = 0; i < stock; i++)
            {
                spriteBatch.ScalingDraw(stockTexture, new Vector2(drawPosition.X + i * (stockTexture.Width) + 150, drawPosition.Y + 25), 1.0f, Color.White);
            }
        }
开发者ID:hirama-akihiro,项目名称:DropFight,代码行数:10,代码来源:StockDrawer.cs

示例3: DrawNumber

 /// <summary>
 /// タイムの数字を表示
 /// </summary>
 /// <param name="spriteBatch"></param>
 private void DrawNumber(SpriteBatch spriteBatch, int number, Vector2 position)
 {
     spriteBatch.ScalingDraw(textureTime, position, 1.0f, new Rectangle(27 * number, 0, 27, 29), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.0f);
 }
开发者ID:hirama-akihiro,项目名称:DropFight,代码行数:8,代码来源:Timer.cs


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