Esempio n. 1
0
        public MainMenuLayer()
        {
            //CCSimpleAudioEngine.SharedEngine.PreloadBackgroundMusic("music/menu");
            //CCSimpleAudioEngine.SharedEngine.PreloadBackgroundMusic("music/level1");

            CCSimpleAudioEngine.SharedEngine.PlayBackgroundMusic("music/menu", true);
            //CCSimpleAudioEngine.SharedEngine.PlayEffect("DigitalStream");

            Color = CCColor3B.Black;
            Opacity = 255;

            //TouchEnabled = true;

            //CCEventListenerTouchAllAtOnce eTouch = new CCEventListenerTouchAllAtOnce();
            //eTouch.OnTouchesBegan = TouchesBegan;
            //eTouch.OnTouchesBegan = TouchesBegan;
            //eTouch.OnTouchesBegan = TouchesBegan;
            //eTouch.OnTouchesBegan = TouchesBegan;
            //EventDispatcher.AddEventListener(eTouch);

            //CCMenuItemFont tt2 = new CCMenuItemFont("Caracola de chan");
            //tt2.Color = new CCColor3B(Microsoft.Xna.Framework.Color.Blue);
            //tt.SetPosition(200, 300);

            CCMenuItem tt2 = new CCMenuItemImage("menu/nuevo", "menu/nuevo_off", Seleccionado);
            tt2.Scale = 0.7f;

            CCMenuItem tt3 = new CCMenuItemImage("menu/salir", "menu/salir_off", Salir);
            tt3.Scale = 0.7f;

            CCMenu t = new CCMenu(new CCMenuItem[] { tt2 });
            t.Color = CCColor3B.Black;
            t.SetPosition(Director.WindowSizeInPixels.Width / 2, Director.WindowSizeInPixels.Height / 2);

            AddChild(t);
        }