예제 #1
0
        protected override void Open()
        {
            IShape bombShape = ShapeFactory.CreateSprite(Cache <SurfacePolygons> .GetItem("rocket.png"), 2, 16, 3);

            dispose += DemoHelper.RegisterBombLaunching(DemoInfo, bombShape, 120);
            dispose += DemoHelper.RegisterMousePicking(DemoInfo);
            IShape shape = ShapeFactory.CreateColoredCircle(8, 15);

            DemoHelper.AddGrid(DemoInfo, shape, 40,
                               new BoundingRectangle(200, 200, 1100, 1100),
                               5, 5);



            Body b = DemoHelper.AddShape(DemoInfo, bombShape, 400, new ALVector2D(0, 0, 0));

            DemoHelper.RegisterBodyTracking(DemoInfo, b, Matrix2x3.FromRotationZ(-MathHelper.PiOver2));
            DemoHelper.RegisterBodyMovement(DemoInfo, b, new ALVector2D(50000, 50000, 0));
            DemoHelper.AddStarField(DemoInfo, 1000, new BoundingRectangle(-1000, -1000, 2300, 2300));
        }