Example #1
0
        public override void Draw(GameTime time, SpriteBatch spriteBatch)
        {
            GraphicsDevice graphicsDevice = spriteBatch.GraphicsDevice;

            if (time.IsRunningSlowly)
            {
                graphicsDevice.Clear(Color.MistyRose);
            }
            else
            {
                graphicsDevice.Clear(Color.CornflowerBlue);
            }


            foreach (IRigidBody b in PE.ActiveBodies)
            {
                GraphicsUtils.DrawBall(b.Position, b.BoundingBox.Width / 2, Color.Black, 255);
            }

            foreach (IRigidBody b in PE.MapBodies)
            {
                if (b is IVertWallBody || b is IHorizWallBody)
                {
                    var bb = b.BoundingBox;
                    GraphicsUtils.DrawRectangle(bb.XMin, bb.XMax, bb.YMin, bb.YMax, Color.Black);
                }
            }

            drawTree <IRigidBody>(PE.QTbodies);
            // GraphicsUtils.End();
        }
Example #2
0
        public override void Draw(GameTime time, SpriteBatch spriteBatch)
        {
            GraphicsUtils.DrawBall(Position, 5, Color.Indigo, 255, 0.1f);

            if (!Suppressed)
            {
                GraphicsUtils.DrawBall(Position, this.Parent.BoundingBox.Width / 2 + Radius, _sensorColor, 50, 0.0f);
            }
        }
Example #3
0
 public void Draw()
 {
     if (tex == null)
     {
         foreach (var p in Particles)
         {
             byte a = (byte)(255 * alpha(p));
             GraphicsUtils.DrawBall(p.Position, p.Radius, Color.OrangeRed, a);
         }
     }
     else
     {
         Draw(tex);
     }
 }
Example #4
0
            public override void Draw(GameTime time, Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch)
            {
                GraphicsUtils
                .DrawBall(
                    Location + BoxSize / 2 * Vector2.One, BoxSize / 2, OuterColor, 255);

                GraphicsUtils
                .DrawBall(
                    Location + BoxSize / 2 * Vector2.One, BoxSize / 3, InnerColor, 255);

                if (isChecked)
                {
                    GraphicsUtils
                    .DrawBall(
                        Location + BoxSize / 2 * Vector2.One, BoxSize / 4, OuterColor, 255);
                }
                base.Draw(time, spriteBatch);
            }
Example #5
0
        public override void Draw(GameTime time, SpriteBatch spriteBatch)
        {
            GraphicsDevice graphicsDevice = spriteBatch.GraphicsDevice;

            if (time.IsRunningSlowly)
            {
                graphicsDevice.Clear(Color.MistyRose);
            }
            else
            {
                graphicsDevice.Clear(Color.CornflowerBlue);
            }


            foreach (IRigidBody b in PE.ActiveBodies)
            {
                GraphicsUtils.DrawBall(b.Position, b.BoundingBox.Width / 2, Color.Black, 255);
            }

            foreach (IRigidBody b in PE.MapBodies)
            {
                if (b is IVertWallBody || b is IHorizWallBody)
                {
                    var bb = b.BoundingBox;
                    GraphicsUtils.DrawRectangle(bb.XMin, bb.XMax, bb.YMin, bb.YMax, Color.Black);
                }
            }

            foreach (var bff in PE.bffields)
            {
                var bb = bff.AreaInfluenced;
                GraphicsUtils.DrawRectangle(bb.XMin, bb.XMax, bb.YMin, bb.YMax, Color.FromNonPremultiplied(200, 100, 100, 50));
            }


            if (mactive)
            {
                GraphicsUtils.DrawRectangle(new Vector2(Mouse.GetState().X, Mouse.GetState().Y), rad * 2, rad * 2, 0f, Color.FromNonPremultiplied(200, 100, 100, 150));
            }

            drawTree <IRigidBody>(PE.QTbodies);

            // GraphicsUtils.End();
        }
Example #6
0
 public override void Draw(GameTime time, SpriteBatch spriteBatch)
 {
     GraphicsUtils.DrawBall(Position, Radius, Color.Teal, 255);
 }
Example #7
0
 public override void Draw(Microsoft.Xna.Framework.GameTime time, Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch)
 {
     GraphicsUtils.DrawBall(this.Position, 5, Color.HotPink, 255, 0.0f);
 }
Example #8
0
 public override void Draw(GameTime time, SpriteBatch spriteBatch)
 {
     GraphicsUtils.DrawBall(Position, Radius,
                            DebugMode ? Color:Color.Gray, 255);
 }