Exemplo n.º 1
0
        public void OnLoadContentEvent(MPP.core2d.GameScreenManager.LoadContentEventArgs eventArgs)
        {
            background = ScreenUtils.GetTexture("mainMenuBackground");

            buttons = new core2d.AnimatedButton[2];

            buttons[0] = new AnimatedButton(MenuScreen.START_A_NEW_GAME_BUTTON_LABEL);
            SetNewGameButtonLabel();


            buttons[1] = new AnimatedButton(MenuScreen.SOUND_SETTINGS_BUTTON_LABEL);
            SetSoundButtonLabel();

            /*
             * buttons[2] = new AnimatedButton(MenuScreen.HELP_BUTTON_LABEL);
             * buttons[2].SetLabel(Constans.MENU_SELECTED_BUTTON_BACKGROUND_COLOR, Constans.MENU_NON_SELECTED_BUTTON_BACKGROUND_COLOR, Constans.MENU_NON_SELECTED_BUTTON_BACKGROUND_COLOR,
             *  Constans.MENU_NON_ACTIVE_TEXT_COLOR, Constans.MENU_FONT_NAME,
             *  ResourceManager.Instance.GetString(ResourceManager.StringKey.HELP),
             *  Constans.STANDARD_BUTTON_WIDTH, Constans.STANDARD_BUTTON_HEIGHT);
             */
            for (int i = 0; i < buttons.Length; i++)
            {
                buttons[i].ButtonPressedListener    += this.OnButtonPressed;
                buttons[i].ButtonTransitionListener += this.OnButtonTransition;
                transitionButtonCountdown            = 0;
            }
        }
Exemplo n.º 2
0
        public void OnLoadContentEvent(MPP.core2d.GameScreenManager.LoadContentEventArgs eventArgs)
        {
            background = ScreenUtils.GetTexture(ResourceManager.Instance.GetString(ResourceManager.StringKey.HELP_SCREEN_BACKGROUND));

            okButton = new AnimatedButton(HelpScreen.OK_BUTTON_LABEL);
            okButton.ButtonPressedListener    += this.OnButtonPressed;
            okButton.ButtonTransitionListener += this.OnButtonTransition;
        }
Exemplo n.º 3
0
        public void OnLoadContentEvent(MPP.core2d.GameScreenManager.LoadContentEventArgs eventArgs)
        {
            foreach (string name in effectNames)
            {
                SoundEffect effect = eventArgs.contentManager.Load <SoundEffect>(name);
                soundEffects[name] = effect;
            }

            foreach (string name in loopedEffectNames)
            {
                loopedSoundEffects[name]          = soundEffects[name].CreateInstance();
                loopedSoundEffects[name].IsLooped = true;
                soundEffects.Remove(name);
            }
        }