Example #1
0
        public override void RenderObjects()
        {
            base.RenderObjects();

            // Inner bounds
            CreateModel.CreateWall(-6.3f, -2f, 8f, .25f);

            // Laser start/stop
            laserWrappers.Add(CreateModel.CreateLaserStart(0f, 9f, 3));
            LaserStop laserStop = CreateModel.CreateLaserStop(0f, -9f);

            laserStop.Rotate(180.1f);

            // Moveables
            CreateModel.CreateMovableBox(4.05f, -5.925f);
            CreateModel.CreateMovableTrapezoid(-4f, 5f, 1.5f, 1, 1);

            CreateModel.CreateMovableTriangle(4f, 1f, 3f, 1.4f);
            CreateModel.CreateMovableTriangle(0f, 2f, 1f, 1f);

            // Stationary Models
            CreateModel.CreateBox(-4f, 2f);

            Model model = CreateModel.CreateBox(0f, 0f);

            model.Rotate(45);

            model = CreateModel.CreateTriangle(-4f, -4f, -1f, -2f);
            model.Rotate(17);
        }
Example #2
0
        public override void RenderObjects()
        {
            base.RenderObjects();

            // Inner bounds
            CreateModel.CreateWall(-4f, 2f, 12f, .25f);
            CreateModel.CreateWall(2f, -1.37f, .25f, 7f);
            CreateModel.CreateWall(-7.7f, 6f, 5f, .25f);

            // Unmoveables
            CreateModel.CreateBox(-4f, 5f, 1f);

            laserWrappers.Add(CreateModel.CreateLaserStart(-10f, -1f, 2, (float)MathExtension.ToRadians(-45)));

            Model laserStop = CreateModel.CreateLaserStop(-9.7f, 7f);

            laserStop.Rotate((float)MathExtension.ToRadians(90));

            movingBox = new MovingBox(2.85f, 2.6f, 123, 0f, 1f);

            Model model;

            for (int i = 0; i < 7; i++)
            {
                int x = MathExtension.RandomInt(1, 9);
                int y = MathExtension.RandomInt(2, 8);

                model = CreateModel.CreateMovableBox(x, y);
                RandomRotate(model);
            }

            isRendered = true;
        }
Example #3
0
 public MovingBox(float x, float y, int maxDistance, float xVelocity, float yVelocity)
 {
     this.model       = CreateModel.CreateBox(x, y);
     this.maxDistance = maxDistance;
     this.xVelocity   = xVelocity;
     this.yVelocity   = yVelocity;
 }
Example #4
0
        public override void RenderObjects()
        {
            base.RenderObjects();

            // Inner walls
            CreateModel.CreateWall(-9.7f, 9.4f, .5f, 1f); // Wall to fill in gaps around LaserStop
            CreateModel.CreateWall(-8.3f, 9.4f, .5f, 1f); // Wall to fill in gaps around LaserStop

            CreateModel.CreateWall(-8f, 2f, .25f, 18f);
            CreateModel.CreateWall(2f, -2f, .25f, 16f);
            CreateModel.CreateWall(6f, -4f, .25f, 9f);
            CreateModel.CreateWall(6f, 7.5f, .25f, 8f);

            CreateModel.CreateWall(-3f, 5f, 6f, .25f);
            CreateModel.CreateWall(-3f, 0f, 6f, .25f);

            // Laser start/stop
            LaserStart start = CreateModel.CreateLaserStart(9.3f, 9.3f, 3, -10);

            laserWrappers.Add(start);

            CreateModel.CreateLaserStop(-9f, 9.3f);

            // MovingBoxes
            MovingBox movingBox1 = new MovingBox(2.85f, 2f, 123, 1f, 0f);

            movingBox1.Rotate(45);

            MovingBox movingBox2 = new MovingBox(0f, 2f, 123, 0f, 1f);

            movingBoxes = new MovingBox[] { movingBox1, movingBox2 };

            CreateModel.CreateMovableBox(4.05f, -5.925f);
            CreateModel.CreateMovableTrapezoid(-.9f, 5.8f, 1.5f, 1, 1);
            CreateModel.CreateBox(4f, 0f);

            Model tri1 = CreateModel.CreateTriangle(-4f, -4f, -1f, -2f);

            tri1.Rotate(17);

            CreateModel.CreateMovableTriangle(-1f, 1f, 1f, 1f);

            Model model;

            for (int i = 0; i < 7; i++)
            {
                int x = MathExtension.RandomInt(1, 9);
                int y = MathExtension.RandomInt(2, 8);

                model = CreateModel.CreateMovableTriangle(x, y, 1, 1);
                RandomRotate(model);
            }

            model = CreateModel.CreateMovableTriangle(-6f, -8f, 1f, 1f);
            model.Rotate(75);

            isRendered = true;
        }
Example #5
0
        public override void RenderObjects()
        {
            base.RenderObjects();

            // Walls
            {
                // Inner bounds
                CreateModel.CreateWall(0f, -5f, 8f, .25f);

                // Around LaserStart
                CreateModel.CreateWall(-1f, -1f, .25f, 3f);
                CreateModel.CreateWall(1f, -1f, .25f, 3f);
                CreateModel.CreateWall(0f, 0.6f, 2.25f, .25f);

                // Around Laser Stop
                CreateModel.CreateWall(-5f, 9f, .25f, 1.5f);
                CreateModel.CreateWall(-3f, 9f, .25f, 1.5f);
                CreateModel.CreateWall(-7.5f, 10f, 4.8f, 3.5f);
                CreateModel.CreateWall(3.5f, 10f, 12.8f, 3.5f);

                // Others
                CreateModel.CreateWall(-4f, 0f, .25f, 5f);
                CreateModel.CreateWall(4f, -2.625f, .25f, 5f);
                CreateModel.CreateWall(-6f, -2.625f, .25f, 5f);
                CreateModel.CreateWall(-4f, 5f, 5f, .25f);
                CreateModel.CreateWall(4f, 5f, 5f, .25f);
            }

            // Laser start/stop
            LaserStart laserStart = CreateModel.CreateLaserStart(0f, 0f, 3);

            laserWrappers.Add(laserStart);
            CreateModel.CreateLaserStop(-4f, 9f);

            // Moveables
            CreateModel.CreateMovableBox(4.05f, -5.925f);
            CreateModel.CreateMovableTrapezoid(-4f, 5f, 1.5f, 1f, 1f);
            CreateModel.CreateMovableTrapezoid(-4f, 8f, 1.5f, 1, 1f);

            Model model = CreateModel.CreateMovableTriangle(4f, 5f, 1f, 1f);;

            model.Rotate(35);

            model = CreateModel.CreateMovableTriangle(4f, 6f, 1f, 1f);;
            model.Rotate(90);

            CreateModel.CreateMovableTriangle(4f, 5f, 1f, 1f);
            CreateModel.CreateMovableTriangle(0f, 5f, 1f, 1f);

            // Stationary Models
            model = CreateModel.CreateBox(-8.8f, 7.25f, 2f);
            model = CreateModel.CreateBox(8.8f, 7.25f, 2f);
            model = CreateModel.CreateTriangle(-5.38f, 7.75f, 1f, 1f);
        }
Example #6
0
        public override void RenderObjects()
        {
            base.RenderObjects();

            laserWrappers.Add(CreateModel.CreateLaserStart(-10f, 5f, 2, (float)MathExtension.ToRadians(-45)));
            laserWrappers.Add(CreateModel.CreateLaserStart(2f, -10f, 1, (float)MathExtension.ToRadians(38)));

            movingBox = new MovingBox(2, 0, 240, 120, .5f, 0);
            movingBox.Rotate((float)MathExtension.ToRadians(45));
            CreateModel.CreateTriangle(-5.5f, 1f, 2f, 1f);
            box1 = CreateModel.CreateBox(-2, 8, 2);
            box1.Rotate((float)MathExtension.ToRadians(30));
            box2 = CreateModel.CreateBox(0, 5.5f, 1.5f);
            box2.Rotate((float)MathExtension.ToRadians(40));
            box3       = CreateModel.CreateBox(7, -1);
            box4       = CreateModel.CreateBox(-7f, -1);
            isRendered = true;
        }
Example #7
0
        public override void RenderObjects()
        {
            base.RenderObjects();

            // Inner bounds
            CreateModel.CreateWall(0, 1f, .25f, 18f);

            // Laser start/stop
            laserWrappers.Add(CreateModel.CreateLaserStart(-10f, -1f, 2, -45));
            CreateModel.CreateLaserStop(7f, 9.9f);

            m = CreateModel.CreateMovableBox(4, 0);
            m.Rotate(-30);

            CreateModel.CreateMovableBox(2, 4);

            m = CreateModel.CreateBox(7, 4, 1); // Stationary box

            isRendered = true;
        }
Example #8
0
        public override void RenderObjects()
        {
            base.RenderObjects();

            // Inner bounds
            CreateModel.CreateWall(0f, -5f, 8f, .25f);
            CreateModel.CreateWall(-1f, -9f, .25f, 1.5f);
            CreateModel.CreateWall(1f, -9f, .25f, 1.5f);

            // Laser start/stop
            LaserStart laserStart = CreateModel.CreateLaserStart(-9f, 9f, 3);

            laserStart.Rotate(45);
            laserWrappers.Add(laserStart);

            LaserStop laserStop = CreateModel.CreateLaserStop(0f, -9.5f);

            laserStop.Rotate(180.1f);

            // Moveables
            CreateModel.CreateMovableBox(4.05f, -5.925f);
            CreateModel.CreateMovableTrapezoid(-4f, 5f, 1.5f, 1f, 1f);
            CreateModel.CreateMovableTrapezoid(-4f, 8f, 1.5f, 1, 1f);

            CreateModel.CreateMovableTriangle(4f, 5f, 1f, 1f);
            CreateModel.CreateMovableTriangle(0f, 5f, 1f, 1f);

            // Stationary Models
            Model box;

            for (int i = 0; i < 2; i++)
            {
                for (int j = 0 + i; j < 20 - i * 2; j += 2)
                {
                    box = CreateModel.CreateBox(-9f + j, i * 2);
                    box.Rotate(45);
                }
            }
        }
Example #9
0
        public override void RenderObjects()
        {
            base.RenderObjects();

            // Walls
            {
                // Inner bounds
                CreateModel.CreateWall(-8f, 5f, .25f, 5f);
                CreateModel.CreateWall(-2f, 5f, .25f, 5f);
                CreateModel.CreateWall(-5f, 2.4f, 6.25f, .25f);

                CreateModel.CreateWall(8f, 5f, .25f, 5f);
                CreateModel.CreateWall(2f, 5f, .25f, 5f);
                CreateModel.CreateWall(5f, 2.4f, 6.25f, .25f);

                CreateModel.CreateWall(0f, 0f, 4f, .25f);

                // Around LaserStop
                CreateModel.CreateWall(-1f, -8.5f, .25f, 2.5f);
                CreateModel.CreateWall(1f, -8.5f, .25f, 2.5f);
            }

            // Laser start/stop
            LaserStart laserStart = CreateModel.CreateLaserStart(3f, 9.3f, 3);

            laserWrappers.Add(laserStart);

            LaserStop laserStop = CreateModel.CreateLaserStop(0f, -9.5f);

            laserStop.Rotate(180.1f);

            // Moveables
            Model model;

            for (int i = 0; i < 4; i++)
            {
                int x = MathExtension.RandomInt(-3, 9);
                int y = MathExtension.RandomInt(-3, 8);

                model = CreateModel.CreateMovableBox(x, y);
                RandomRotate(model);
            }

            for (int i = 0; i < 6; i++)
            {
                int x = MathExtension.RandomInt(-3, 9);
                int y = MathExtension.RandomInt(-3, 8);

                model = CreateModel.CreateMovableTriangle(x, y, 1f, 1f);
                RandomRotate(model);
            }

            // Stationary Models
            for (int i = 0; i < 10; i += 2)
            {
                CreateModel.CreateBox(-4f + i, -6f);
            }

            // Box 1
            Model triangle = CreateModel.CreateTriangle(-3.1f, 3.5f, -2f, -2f);

            triangle.Rotate(-90);
            triangle = CreateModel.CreateTriangle(-6.9f, 3.5f, -2f, -2f);
            triangle.Rotate(-180);

            // Box 2
            triangle = CreateModel.CreateTriangle(3.1f, 3.5f, -2f, -2f);
            triangle.Rotate(-180);
            triangle = CreateModel.CreateTriangle(6.9f, 3.5f, -2f, -2f);
            triangle.Rotate(-90);

            // Box 3
            triangle = CreateModel.CreateTriangle(-6.9f, -6f, -2f, -2f);
            triangle.Rotate(-180);
            triangle = CreateModel.CreateTriangle(6.9f, -6f, -2f, -2f);
            triangle.Rotate(-90);

            triangle = CreateModel.CreateTriangle(8.75f, 8.75f, -2f, -2f);
            triangle = CreateModel.CreateTriangle(-8.75f, 8.75f, -2f, -2f);
            triangle.Rotate(90);
        }
Example #10
0
        public override void RenderObjects()
        {
            base.RenderObjects();

            // Walls
            {
                // Vertical walls between moving boxes
                for (int i = -8; i <= 8; i += 2)
                {
                    CreateModel.CreateWall(i, -3f, .25f, 5f);
                    CreateModel.CreateWall(i, 3f, .25f, 5f);

                    if (i == -8 || i == 3)
                    {
                        i += 3;
                    }
                }

                // Around LaserStop
                CreateModel.CreateWall(-1f, -8.5f, .25f, 2.5f);
                CreateModel.CreateWall(1f, -8.5f, .25f, 2.5f);
            }

            // Laser start/stop
            LaserStart laserStart = CreateModel.CreateLaserStart(-9.3f, 0f, 3);

            laserStart.Rotate(90);
            laserWrappers.Add(laserStart);

            LaserStop laserStop = CreateModel.CreateLaserStop(0f, -9.5f);

            laserStop.Rotate(180);

            // Moveables
            Model model;

            for (int i = 0; i < 6; i++)
            {
                int x = MathExtension.RandomInt(0, 9);
                int y = MathExtension.RandomInt(0, 8);

                model = CreateModel.CreateMovableTriangle(x, y, 1f, 1f);
                RandomRotate(model);
            }

            model = CreateModel.CreateMovableBox(0f, 7f);
            model.Rotate(25);

            model = CreateModel.CreateMovableBox(3f, 7f);
            model.Rotate(165);

            model = CreateModel.CreateMovableBox(6f, 7f);
            model.Rotate(243);

            // Unmoveable Models
            float     velocity       = 0.7f;
            int       movingBoxCount = 5;
            MovingBox movingBox;

            movingBoxes = new MovingBox[movingBoxCount];
            for (int i = 0; i < movingBoxCount; i++)
            {
                velocity  = (float)MathExtension.RandomInt(0, 1) + 0.5f;
                movingBox = new MovingBox(-4f + 2f * i, 0f, 40 + (i * 3), 0f, i % 2 == 0 ? velocity : -velocity);
                movingBox.Rotate(45);
                movingBoxes[i] = movingBox;
            }

            spinBox = CreateModel.CreateBox(-4f, -7f, 1.4f);

            Model[] triangles =
            {
                CreateModel.CreateTriangle(-0.88f, -2f,   -1f,   -1f),
                CreateModel.CreateTriangle(0.88f,  -3f, -1.3f, -1.3f),
                CreateModel.CreateTriangle(-0.88f, -4f,   -1f, -1f)
            };

            for (int i = 0; i < triangles.Length; i++)
            {
                if (i % 2 == 0)
                {
                    triangles[i].Rotate(-45);
                }
                else
                {
                    triangles[i].Rotate(135);
                }
            }

            model = CreateModel.CreateBox(0f, -6.5f, 1f);
            model.Rotate(65);

            isRendered = true;
        }