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


C# DB.Begin方法代码示例

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


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

示例1: Draw

 public override void Draw(DB.Gui.Graphics g, Microsoft.Xna.Framework.GameTime gameTime, Room.Layer layer)
 {
     g.Begin();
     spriteGrid.Draw(g, Position, Pressed ? 1 : 0);
     //g.Draw(DiverGame.White, Dimension, Color.Red);
     g.End();
 }
开发者ID:weimingtom,项目名称:db-diver,代码行数:7,代码来源:Button.cs

示例2: Draw

 public override void Draw(DB.Gui.Graphics g, Microsoft.Xna.Framework.GameTime gameTime, Room.Layer layer)
 {
     if (layer == Room.Layer.Player)
     {
         g.Begin();
         g.Draw(Tool.Icon, Position, Color.White);
         g.End();
     }
 }
开发者ID:olofn,项目名称:db_public,代码行数:9,代码来源:Pickup.cs

示例3: Draw

        public override void Draw(DB.Gui.Graphics g, Microsoft.Xna.Framework.GameTime gameTime, Room.Layer layer)
        {
            int x = 0, y = 0;
            g.Begin();
            g.Draw(DiverGame.White, this.Dimension, Color.White);

            if (diverInInventory)
            {
                if (!isGUIActive)
                {
                    g.DrawStringShadowed(font,
                     "Press Space to open inventory",
                     new Rectangle(0, 100, 400, 20),
                     TextAlignment.Center,
                     Color.White);
                }

            }

            if (isGUIActive)
            {
                Color c = new Color(255, 255, 255, 230);
                x = 400/2 - backgroundTexture.Width / 2;
                y = 300/2 - backgroundTexture.Height / 2;

                g.Draw(backgroundTexture, new Point(x, y), c);
                y += 15;
                g.DrawStringShadowed(font,
                                     "Inventory",
                                     new Rectangle(x, y, backgroundTexture.Width, 20),
                                     TextAlignment.Center,
                                     Color.White);

                int spaceBetween = 30;
                x += 30; y += 20;

                int xOffs = 0;
                foreach (ITool tool in tools)
                {
                    g.Draw(tool.Icon, new Point(x + (xOffs%7)*spaceBetween + 4, y + (xOffs/7)*spaceBetween + 4), Color.White);
                    xOffs += 1;
                }

                g.Draw(toolSelectorTexture, new Point(spaceBetween*(inventorySelected%7) + x, y + (inventorySelected/7)*spaceBetween), Color.White);

            }

            g.End();
        }
开发者ID:olofn,项目名称:db_public,代码行数:49,代码来源:Inventory.cs

示例4: Draw

        public override void Draw(DB.Gui.Graphics g, Microsoft.Xna.Framework.GameTime gameTime, Room.Layer layer)
        {
            if (layer == Room.Layer.Background)
            {
                g.Begin();

                foreach (Fishy fish in fishies)
                {
                    fish.Draw(g, gameTime, layer);
                }
                g.End();
            }
        }
开发者ID:weimingtom,项目名称:db-diver,代码行数:13,代码来源:Shoal.cs


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