public Pax4UiStateLavaAndIceInstructions(String p_name, Pax4Ui p_ui)
            : base(p_name, p_ui)
        {
            String     textureName = null;
            Texture2D  texture     = null;
            Pax4Sprite sprite      = null;

            sprite = new Pax4Button("instructions", null);

            textureName = "Sprite/lavaandiceInstructions";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetOnClick(this.lavaandiceInstructionsButton_Click);
            AddChild(sprite);
        }
Esempio n. 2
0
        public Pax4UiStateLavaAndIceMenu(String p_name, Pax4Ui p_ui)
            : base(p_name, p_ui)
        {
            float duration = 0.5f;
            //float delay = 0.0f;
            Vector2 position;
            Pax4SpriteColorModifier colorModifierEnter = new Pax4SpriteColorModifier("", null);

            colorModifierEnter.Ini(Color.Black, Color.White, duration);
            AddStateEnterModifier(colorModifierEnter);
            Pax4SpriteColorModifier colorModifierExit = new Pax4SpriteColorModifier("", null);

            colorModifierExit.Ini(Color.White, Color.Black, duration);
            AddStateExitModifier(colorModifierExit);

            Pax4SpriteAlphaModifier alphaModifierEnter = new Pax4SpriteAlphaModifier("", null);

            alphaModifierEnter.Ini(0.0f, 1.0f, duration);
            AddStateEnterModifier(alphaModifierEnter);
            Pax4SpriteAlphaModifier alphaModifierExit = new Pax4SpriteAlphaModifier("", null);

            alphaModifierExit.Ini(1.0f, 0.0f, duration);
            AddStateExitModifier(alphaModifierExit);

            //Pax4SpritePositionModifier positionModifierEnter = null;
            //Pax4SpritePositionModifier positionModifierExit = null;
            //Pax4SpriteTextModifier textModifier = null;
            //Pax4UiState state = null;
            //float duration = Pax4Ui._btnDuration;
            //float delay = 0.0f;
            Vector2 position0 = Vector2.Zero;
            Vector2 position1 = Vector2.Zero;

            String    textureName = null;
            Texture2D texture     = null;
            //SpriteFont spriteFont = null;
            Pax4Sprite sprite = null;

            //**************************************************
            //create
            //**************************************************

            //**************************************************
            //bg
            //**************************************************
            position.X = 95.0f;
            position.Y = 223.0f;
            //misc
            sprite = new Pax4SpriteTexture("lavaandiceMenuBg", null);
            AddChild(sprite);
            textureName = "Sprite/lavaandiceInGameMenuBg";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4SpriteTexture)sprite).SetTexture(texture);
            sprite.SetPosition(position);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            position.X = 170.0f;
            position.Y = 246.0f;
            sprite     = new Pax4SpriteTexture("lavaandiceMenuTitle", null);
            AddChild(sprite);
            textureName = "Sprite/lavaandiceInGameMenuTextMenu";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4SpriteTexture)sprite).SetTexture(texture);
            sprite.SetPosition(position);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);
            //**************************************************
            //buttons
            //**************************************************

            sprite = new Pax4Button("lavaandiceMenuResume", null);
            AddChild(sprite);
            textureName = "Sprite/lavaandiceResumeBtn";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTexture(texture);
            textureName = "Sprite/lavaandiceResumeBtnOver";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTextureOver(texture);
            ((Pax4Button)sprite).SetOnClick(this.lavaandiceResumeBtn_Click);
            position.X = 126.0f;
            position.Y = 318.0f;
            sprite.SetPosition(position);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4Button("lavaandiceMenuRetry", null);
            AddChild(sprite);
            textureName = "Sprite/lavaandiceRetryBtn";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTexture(texture);
            textureName = "Sprite/lavaandiceRetryBtnOver";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTextureOver(texture);
            ((Pax4Button)sprite).SetOnClick(this.lavaandiceRetryBtn_Click);
            position.X = 126.0f;
            position.Y = 446.0f;
            sprite.SetPosition(position);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4Button("lavaandiceMenuExit", null);
            AddChild(sprite);
            textureName = "Sprite/lavaandiceExitBtn";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTexture(texture);
            textureName = "Sprite/lavaandiceExitBtnOver";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTextureOver(texture);
            ((Pax4Button)sprite).SetOnClick(this.lavaandiceExitBtn_Click);
            position.X = 126.0f;
            position.Y = 574.0f;
            sprite.SetPosition(position);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);
        }
Esempio n. 3
0
        public Pax4UiStateLavaAndIceMission(String p_name, Pax4Ui p_ui, Pax4WorldLavaAndIce.ELavaAndIceMissionType p_missionType = Pax4WorldLavaAndIce.ELavaAndIceMissionType._LAVA_AND_ICE)
            : base(p_name, p_ui)
        {
            //_blendState = BlendState.AlphaBlend;

            String     textureName = null;
            Texture2D  texture     = null;
            Pax4Sprite sprite      = null;
            Pax4Sprite scoreSprite = null;
            Vector2    position;

            float duration = 0.3f;
            //float delay = 0.0f;
            Pax4SpriteColorModifier colorModifierEnter = new Pax4SpriteColorModifier("", null);

            colorModifierEnter.Ini(Color.Black, Color.White, duration);
            AddStateEnterModifier(colorModifierEnter);
            Pax4SpriteColorModifier colorModifierExit = new Pax4SpriteColorModifier("", null);

            colorModifierExit.Ini(Color.White, Color.Black, duration);
            AddStateExitModifier(colorModifierExit);

            Pax4SpriteAlphaModifier alphaModifierEnter = new Pax4SpriteAlphaModifier("", null);

            alphaModifierEnter.Ini(0.0f, 1.0f, duration);
            AddStateEnterModifier(alphaModifierEnter);
            Pax4SpriteAlphaModifier alphaModifierExit = new Pax4SpriteAlphaModifier("", null);

            alphaModifierExit.Ini(1.0f, 0.0f, duration);
            AddStateExitModifier(alphaModifierExit);

            //Pax4SpriteColorModifier colorModifier = null;
            //Pax4SpriteAlphaModifier alphaModifier = null;
            Pax4SpritePositionModifier positionModifier = null;
            //Pax4SpriteTextModifier textModifier = null;
            Pax4SpriteTextNumberModifier textNumberModifier = null;

            position.X  = 0.1f;
            position.Y  = 0.1f;
            textureName = "Sprite/lavaandiceInGameFgScore";
            texture     = Pax4Texture2D._current.Get(textureName);
            sprite      = new Pax4SpriteTexture("top", null);
            ((Pax4SpriteTexture)sprite).SetTexture(texture);
            sprite.SetPosition(position);
            AddChild(sprite);
            scoreSprite = sprite;
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            textureName = "Sprite/lavaandiceInGameFgBottom";
            texture     = Pax4Texture2D._current.Get(textureName);
            sprite      = new Pax4SpriteTexture("bottom", null);
            ((Pax4SpriteTexture)sprite).SetTexture(texture);
            position.X = 0.1f;
            position.Y = 0.2f;
            sprite.SetPosition(position);
            AddChild(sprite);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            position.Y = 0.3f;
            position.X = 0.4f;

            if (p_missionType == Pax4WorldLavaAndIce.ELavaAndIceMissionType._LAVA || p_missionType == Pax4WorldLavaAndIce.ELavaAndIceMissionType._LAVA_AND_ICE)
            {
                textureName = "Sprite/lavaandiceInGameFgLavaLauncher";
                texture     = Pax4Texture2D._current.Get(textureName);
                sprite      = new Pax4ToggleButton("lavaLauncher", null);
                ((Pax4SpriteTexture)sprite).SetTexture(texture);

                textureName = "Sprite/lavaandiceInGameFgLavaLauncherOver";
                texture     = Pax4Texture2D._current.Get(textureName);
                ((Pax4ToggleButton)sprite).SetTextureOver(texture);

                ((Pax4ToggleButton)sprite).SetOnClick(lavaandiceLavaLauncher_Click);
                ((Pax4ToggleButton)sprite).ToggleEnabled(false);

                _lavaLauncher = (Pax4ToggleButton)sprite;

                //if (Pax4Camera._backBufferWidth > 480)
                //{
                //    if (p_missionType == Pax4WorldLavaAndIce.ELavaAndIceMissionType._LAVA_AND_ICE)
                //        position.X = 127.0f;
                //}
                //else if (Pax4Camera._backBufferWidth == 480)
                //{
                //    if (p_missionType == Pax4WorldLavaAndIce.ELavaAndIceMissionType._LAVA_AND_ICE)
                //        position.X = 130.0f;
                //}
                //else if (Pax4Camera._backBufferWidth <= 320)
                //{
                //    if (p_missionType == Pax4WorldLavaAndIce.ELavaAndIceMissionType._LAVA_AND_ICE)
                //        position.X = 137.0f;
                //}
                sprite.SetPosition(position);
                AddChild(sprite);
                colorModifierEnter.AddChild(sprite);
                colorModifierExit.AddChild(sprite);
                alphaModifierEnter.AddChild(sprite);
                alphaModifierExit.AddChild(sprite);
            }

            if (p_missionType == Pax4WorldLavaAndIce.ELavaAndIceMissionType._ICE || p_missionType == Pax4WorldLavaAndIce.ELavaAndIceMissionType._LAVA_AND_ICE)
            {
                textureName = "Sprite/lavaandiceInGameFgIceLauncher";
                texture     = Pax4Texture2D._current.Get(textureName);
                sprite      = new Pax4ToggleButton("iceLauncher", null);
                ((Pax4SpriteTexture)sprite).SetTexture(texture);

                textureName = "Sprite/lavaandiceInGameFgIceLauncherOver";
                texture     = Pax4Texture2D._current.Get(textureName);
                ((Pax4ToggleButton)sprite).SetTextureOver(texture);

                ((Pax4ToggleButton)sprite).SetOnClick(lavaandiceIceLauncher_Click);
                ((Pax4ToggleButton)sprite).ToggleEnabled(false);

                _iceLauncher = (Pax4ToggleButton)sprite;

                //position.X = 0.4;

                //if (Pax4Camera._backBufferWidth > 480)
                //{
                //    if (p_missionType == Pax4WorldLavaAndIce.ELavaAndIceMissionType._LAVA_AND_ICE)
                //        position.X = 263.0f;
                //}
                //else if (Pax4Camera._backBufferWidth == 480)
                //{
                //    if (p_missionType == Pax4WorldLavaAndIce.ELavaAndIceMissionType._LAVA_AND_ICE)
                //        position.X = 260.0f;
                //}
                //else if (Pax4Camera._backBufferWidth <= 320)
                //{
                //    if (p_missionType == Pax4WorldLavaAndIce.ELavaAndIceMissionType._LAVA_AND_ICE)
                //        position.X = 253.0f;
                //}
                sprite.SetPosition(position);
                AddChild(sprite);
                colorModifierEnter.AddChild(sprite);
                colorModifierExit.AddChild(sprite);
                alphaModifierEnter.AddChild(sprite);
                alphaModifierExit.AddChild(sprite);
            }

            textureName = "Sprite/lavaandiceInGameMenuBtn";
            texture     = Pax4Texture2D._current.Get(textureName);
            sprite      = new Pax4Button("menu", null);
            ((Pax4Button)sprite).SetTexture(texture);
            position.X = 0.7f;
            position.Y = 0.1f;
            sprite.SetPosition(position);
            textureName = "Sprite/lavaandiceInGameMenuBtnOver";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTextureOver(texture);
            ((Pax4Button)sprite).SetOnClick(this.lavaandiceMenuBtn_Click);
            AddChild(sprite);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            textureName = "Sprite/lavaandiceInGamePauseBtn";
            texture     = Pax4Texture2D._current.Get(textureName);
            sprite      = new Pax4ToggleButton("pause", null);
            ((Pax4Button)sprite).SetTexture(texture);
            position.X = 0.3f;
            position.Y = 0.3f;
            sprite.SetPosition(position);
            textureName = "Sprite/lavaandiceInGamePauseBtnOver";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTextureOver(texture);
            ((Pax4Button)sprite).SetOnClick(this.lavaandicePauseBtn_Click);
            AddChild(sprite);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            //position.X = -20.0f;
            //position.Y = 45.0f;
            position.X = 64.0f;
            position.Y = 47.0f;
            sprite     = new Pax4UiLavaAndIceMissionThermometer("thermometer", null);
            sprite.SetPosition(position);
            AddChild(sprite);

            position.X = 0.0f;
            position.Y = 0.0f;
            sprite     = new Pax4UiLavaAndIceMissionHealth("health", null);
            sprite.SetPosition(position);
            AddChild(sprite);

            position.X = 8.0f;
            position.Y = 52.0f;
            sprite     = new Pax4UiLavaAndIceMissionTimer("timer", null);
            sprite.SetPosition(position);
            AddChild(sprite);
            _missionTimer = (Pax4UiLavaAndIceMissionTimer)sprite;

            Vector2 position1 = new Vector2(-150, 52);

            position1 *= Pax4Camera._current._scale2;

            position        *= Pax4Camera._current._scale2;
            positionModifier = new Pax4SpritePositionModifier("", null);
            positionModifier.Ini(position1, position, 0.2f);
            positionModifier.AddChild(sprite);
            AddStateEnterModifier(positionModifier);

            position        *= Pax4Camera._current._scale2;
            positionModifier = new Pax4SpritePositionModifier("", null);
            positionModifier.AddChild(sprite);
            positionModifier.Ini(position, position1, 0.2f);
            AddStateExitModifier(positionModifier);

            //**************************************************
            //create text sprites
            //**************************************************
            float xpos = 0.0f;
            //float xstep = 0.0f;
            //float xoff = 0.0f;

            float ypos  = 0.0f;
            float ystep = 0.0f;
            //float yoff = 0.0f;

            float scale;

            //Score
            xpos       = 91.0f;
            ypos       = 4.0f;
            ystep      = 22.0f;
            sprite     = new Pax4SpriteText("score", scoreSprite);
            position.X = xpos;
            position.Y = ypos; ypos += ystep;
            scale      = 0.40f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.White);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            ((Pax4SpriteText)sprite).SetText("Score:");
            AddChild(sprite);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            //Score value
            xpos       = 145.0f;
            ypos       = 4.0f;
            sprite     = new Pax4SpriteText("scoreValue", scoreSprite);
            position.X = xpos;
            position.Y = ypos; ypos += ystep;
            scale      = 0.45f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.GreenYellow);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            ((Pax4SpriteText)sprite).SetText("0");
            AddChild(sprite);
            _scoreSprite = sprite;
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            textNumberModifier = new Pax4SpriteTextNumberModifier("", null);
            textNumberModifier.AddChild(sprite);
            AddStateEnterModifier(textNumberModifier);
            _scoreSpriteModifier = textNumberModifier;

            //High Score
            xpos       = 81.0f;
            sprite     = new Pax4SpriteText("highScore", scoreSprite);
            position.X = xpos;
            position.Y = ypos;
            scale      = 0.35f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.White);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            ((Pax4SpriteText)sprite).SetText("High Score:");
            AddChild(sprite);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            //High Score value
            xpos       = 161.0f;
            ypos       = ypos - 1.0f;
            sprite     = new Pax4SpriteText("highScoreValue", scoreSprite);
            position.X = xpos;
            position.Y = ypos;
            scale      = 0.40f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.GreenYellow);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            ((Pax4SpriteText)sprite).SetText("0");
            AddChild(sprite);
            _highScoreSprite = sprite;
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            //**************************************************
            //create medal sprites
            //**************************************************
            if (_medalSprite == null)
            {
                _medalSprite = new Dictionary <String, Pax4Sprite>();
            }
            else
            {
                return;
            }

            Dictionary <String, String> _medal = new Dictionary <String, String>();

            _medal.Add("nightmareOn", "Sprite/lavaandiceNightmareOn");
            //_medal.Add("nightmareOff", "Sprite/lavaandiceNightmareOff");
            _medal.Add("hardOn", "Sprite/lavaandiceHardOn");
            //_medal.Add("hardOff", "Sprite/lavaandiceHardOff");
            _medal.Add("normalOn", "Sprite/lavaandiceNormalOn");
            //_medal.Add("normalOff", "Sprite/lavaandiceNormalOff");
            _medal.Add("easyOn", "Sprite/lavaandiceEasyOn");
            //_medal.Add("easyOff", "Sprite/lavaandiceEasyOff");

            xpos = 251.0f;
            ypos = 2.0f;
            foreach (KeyValuePair <String, String> kvp in _medal)
            {
                textureName = kvp.Value;
                texture     = Pax4Texture2D._current.Get(textureName);
                sprite      = new Pax4SpriteTexture(kvp.Key, scoreSprite);
                ((Pax4SpriteTexture)sprite).SetTexture(texture);
                sprite.SetPosition(new Vector2(xpos, ypos));
                _medalSprite.Add(sprite._name, sprite);
                colorModifierEnter.AddChild(sprite);
                colorModifierExit.AddChild(sprite);
                alphaModifierEnter.AddChild(sprite);
                alphaModifierExit.AddChild(sprite);
            }

            _currentMedalSprite = sprite;
        }
Esempio n. 4
0
        public Pax4UiStateLavaAndIceChooseMissionPrologue(String p_name, Pax4Ui p_ui)
            : base(p_name, p_ui)
        {
            Vector2 position;
            float   duration = 0.5f;
            float   delay    = 0.0f;

            Pax4SpriteColorModifier colorModifierEnter = new Pax4SpriteColorModifier("", null);

            colorModifierEnter.Ini(Color.Black, Color.White, duration);
            AddStateEnterModifier(colorModifierEnter);
            Pax4SpriteColorModifier colorModifierExit = new Pax4SpriteColorModifier("", null);

            colorModifierExit.Ini(Color.White, Color.Black, duration);
            AddStateExitModifier(colorModifierExit);

            Pax4SpriteAlphaModifier alphaModifierEnter = new Pax4SpriteAlphaModifier("", null);

            alphaModifierEnter.Ini(0.0f, 1.0f, duration);
            AddStateEnterModifier(alphaModifierEnter);
            Pax4SpriteAlphaModifier alphaModifierExit = new Pax4SpriteAlphaModifier("", null);

            alphaModifierExit.Ini(1.0f, 0.0f, duration);
            AddStateExitModifier(alphaModifierExit);

            duration = Pax4Ui._btnDuration;

            Pax4SpritePositionModifier positionModifierEnter = null;
            Pax4SpritePositionModifier positionModifierExit  = null;
            Pax4SpriteTextModifier     textModifier          = null;
            //Pax4UiState state = null;
            Vector2 position0 = Vector2.Zero;
            Vector2 position1 = Vector2.Zero;

            String    textureName = null;
            Texture2D texture     = null;
            Texture2D textureOver = null;
            //SpriteFont spriteFont = null;
            Pax4Sprite sprite = null;


            textureName = "Sprite/lavaandiceMainBg";
            texture     = Pax4Texture2D._current.Get(textureName);
            sprite      = new Pax4SpriteTexture("lavaandiceMainBg", null);
            ((Pax4SpriteTexture)sprite).SetTexture(texture);
            position.X = 0.5f;
            position.Y = 0.5f;
            sprite.SetPosition(position);
            AddChild(sprite);
            duration = 0.5f;
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);


            delay      = 0.3f;
            position.X = .5f;
            position.Y = .35f;

            sprite = new Pax4SpriteText("lavaandicePrologueTitle", sprite);
            AddChild(sprite);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/Livingstone");
            ((Pax4SpriteText)sprite).SetPosition(position);
            textModifier = new Pax4SpriteTextModifier("", null);
            textModifier.AddChild(sprite);
            textModifier.Ini("Prologue", duration, delay);
            AddStateEnterModifier(textModifier);
            duration = 0.5f;
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            position.X = .5f;
            position.Y = .85f;
            //misc
            sprite = new Pax4Button("lavaandiceBackBtn", null);
            AddChild(sprite);
            textureName = "Sprite/lavaandiceBackBtn";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTexture(texture);
            textureName = "Sprite/lavaandiceBackBtnOver";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTextureOver(texture);
            ((Pax4Button)sprite).SetTextSpriteFont("SpriteFont/Livingstone", position, "Back");
            ((Pax4Button)sprite).SetOnClick(lavaandiceBackBtn_Click);



            //**************************************************
            //create
            //**************************************************
            textureName = "Sprite/lavaandiceMissionBtn";
            texture     = Pax4Texture2D._current.Get(textureName);
            textureName = "Sprite/lavaandiceMissionBtnOver";
            textureOver = Pax4Texture2D._current.Get(textureName);

            position.X = .5f;
            position.Y = .5f;
            Pax4Slider slider = new Pax4Slider("sldQuest", null);

            slider.SetRectangleWidthHeight(texture.Width, 0);
            slider.SetPosition(position);//, texture.Width, 400.0f);
            slider._verticalScroll = true;
            slider.SetViewingThreshold(0, Pax4Game._graphicsDeviceManager.PreferredBackBufferWidth, 400, 900);

            slider._verticalSpacing = 20.0f;

            //slider.SetSnapPosition(position);
            AddChild(slider);

            //colorModifier = new Pax4SpriteColorModifier(slider);
            //colorModifier.Ini(Color.Black, Color.White, duration);
            //AddStateEnterModifier(colorModifier);
            //colorModifier = new Pax4SpriteColorModifier(slider);
            //colorModifier.Ini(Color.White, Color.Black, duration);
            //AddStateExitModifier(colorModifier);

            duration = 0.5f;
            delay    = 0.0f;
            //position0.X = -1091.0f;
            //position0.Y = position.Y;
            //position0 *= Pax4Camera._current._scale2;
            //position *= Pax4Camera._current._scale2;

            //positionModifierEnter = new Pax4SpritePositionModifier(slider);
            //positionModifierEnter.Ini(position0, position, duration, delay);
            //AddStateEnterModifier(positionModifierEnter);
            //positionModifierExit = new Pax4SpritePositionModifier(slider);
            //position0.X = 1091.0f;
            ///positionModifierExit.Ini(position, position0, duration, delay);
            //AddStateExitModifier(positionModifierExit);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission0Btn", slider, "Prologue", 1);
            ((Pax4Button)sprite).SetText("Mission 0", Vector2.Zero);
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            sprite.SetPosition(Vector2.Zero);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission0Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission1Btn", slider, "Prologue", 1);
            ((Pax4Button)sprite).SetText("Mission 1");
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission1Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission2Btn", slider, "Prologue", 2);
            ((Pax4Button)sprite).SetText("Mission 2");
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission2Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission3Btn", slider, "Prologue", 3);
            ((Pax4Button)sprite).SetText("Mission 3");
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission3Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission4Btn", slider, "Prologue", 4);
            ((Pax4Button)sprite).SetText("Mission 4");
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission4Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission5Btn", slider, "Prologue", 5);
            ((Pax4Button)sprite).SetText("Mission 5");
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission5Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission6Btn", slider, "Prologue", 6);
            ((Pax4Button)sprite).SetText("Mission 6");
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission6Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission7Btn", slider, "Prologue", 7);
            ((Pax4Button)sprite).SetText("Mission 7");
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission7Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission8Btn", slider, "Prologue", 8);
            ((Pax4Button)sprite).SetText("Mission 8");
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission8Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission9Btn", slider, "Prologue", 9);
            ((Pax4Button)sprite).SetText("Mission 9");
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission9Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission10Btn", slider, "Prologue", 10);
            ((Pax4Button)sprite).SetText("Mission 10");
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission10Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission11Btn", slider, "Prologue", 11);
            ((Pax4Button)sprite).SetText("Mission 11");
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission11Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission12Btn", slider, "Prologue", 12);
            ((Pax4Button)sprite).SetText("Mission 12");
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission12Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission13Btn", slider, "Prologue", 13);
            ((Pax4Button)sprite).SetText("Mission 13");
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission13Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission14Btn", slider, "Prologue", 14);
            ((Pax4Button)sprite).SetText("Mission 14");
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission14Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission15Btn", slider, "Prologue", 15);
            ((Pax4Button)sprite).SetText("Mission 15");
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission15Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission16Btn", slider, "Prologue", 16);
            ((Pax4Button)sprite).SetText("Mission 16");
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission16Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission17Btn", slider, "Prologue", 17);
            ((Pax4Button)sprite).SetText("Mission 17");
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission17Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission18Btn", slider, "Prologue", 18);
            ((Pax4Button)sprite).SetText("Mission 18");
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission18Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission19Btn", slider, "Prologue", 19);
            ((Pax4Button)sprite).SetText("Mission 19");
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission19Btn_Click);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);


            /////////////////////////////

            //sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission20Btn", slider, "Prologue", 20);
            //((Pax4Button)sprite).SetText("Mission 20");
            //((Pax4Button)sprite).SetTexture(texture);
            //((Pax4Button)sprite).SetTextureOver(textureOver);
            //slider.AddChild(sprite);
            //((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission20Btn_Click);
            //colorModifierEnter.AddChild(sprite);
            //colorModifierExit.AddChild(sprite);
            //alphaModifierEnter.AddChild(sprite);
            //alphaModifierExit.AddChild(sprite);

            //sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission21Btn", slider, "Prologue", 21);
            //((Pax4Button)sprite).SetText("Mission 21");
            //((Pax4Button)sprite).SetTexture(texture);
            //((Pax4Button)sprite).SetTextureOver(textureOver);
            //slider.AddChild(sprite);
            //((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission21Btn_Click);
            //colorModifierEnter.AddChild(sprite);
            //colorModifierExit.AddChild(sprite);
            //alphaModifierEnter.AddChild(sprite);
            //alphaModifierExit.AddChild(sprite);

            //sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission22Btn", slider, "Prologue", 22);
            //((Pax4Button)sprite).SetText("Mission 22");
            //((Pax4Button)sprite).SetTexture(texture);
            //((Pax4Button)sprite).SetTextureOver(textureOver);
            //slider.AddChild(sprite);
            //((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission22Btn_Click);
            //colorModifierEnter.AddChild(sprite);
            //colorModifierExit.AddChild(sprite);
            //alphaModifierEnter.AddChild(sprite);
            //alphaModifierExit.AddChild(sprite);

            //sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission23Btn", slider, "Prologue", 23);
            //((Pax4Button)sprite).SetText("Mission 23");
            //((Pax4Button)sprite).SetTexture(texture);
            //((Pax4Button)sprite).SetTextureOver(textureOver);
            //slider.AddChild(sprite);
            //((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission23Btn_Click);
            //colorModifierEnter.AddChild(sprite);
            //colorModifierExit.AddChild(sprite);
            //alphaModifierEnter.AddChild(sprite);
            //alphaModifierExit.AddChild(sprite);

            //sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission24Btn", slider, "Prologue", 24);
            //((Pax4Button)sprite).SetText("Mission 24");
            //((Pax4Button)sprite).SetTexture(texture);
            //((Pax4Button)sprite).SetTextureOver(textureOver);
            //slider.AddChild(sprite);
            //((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission24Btn_Click);
            //colorModifierEnter.AddChild(sprite);
            //colorModifierExit.AddChild(sprite);
            //alphaModifierEnter.AddChild(sprite);
            //alphaModifierExit.AddChild(sprite);

            //sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission25Btn", slider, "Prologue", 25);
            //((Pax4Button)sprite).SetText("Mission 25");
            //((Pax4Button)sprite).SetTexture(texture);
            //((Pax4Button)sprite).SetTextureOver(textureOver);
            //slider.AddChild(sprite);
            //((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission25Btn_Click);
            //colorModifierEnter.AddChild(sprite);
            //colorModifierExit.AddChild(sprite);
            //alphaModifierEnter.AddChild(sprite);
            //alphaModifierExit.AddChild(sprite);

            //sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission26Btn", slider, "Prologue", 26);
            //((Pax4Button)sprite).SetText("Mission 26");
            //((Pax4Button)sprite).SetTexture(texture);
            //((Pax4Button)sprite).SetTextureOver(textureOver);
            //slider.AddChild(sprite);
            //((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission26Btn_Click);
            //colorModifierEnter.AddChild(sprite);
            //colorModifierExit.AddChild(sprite);
            //alphaModifierEnter.AddChild(sprite);
            //alphaModifierExit.AddChild(sprite);

            //sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission27Btn", slider, "Prologue", 27);
            //((Pax4Button)sprite).SetText("Mission 27");
            //((Pax4Button)sprite).SetTexture(texture);
            //((Pax4Button)sprite).SetTextureOver(textureOver);
            //slider.AddChild(sprite);
            //((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission27Btn_Click);
            //colorModifierEnter.AddChild(sprite);
            //colorModifierExit.AddChild(sprite);
            //alphaModifierEnter.AddChild(sprite);
            //alphaModifierExit.AddChild(sprite);

            //sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission28Btn", slider, "Prologue", 28);
            //((Pax4Button)sprite).SetText("Mission 28");
            //((Pax4Button)sprite).SetTexture(texture);
            //((Pax4Button)sprite).SetTextureOver(textureOver);
            //slider.AddChild(sprite);
            //((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission28Btn_Click);
            //colorModifierEnter.AddChild(sprite);
            //colorModifierExit.AddChild(sprite);
            //alphaModifierEnter.AddChild(sprite);
            //alphaModifierExit.AddChild(sprite);

            //sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission29Btn", slider, "Prologue", 29);
            //((Pax4Button)sprite).SetText("Mission 29");
            //((Pax4Button)sprite).SetTexture(texture);
            //((Pax4Button)sprite).SetTextureOver(textureOver);
            //slider.AddChild(sprite);
            //((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission29Btn_Click);
            //colorModifierEnter.AddChild(sprite);
            //colorModifierExit.AddChild(sprite);
            //alphaModifierEnter.AddChild(sprite);
            //alphaModifierExit.AddChild(sprite);

            //sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission30Btn", slider, "Prologue", 30);
            //((Pax4Button)sprite).SetText("Mission 30");
            //((Pax4Button)sprite).SetTexture(texture);
            //((Pax4Button)sprite).SetTextureOver(textureOver);
            //slider.AddChild(sprite);
            //((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission30Btn_Click);
            //colorModifierEnter.AddChild(sprite);
            //colorModifierExit.AddChild(sprite);
            //alphaModifierEnter.AddChild(sprite);
            //alphaModifierExit.AddChild(sprite);

            //sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission31Btn", slider, "Prologue", 31);
            //((Pax4Button)sprite).SetText("Mission 31");
            //((Pax4Button)sprite).SetTexture(texture);
            //((Pax4Button)sprite).SetTextureOver(textureOver);
            //slider.AddChild(sprite);
            //((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission31Btn_Click);
            //colorModifierEnter.AddChild(sprite);
            //colorModifierExit.AddChild(sprite);
            //alphaModifierEnter.AddChild(sprite);
            //alphaModifierExit.AddChild(sprite);

            //sprite = new Pax4ButtonLavaAndIceMission("lavaandicePrologueMission32Btn", slider, "Prologue", 32);
            //((Pax4Button)sprite).SetText("Mission 32");
            //((Pax4Button)sprite).SetTexture(texture);
            //((Pax4Button)sprite).SetTextureOver(textureOver);
            //slider.AddChild(sprite);
            //((Pax4ButtonLavaAndIceMission)sprite).SetOnClick1(this.lavaandicePrologueMission32Btn_Click);
            //colorModifierEnter.AddChild(sprite);
            //colorModifierExit.AddChild(sprite);
            //alphaModifierEnter.AddChild(sprite);
            //alphaModifierExit.AddChild(sprite);


            slider.AddChild(null);//no mas buttons, wrap shit up

            position.X = .5f;
            position.Y = .5f;

            sprite.Enable();

            ////duration = 0.5f;
            ////delay = 0.0f;
            ////position0.X = position.X;
            ////position0.Y = 1920.0f;
            ////sprite.SetPosition(position0);
            ////position *= Pax4Camera._current._scale2;
            ////position0 *= Pax4Camera._current._scale2;
            ////positionModifierEnter = new Pax4SpritePositionModifier(sprite);
            ////positionModifierEnter.Ini(position0, position, duration);
            ////AddStateEnterModifier(positionModifierEnter);

            ////positionModifierExit = new Pax4SpritePositionModifier(sprite);
            ////positionModifierExit.Ini(position, position0, duration);
            ////AddStateExitModifier(positionModifierExit);


            //colorModifier = new Pax4SpriteColorModifier(sprite);
            //colorModifier.Ini(Color.Black, Color.White, duration/2.0f);
            //AddStateEnterModifier(colorModifier);

            //colorModifier = new Pax4SpriteColorModifier(sprite);
            //colorModifier.Ini(Color.White, Color.Black, duration / 2.0f);
            //AddStateExitModifier(colorModifier);
        }
Esempio n. 5
0
        public Pax4UiStateLavaAndIceMissionDifficulty(String p_name, Pax4Ui p_ui)
            : base(p_name, p_ui)
        {
            Vector2 position;
            float   duration = 0.5f;
            //float delay = 0.0f;

            Pax4SpriteColorModifier colorModifierEnter = new Pax4SpriteColorModifier("", null);

            colorModifierEnter.Ini(Color.Black, Color.White, duration);
            AddStateEnterModifier(colorModifierEnter);
            Pax4SpriteColorModifier colorModifierExit = new Pax4SpriteColorModifier("", null);

            colorModifierExit.Ini(Color.White, Color.Black, duration);
            AddStateExitModifier(colorModifierExit);

            Pax4SpriteAlphaModifier alphaModifierEnter = new Pax4SpriteAlphaModifier("", null);

            alphaModifierEnter.Ini(0.0f, 1.0f, duration);
            AddStateEnterModifier(alphaModifierEnter);
            Pax4SpriteAlphaModifier alphaModifierExit = new Pax4SpriteAlphaModifier("", null);

            alphaModifierExit.Ini(1.0f, 0.0f, duration);
            AddStateExitModifier(alphaModifierExit);

            //Pax4SpritePositionModifier positionModifierEnter = null;
            //Pax4SpritePositionModifier positionModifierExit = null;
            //Pax4SpriteTextModifier textModifier = null;
            //Pax4UiState state = null;
            Vector2 position0 = Vector2.Zero;
            Vector2 position1 = Vector2.Zero;

            String    textureName = null;
            Texture2D texture     = null;
            //SpriteFont spriteFont = null;
            Pax4Sprite sprite = null;

            //**************************************************
            //create
            //**************************************************

            //**************************************************
            //bg
            //**************************************************
            position.X = 0.5f;
            position.Y = 0.5f;
            //misc
            sprite = new Pax4SpriteTexture("lavaandiceMenuBg", null);
            AddChild(sprite);
            textureName = "Sprite/lavaandiceInGameMenuBg";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4SpriteTexture)sprite).SetTexture(texture);
            sprite.SetPosition(position);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            position.X = 0.5f;
            position.Y = 0.2f;
            sprite     = new Pax4SpriteTexture("lavaandiceDifficultyTitle", null);
            AddChild(sprite);
            textureName = "Sprite/lavaandiceInGameMenuTextDifficulty";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4SpriteTexture)sprite).SetTexture(texture);
            sprite.SetPosition(position);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            //**************************************************
            //buttons
            //**************************************************

            sprite = new Pax4Button("lavaandiceDifficultyNightmare", null);
            AddChild(sprite);
            textureName = "Sprite/lavaandiceNightmareBtn";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTexture(texture);
            textureName = "Sprite/lavaandiceNightmareBtnOver";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTextureOver(texture);
            ((Pax4Button)sprite).SetOnClick(this.lavaandiceNightmareBtn_Click);
            position.X = 0.5f;
            position.Y = 0.3f;
            sprite.SetPosition(position);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4Button("lavaandiceDifficultyHard", null);
            AddChild(sprite);
            textureName = "Sprite/lavaandiceHardBtn";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTexture(texture);
            textureName = "Sprite/lavaandiceHardBtnOver";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTextureOver(texture);
            ((Pax4Button)sprite).SetOnClick(this.lavaandiceHardBtn_Click);
            position.X = 0.5f;
            position.Y = 0.5f;
            sprite.SetPosition(position);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4Button("lavaandiceDifficultyNormal", null);
            AddChild(sprite);
            textureName = "Sprite/lavaandiceNormalBtn";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTexture(texture);
            textureName = "Sprite/lavaandiceNormalBtnOver";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTextureOver(texture);
            ((Pax4Button)sprite).SetOnClick(this.lavaandiceNormalBtn_Click);
            position.X = 0.5f;
            position.Y = 0.7f;
            sprite.SetPosition(position);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4Button("lavaandiceDifficultyEasy", null);
            AddChild(sprite);
            textureName = "Sprite/lavaandiceEasyBtn";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTexture(texture);
            textureName = "Sprite/lavaandiceEasyBtnOver";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTextureOver(texture);
            ((Pax4Button)sprite).SetOnClick(this.lavaandiceEasyBtn_Click);
            position.X = 0.5f;
            position.Y = 0.9f;
            sprite.SetPosition(position);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            position.X = 0.1f;
            position.Y = 0.1f;
            //misc
            sprite = new Pax4Button("lavaandiceBackBtn", null);
            AddChild(sprite);
            textureName = "Sprite/lavaandiceBackBtn";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTexture(texture);
            textureName = "Sprite/lavaandiceBackBtnOver";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTextureOver(texture);
            ((Pax4Button)sprite).SetTextSpriteFont("SpriteFont/Livingstone", position, "Back");
            ((Pax4Button)sprite).SetOnClick(this.lavaandiceBackBtn_Click);
            //position.X = 160.0f;
            //position.Y = 820.0f;
            sprite.SetPosition(position);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);
        }
        public Pax4UiStateLavaAndIceVictory(String p_name, Pax4Ui p_ui)
            : base(p_name, p_ui)
        {
            Vector2 position;
            float   duration = 0.5f;

            Pax4SpriteColorModifier colorModifierEnter = new Pax4SpriteColorModifier("", null);

            colorModifierEnter.Ini(Color.Black, Color.White, duration);
            AddStateEnterModifier(colorModifierEnter);
            Pax4SpriteColorModifier colorModifierExit = new Pax4SpriteColorModifier("", null);

            colorModifierExit.Ini(Color.White, Color.Black, duration);
            AddStateExitModifier(colorModifierExit);

            Pax4SpriteAlphaModifier alphaModifierEnter = new Pax4SpriteAlphaModifier("", null);

            alphaModifierEnter.Ini(0.0f, 1.0f, duration);
            AddStateEnterModifier(alphaModifierEnter);
            Pax4SpriteAlphaModifier alphaModifierExit = new Pax4SpriteAlphaModifier("", null);

            alphaModifierExit.Ini(1.0f, 0.0f, duration);
            AddStateExitModifier(alphaModifierExit);
            //Pax4SpritePositionModifier positionModifierEnter = null;
            //Pax4SpritePositionModifier positionModifierExit = null;
            //Pax4SpriteTextModifier textModifier = null;
            Pax4SpriteTextNumberModifier textNumberModifier = null;

            //float delay = 0.0f;
            Vector2 position0 = Vector2.Zero;
            Vector2 position1 = Vector2.Zero;

            String    textureName = null;
            Texture2D texture     = null;
            //SpriteFont spriteFont = null;
            Pax4Sprite sprite = null;

            //**************************************************
            //bg
            //**************************************************
            position.X = 63.0f;
            position.Y = 145.0f;
            //misc
            sprite = new Pax4SpriteTexture("lavaandiceMenuBg", null);
            AddChild(sprite);
            textureName = "Sprite/lavaandiceInGameVictoryBg";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4SpriteTexture)sprite).SetTexture(texture);
            sprite.SetPosition(position);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            //**************************************************
            //buttons
            //**************************************************

            sprite = new Pax4Button("lavaandiceMenuExit", null);
            AddChild(sprite);
            textureName = "Sprite/lavaandiceExitBtn";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTexture(texture);
            textureName = "Sprite/lavaandiceExitBtnOver";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTextureOver(texture);
            ((Pax4Button)sprite).SetOnClick(this.lavaandiceExitBtn_Click);
            position.X = 126.0f;
            position.Y = 368.0f;
            sprite.SetPosition(position);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4Button("lavaandiceMenuRetry", null);
            AddChild(sprite);
            textureName = "Sprite/lavaandiceRetryBtn";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTexture(texture);
            textureName = "Sprite/lavaandiceRetryBtnOver";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTextureOver(texture);
            ((Pax4Button)sprite).SetOnClick(this.lavaandiceRetryBtn_Click);
            position.X = 126.0f;
            position.Y = 496.0f;
            sprite.SetPosition(position);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            sprite = new Pax4Button("lavaandiceMenuContinue", null);
            AddChild(sprite);
            textureName = "Sprite/lavaandiceContinueBtn";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTexture(texture);
            textureName = "Sprite/lavaandiceContinueBtnOver";
            texture     = Pax4Texture2D._current.Get(textureName);
            ((Pax4Button)sprite).SetTextureOver(texture);
            ((Pax4Button)sprite).SetOnClick(this.lavaandiceContinueBtn_Click);
            position.X = 126.0f;
            position.Y = 624.0f;
            sprite.SetPosition(position);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            //**************************************************
            //create
            //**************************************************
            float xpos = 0.0f;
            //float xstep = 0.0f;
            //float xoff = 0.0f;

            float ypos  = 0.0f;
            float ystep = 0.0f;
            //float yoff = 0.0f;

            float scale;

            //Difficulty
            xpos       = 105.0f;
            ypos       = 246.0f;
            sprite     = new Pax4SpriteText("difficulty", null);
            position.X = xpos;
            position.Y = ypos;
            scale      = 0.55f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.White);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            ((Pax4SpriteText)sprite).SetText("Difficulty:");
            AddChild(sprite);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            //Difficulty Value
            xpos       = 210.0f;
            ypos       = 246.0f;
            ystep      = 30.0f;
            sprite     = new Pax4SpriteText("difficultyValue", null);
            position.X = xpos;
            position.Y = ypos; ypos += ystep;
            scale      = 0.60f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.OrangeRed);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            ((Pax4SpriteText)sprite).SetText("Hard");
            AddChild(sprite);
            _difficultySprite = sprite;
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            //Score
            xpos       = 105.0f;
            sprite     = new Pax4SpriteText("score", null);
            position.X = xpos;
            position.Y = ypos;
            scale      = 0.65f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.White);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            ((Pax4SpriteText)sprite).SetText("Score:");
            AddChild(sprite);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            //Score value
            xpos       = 188.0f;
            sprite     = new Pax4SpriteText("scoreValue", null);
            position.X = xpos;
            position.Y = ypos - 1.0f; ypos += ystep;
            scale      = 0.75f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.GreenYellow);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            ((Pax4SpriteText)sprite).SetText("100,000,000");
            AddChild(sprite);
            _scoreSprite = sprite;
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            textNumberModifier = new Pax4SpriteTextNumberModifier("", null);
            textNumberModifier.AddChild(sprite);
            //textNumberModifier.Ini(1000000.0f, 0.0f, true, 10.0f);
            AddStateEnterModifier(textNumberModifier);
            _currentScoreModifier = textNumberModifier;

            //Total Score
            xpos       = 105.0f;
            sprite     = new Pax4SpriteText("totalScore", null);
            position.X = xpos;
            position.Y = ypos + 5.0f;
            scale      = 0.50f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.White);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            ((Pax4SpriteText)sprite).SetText("Total Score:");
            AddChild(sprite);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            //Total Score value
            xpos       = 222.0f;
            ypos       = ypos + 4.0f;
            sprite     = new Pax4SpriteText("totalScoreValue", null);
            position.X = xpos;
            position.Y = ypos;
            scale      = 0.55f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.GreenYellow);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            ((Pax4SpriteText)sprite).SetText("100,000,000");
            AddChild(sprite);
            _totalScoreSprite = sprite;
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            textNumberModifier = new Pax4SpriteTextNumberModifier("", null);
            textNumberModifier.AddChild(sprite);
            //textNumberModifier.Ini(0.0f, 10000000.0f, true, 10.0f);
            AddStateEnterModifier(textNumberModifier);
            _totalScoreModifier = textNumberModifier;

            //**************************************************
            //create medal sprites
            //**************************************************
            if (_medalSprite == null)
            {
                _medalSprite = new Dictionary <String, Pax4Sprite>();
            }
            else
            {
                return;
            }

            duration            = 0.2f;
            _medalColorModifier = new Pax4SpriteColorModifier("", null);
            _medalColorModifier.Ini(Color.White, Color.Black, duration);
            _medalColorModifier.SetOscillating();
            AddStateEnterModifier(_medalColorModifier);

            _medalAlphaModifier = new Pax4SpriteAlphaModifier("", null);
            _medalAlphaModifier.Ini(1.0f, 0.0f, duration);
            _medalAlphaModifier.SetOscillating();
            AddStateEnterModifier(_medalAlphaModifier);

            Dictionary <String, String> _medal = new Dictionary <String, String>();

            _medal.Add("nightmareOn", "Sprite/lavaandiceNightmareOn");
            _medal.Add("hardOn", "Sprite/lavaandiceHardOn");
            _medal.Add("normalOn", "Sprite/lavaandiceNormalOn");
            _medal.Add("easyOn", "Sprite/lavaandiceEasyOn");

            xpos = 335.0f;
            ypos = 250.0f;
            foreach (KeyValuePair <String, String> kvp in _medal)
            {
                textureName = kvp.Value;
                texture     = Pax4Texture2D._current.Get(textureName);
                sprite      = new Pax4SpriteTexture(kvp.Key, null);
                ((Pax4SpriteTexture)sprite).SetTexture(texture);
                sprite.SetPosition(new Vector2(xpos, ypos));
                sprite.SetScale(1.6f);
                _medalSprite.Add(sprite._name, sprite);

                _medalColorModifier.AddChild(sprite);
                _medalAlphaModifier.AddChild(sprite);

                colorModifierExit.AddChild(sprite);
                alphaModifierExit.AddChild(sprite);
            }

            _currentMedalSprite = sprite;
        }