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


C# com.getObjectsToDraw方法代码示例

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


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

示例1: draw

        /// <summary>Draws the given player with its sprites.</summary>
        /// <remarks>Draws the given player with its sprites.</remarks>
        /// <param name="player">Player to draw.</param>
        public virtual void draw(com.brashmonkey.spriter.player.SpriterAbstractPlayer player
			)
        {
            com.brashmonkey.spriter.draw.DrawInstruction[] instructions = player.getDrawInstructions
                ();
            for (int i = 0; i < player.getObjectsToDraw(); i++)
            {
                if (instructions[i].obj.isVisible())
                {
                    this.draw(instructions[i]);
                }
                foreach (com.brashmonkey.spriter.player.SpriterAbstractPlayer pl in player.getAttachedPlayers
                    ())
                {
                    if (player.getZIndex() == i)
                    {
                        draw(pl);
                        pl.drawn = true;
                    }
                }
            }
            foreach (com.brashmonkey.spriter.player.SpriterAbstractPlayer pl_1 in player.getAttachedPlayers
                ())
            {
                if (!player.drawn)
                {
                    draw(pl_1);
                }
                player.drawn = false;
            }
        }
开发者ID:Trixt0r,项目名称:SpriterXNATest,代码行数:34,代码来源:AbstractDrawer.cs

示例2: drawBoxes

        protected virtual void drawBoxes(com.brashmonkey.spriter.player.SpriterAbstractPlayer
			 player)
        {
            this.setDrawColor(0f, .25f, 1f, 1f);
            this.drawRectangle(player.getBoundingBox().left, player.getBoundingBox().bottom,
                player.getBoundingBox().width, player.getBoundingBox().height);
            for (int j = 0; j < player.getObjectsToDraw(); j++)
            {
                com.brashmonkey.spriter.SpriterPoint[] points = player.getRuntimeObjects()[j].getBoundingBox
                    ();
                this.drawLine(points[0].x, points[0].y, points[1].x, points[1].y);
                this.drawLine(points[1].x, points[1].y, points[3].x, points[3].y);
                this.drawLine(points[3].x, points[3].y, points[2].x, points[2].y);
                this.drawLine(points[2].x, points[2].y, points[0].x, points[0].y);
            }
        }
开发者ID:Trixt0r,项目名称:SpriterXNATest,代码行数:16,代码来源:AbstractDrawer.cs


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