Ejemplo n.º 1
0
		public void RenderingHiddenEllipseDoesNotThrowException()
		{
			var ellipse = new Ellipse(Vector2D.Half, 0.4f, 0.2f, Color.Red);
			ellipse.Add(new OutlineColor(Color.Yellow));
			ellipse.OnDraw<DrawPolygon2DOutlines>();
			Assert.DoesNotThrow(() => AdvanceTimeAndUpdateEntities());
		}
Ejemplo n.º 2
0
        public void RenderEllipseOutline()
        {
            var ellipse = new Ellipse(Vector2D.Half, 0.4f, 0.2f, Color.Blue);

            ellipse.Add(new OutlineColor(Color.Red));
            ellipse.OnDraw <DrawPolygon2DOutlines>();
        }
Ejemplo n.º 3
0
        public void RenderingHiddenEllipseDoesNotThrowException()
        {
            var ellipse = new Ellipse(Vector2D.Half, 0.4f, 0.2f, Color.Red);

            ellipse.Add(new OutlineColor(Color.Yellow));
            ellipse.OnDraw <DrawPolygon2DOutlines>();
            Assert.DoesNotThrow(() => AdvanceTimeAndUpdateEntities());
        }
Ejemplo n.º 4
0
		public void RenderingPolygonWithNoPointsDoesNotError()
		{
			var ellipse = new Ellipse(Vector2D.Half, 0.4f, 0.2f, Color.Blue);
			var points = ellipse.Get<List<Vector2D>>();
			points.Clear();
			ellipse.Remove<Ellipse.UpdatePointsIfRadiusChanges>();
			ellipse.Add(new OutlineColor(Color.Red));
			ellipse.OnDraw<DrawPolygon2DOutlines>();
		}
Ejemplo n.º 5
0
        public void RenderingPolygonWithNoPointsDoesNotError()
        {
            var ellipse = new Ellipse(Vector2D.Half, 0.4f, 0.2f, Color.Blue);
            var points  = ellipse.Get <List <Vector2D> >();

            points.Clear();
            ellipse.Remove <Ellipse.UpdatePointsIfRadiusChanges>();
            ellipse.Add(new OutlineColor(Color.Red));
            ellipse.OnDraw <DrawPolygon2DOutlines>();
        }
Ejemplo n.º 6
0
		public void RenderingWithEntityHandlersInAnyOrder()
		{
			var ellipse1 = new Ellipse(Vector2D.Half, 0.4f, 0.2f, Color.Blue) { RenderLayer = 0 };
			ellipse1.Add(new OutlineColor(Color.Red));
			ellipse1.OnDraw<DrawPolygon2D>();
			ellipse1.OnDraw<DrawPolygon2DOutlines>();
			var ellipse2 = new Ellipse(Vector2D.Half, 0.1f, 0.2f, Color.Green) { RenderLayer = 1 };
			ellipse2.Add(new OutlineColor(Color.Red));
			ellipse2.OnDraw<DrawPolygon2DOutlines>();
			ellipse2.OnDraw<DrawPolygon2D>();
		}
Ejemplo n.º 7
0
        public void RenderFallingCircle()
        {
            var ellipse = new Ellipse(Vector2D.Half, 0.1f, 0.1f, Color.Blue);

            ellipse.Add(new SimplePhysics.Data
            {
                Velocity = new Vector2D(0.1f, -0.1f),
                Gravity  = new Vector2D(0.0f, 0.1f)
            });
            ellipse.Start <SimplePhysics.Move>();
        }
Ejemplo n.º 8
0
 public void SetUp()
 {
     ellipse = new Ellipse(Vector2D.Half, 0.2f, 0.1f, Color.Blue);
     ellipse.Add(new Name("name"));
     writer            = new EntityWriter(ellipse);
     drawAreaBox       = writer.scene.Controls[1] as TextBox;
     colorRSlider      = writer.scene.Controls[3] as Slider;
     colorGSlider      = writer.scene.Controls[5] as Slider;
     colorBSlider      = writer.scene.Controls[7] as Slider;
     colorASlider      = writer.scene.Controls[9] as Slider;
     nameBox           = writer.scene.Controls[11] as TextBox;
     rotationBox       = writer.scene.Controls[13] as TextBox;
     rotationCenterBox = writer.scene.Controls[15] as TextBox;
 }
Ejemplo n.º 9
0
        public void RenderingWithEntityHandlersInAnyOrder()
        {
            var ellipse1 = new Ellipse(Vector2D.Half, 0.4f, 0.2f, Color.Blue)
            {
                RenderLayer = 0
            };

            ellipse1.Add(new OutlineColor(Color.Red));
            ellipse1.OnDraw <DrawPolygon2D>();
            ellipse1.OnDraw <DrawPolygon2DOutlines>();
            var ellipse2 = new Ellipse(Vector2D.Half, 0.1f, 0.2f, Color.Green)
            {
                RenderLayer = 1
            };

            ellipse2.Add(new OutlineColor(Color.Red));
            ellipse2.OnDraw <DrawPolygon2DOutlines>();
            ellipse2.OnDraw <DrawPolygon2D>();
        }
Ejemplo n.º 10
0
		public void RenderRedOutlinedEllipse()
		{
			var ellipse = new Ellipse(Vector2D.Half, 0.4f, 0.2f, Color.Red);
			ellipse.Add(new OutlineColor(Color.Yellow));
			ellipse.OnDraw<DrawPolygon2DOutlines>();
		}