Esempio n. 1
0
        protected override void Draw()
        {
            base.Draw();

            if (Editor != null)
            {
                Editor.BeginAntialising();

                Editor.spriteBatch.Begin();

                if (MySpline != null)
                {
                    MySpline.DrawSpline(Editor.spriteBatch);
                }
                if (MySplineWalker != null && MySplineWalker.Initialized)
                {
                    MySplineWalker.Draw(Editor.spriteBatch);
                }
                if (MySplineMarker != null && MySplineMarker.Initialized)
                {
                    MySplineMarker.Draw(Editor.spriteBatch);
                }

                Editor.spriteBatch.DrawString(Editor.Font, "Marker: " + MySplineMarker.GetProgress.ToString(), new Vector2(10, 10), Color.White);
                Editor.spriteBatch.DrawString(Editor.Font, "Walker: " + MySplineWalker.GetProgress.ToString(), new Vector2(10, 30), Color.White);

                Editor.spriteBatch.End();

                Editor.EndAntialising();
                Editor.DrawDisplay();
            }
        }
        protected override void Draw()
        {
            base.Draw();

            if (Editor != null)
            {
                Editor.BeginAntialising();

                Editor.spriteBatch.Begin();

                if (MySpline != null)
                {
                    MySpline.DrawSpline(Editor.spriteBatch);
                }

                Editor.spriteBatch.DrawCircle(_NearestPoint, Color.LightGreen);
                Editor.spriteBatch.DrawPoint(TestTransform.Position, Color.LightGreen);

                Editor.spriteBatch.DrawString(Editor.Font, _NearestPointSplinePosition.ToString(), _NearestPoint + new Vector2(10, 0), Color.White);

                Editor.spriteBatch.End();

                Editor.EndAntialising();
                Editor.DrawDisplay();
            }
        }
Esempio n. 3
0
        protected override void Draw()
        {
            base.Draw();

            if (Editor != null)
            {
                Editor.BeginAntialising();

                if (MySpline != null)
                {
                    MySpline.DrawPolygonStripe();
                }

                Editor.spriteBatch.Begin(effect: Functions.GetBasicEffect);

                if (MySpline != null)
                {
                    MySpline.DrawSpline(Editor.spriteBatch);
                }

                Editor.spriteBatch.End();

                Editor.EndAntialising();
                Editor.DrawDisplay();
            }
        }
Esempio n. 4
0
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            spriteBatch.Begin();

            if (MySpline != null)
            {
                MySpline.DrawSpline(spriteBatch);
            }
            if (MySplineWalker != null)
            {
                MySplineWalker.Draw(spriteBatch);
            }

            spriteBatch.End();

            base.Draw(gameTime);
        }