Ejemplo n.º 1
0
        protected override void LoadContent()
        {
            SpriteBatch = new SpriteBatch(GraphicsDevice);
            DataLoader.Initialize();

            _map    = DataLoader.AddTilemap(@"C\Maps\testing_map", @"C\Maps\default_setting");
            _testp1 = new RedPlayer("#player1", new Position(200, 200), @"C\Chars\Red\w_0_1");
            _testp1.FollowCamera     = true;
            _testp1.AssociatedPlayer = PlayerIndex.One;
            _testp1.Initialize();
            _testp2 = new TestPlayer("#player2", 200, 220, @"C\Tiles\blue");
            _testp2.FollowCamera     = true;
            _testp2.AssociatedPlayer = PlayerIndex.Two;
            _testp2.Initialize();
            _testp3 = new TestPlayer("#player3", 200, 220, @"C\Tiles\yellow");
            _testp3.FollowCamera     = true;
            _testp3.AssociatedPlayer = PlayerIndex.Two;
            _testp3.Initialize();
            _testp4 = new TestPlayer("#player4", 200, 220, @"C\Tiles\red");
            _testp4.FollowCamera     = true;
            _testp4.AssociatedPlayer = PlayerIndex.Two;
            _testp4.Initialize();


            _intro           = new FadeInFadeOut("intro_text", 400, 300, @"C\Title");
            _playButton      = new Button("play_button", 400, 300, @"C\UI\PlayButton");
            _charSelBg1      = new Sprite("bg_1", 400, 300, @"C\UI\CharSelBg1");
            _charSelBg2      = new Sprite("bg_2", 400, 300, @"C\UI\CharSelBg2");
            _charSelFg1      = new Sprite("fg_1", 400, 300, @"C\UI\CharSelFg1");
            _charSelP1Marker = new Sprite("cs_p1m", 0, 0, @"C\UI\CharSelP1Marker");
            _charSelP2Marker = new Sprite("cs_p2m", 0, 0, @"C\UI\CharSelP2Marker");
            _charSelP3Marker = new Sprite("cs_p3m", 0, 0, @"C\UI\CharSelP3Marker");
            _charSelP4Marker = new Sprite("cs_p4m", 0, 0, @"C\UI\CharSelP4Marker");

            Program.Controller1 = new ControllerState(PlayerIndex.One);
            Program.Controller2 = new ControllerState(PlayerIndex.Two);
            Program.Controller3 = new ControllerState(PlayerIndex.Three);
            Program.Controller4 = new ControllerState(PlayerIndex.Four);

            _n03.Set(null, _n02, null, _n07);
            _n07.Set(null, _n05, _n03, null);
            _n02.Set(_n03, _n06, null, _n05);
            _n05.Set(_n07, _n04, _n02, null);
            _n06.Set(_n02, null, null, _n04);
            _n04.Set(_n05, null, _n06, null);
            _selectionNodes.Add(_n03);
            _selectionNodes.Add(_n07);
            _selectionNodes.Add(_n02);
            _selectionNodes.Add(_n05);
            _selectionNodes.Add(_n04);
            _selectionNodes.Add(_n06);

            Objects.Add(_intro);
            //WaveObject wo = new WaveObject("#wave1",new Position(100,100), 20, 200, 5, 0.005);
            //WaveObject wo2 = new WaveObject("#wave1", new Position(100, 100), 20, 200, 5, 0.005);
            //wo.CreateWave(new string[] { @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\head" });
            //wo2.CreateWave(new string[] { @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\stick", @"C\Chars\Yellow\GoldenSerpents\head" },Math.PI);
            //Objects.Add(wo);
            //Objects.Add(wo2);
        }