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


C# Sprite.AddAnimationFrame方法代码示例

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


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

示例1: Line

        public Line(Vector2 position, int width, Color color)
        {
            Rectangle dimensions = new Rectangle(0, 0, width, defaultLineHeight);
            LineSprite = new Sprite<byte>(TextureManager.SingleWhitePixel,
                position, dimensions);

            LineSprite.Color = color;
            LineSprite.AddAnimationFrame(0, dimensions);
            LineSprite.ActiveAnimation = 0;
        }
开发者ID:Linusa,项目名称:AI_Project,代码行数:10,代码来源:Line.cs

示例2: RadarDebugger

        public RadarDebugger(Radar radar)
        {
            radarDebugging = radar;

            RadarSprite = new Sprite<byte>(TextureManager.RadarCircle, Vector2.Zero, SpriteDimensions);
            RadarSprite.AddAnimationFrame(0, SpriteDimensions);
            RadarSprite.ActiveAnimation = 0;

            resetScaleUp();
        }
开发者ID:Linusa,项目名称:AI_Project,代码行数:10,代码来源:RadarDebugger.cs

示例3: GraphViewer

        public GraphViewer(GraphType graph)
        {
            Graph = graph;

            nodeSprite = new Sprite<byte>(TextureManager.RadarCircle, Vector2.Zero,
                RadarDebugger.SpriteDimensions);
            nodeSprite.AddAnimationFrame(0, RadarDebugger.SpriteDimensions);
            nodeSprite.ActiveAnimation = 0;

            float scale = 0.06f;
            nodeSprite.Scale(scale);
            nodeRadius = nodeSprite.Dimensions.Width / 2 * scale;

            inputTimer.Start();
        }
开发者ID:Linusa,项目名称:AI_Project,代码行数:15,代码来源:GraphViewer.cs

示例4: initializeSprites

        protected virtual void initializeSprites()
        {
            Rectangle tileFrame = new Rectangle(0, 0, (int)TileSize.X, (int)TileSize.Y);

            grassTile = new Sprite<byte>(TextureManager.GrassTile, Vector2.Zero, tileFrame);
            grassTile.AddAnimationFrame(0, tileFrame);
            grassTile.ActiveAnimation = 0;
            grassTile.LayerDepth = AStarGame.DrawingOrder.Grass;

            wallTile = new Sprite<byte>(TextureManager.WallTile, Vector2.Zero, tileFrame);
            wallTile.AddAnimationFrame(0, tileFrame);
            wallTile.ActiveAnimation = 0;
            wallTile.LayerDepth = AStarGame.DrawingOrder.Wall;

            bushTile = new Sprite<byte>(TextureManager.BushTile, Vector2.Zero, tileFrame);
            bushTile.AddAnimationFrame(0, tileFrame);
            bushTile.ActiveAnimation = 0;
            bushTile.LayerDepth = AStarGame.DrawingOrder.Bush;
        }
开发者ID:Linusa,项目名称:AI_Project,代码行数:19,代码来源:Map.cs


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