Esempio n. 1
0
            public override void Begin()
            {
                base.Begin();

                FP.Engine.ClearColor = FP.Color(0x000000);
                //Add(new JoystickGuy(0));

                //Add(new Part(e, 1, -1, -1));
                //Add(new Part(e, 1, -1, 0));
                //Add(new Part(e, 1, -1, 1));
                //Add(new Part(e, 1, 0, 1));

                //Add(new Part(e, 0, -1, -2));
                //Add(new Part(e, 0, 0, -2));
                //Add(new Part(e, 0, 1, -2));
                //Input.ControllerConnected += (s, e) => Add(new JoystickGuy(e.JoystickId));
            }
Esempio n. 2
0
        public override void Begin()
        {
            base.Begin();
            musics       = new Sfx(Library.GetBuffer("BlackVortex.ogg"));
            musics.Pitch = .5f;
            musics.Loop();


            FP.Engine.ClearColor = FP.Color(0x000000);
            for (int x = 0; x < Sectors.GetLength(0) - 1; x++)
            {
                for (int y = 0; y < Sectors.GetLength(1) - 1; y++)
                {
                    Sectors[x, y]   = new SpaceSector();
                    Sectors[x, y].X = x * Sectors[x, y].Width;
                    Sectors[x, y].Y = y * Sectors[x, y].Height;
                    Add(Sectors[x, y]);
                }
            }
            var e = Add(PlayerShip = new Ship());

            Add(new Part(e, 1, 0, 0));
            for (int i = 0; i < 5; i++)
            {
                Part n = new Part(1);
                n.X = FP.Rand(800);
                n.Y = FP.Rand(800);
                Part nn = new Part(2);
                nn.X = FP.Rand(800);
                nn.Y = FP.Rand(800);
                Add(n);
                Add(nn);
            }
            Add(new Part(e, 3, 0, 0));
            for (int i = 0; i < 30; i++)
            {
                Add(new EmptyShip());
            }

            //FP.Log(WorldHeight);
            //Input.ControllerConnected += (s, e) => Add(new JoystickGuy(e.JoystickId));
            //Input.Pressed(Mouse.Button.Left);
        }
Esempio n. 3
0
 public override void Update()
 {
     base.Update();
     background.Color = FP.Color(FP.Rand(uint.MaxValue));
 }