Ejemplo n.º 1
0
        public void SetTextSpriteFont(String p_spriteFont, Vector2 p_position, float p_scale = 1.0f)
        {
            if (p_spriteFont == null)
            {
                return;
            }

            if (_textSprite == null)
            {
                _textSprite = new Pax4SpriteText(_name + "_Text", this);
            }

            _textSprite.SetSpriteFont(p_spriteFont);
            _textSprite.SetScale(p_scale);
            _textSprite.SetPosition(p_position);
        }
Ejemplo n.º 2
0
        public Pax4UiLavaAndIceMissionTimer(String p_name, Pax4Sprite p_parent)
            : base(p_name, p_parent)
        {
            String     textureName = null;
            Texture2D  texture     = null;
            Pax4Sprite sprite      = null;

            float scale = 1.0f;

            textureName = "Sprite/lavaandiceInGameFgTimer";
            texture     = Pax4Texture2D._current.Get(textureName);
            sprite      = new Pax4SpriteTexture("normalTimer", this);
            ((Pax4SpriteTexture)sprite).SetTexture(texture);
            _normalSprite = (Pax4SpriteTexture)sprite;

            textureName = "Sprite/lavaandiceInGameFgTimerYellow";
            texture     = Pax4Texture2D._current.Get(textureName);
            sprite      = new Pax4SpriteTexture("alarmTimer", this);
            ((Pax4SpriteTexture)sprite).SetTexture(texture);
            _alarmSpriteYellow = (Pax4SpriteTexture)sprite;

            textureName = "Sprite/lavaandiceInGameFgTimerRed";
            texture     = Pax4Texture2D._current.Get(textureName);
            sprite      = new Pax4SpriteTexture("alarmTimer", this);
            ((Pax4SpriteTexture)sprite).SetTexture(texture);
            _alarmSpriteRed = (Pax4SpriteTexture)sprite;

            //timer value
            Vector2 position = new Vector2(11.0f, 9.0f);

            sprite = new Pax4SpriteText("timerValue", this);
            scale  = 0.76f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.GreenYellow);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _timerValue = sprite;
        }
        public Pax4UiStateLavaAndIceChooseQuest(String p_name, Pax4Ui p_ui)
            : base(p_name, p_ui)
        {
            Pax4UiLavaAndIceQuestScore score = new Pax4UiLavaAndIceQuestScore();

            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);

            duration = Pax4Ui._btnDuration;

            Pax4SpritePositionModifier positionModifierEnter = null;
            Pax4SpritePositionModifier positionModifierExit  = null;
            Pax4SpriteTextModifier     textModifier          = null;

            Vector2 position0 = Vector2.Zero;
            Vector2 position1 = Vector2.Zero;

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

            String questName = null;

            textureName = "Sprite/lavaandiceMainBg";
            texture     = Pax4Texture2D._current.Get(textureName);
            sprite      = new Pax4SpriteTexture("lavaandiceMainBg", null);
            ((Pax4SpriteTexture)sprite).SetTexture(texture);
            position.X = .5f;
            position.Y = .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 = 0.5f;
            position.Y = 0.5f;
            sprite     = new Pax4SpriteText("lavaandiceChooseQuestTitle", sprite);
            AddChild(sprite);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/Livingstone");
            ((Pax4SpriteText)sprite).SetPosition(position);
            textModifier = new Pax4SpriteTextModifier("", null);
            textModifier.AddChild(sprite);

            textModifier.Ini("Choose Quest", duration, delay);
            AddStateEnterModifier(textModifier);
            duration = 0.5f;
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            //ENd of Moved Up


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

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

            //slider.SetPosition(position, Pax4Camera._backBufferWidth, texture.Height);
            slider.SetRectangleWidthHeight(0, texture.Height);
            slider.SetViewingThreshold(0, Pax4Game._graphicsDeviceManager.PreferredBackBufferWidth, 0, Pax4Game._graphicsDeviceManager.PreferredBackBufferHeight);
            slider.SetPosition(position);//, 100f, texture.Height/Pax4Game._graphicsDeviceManager.PreferredBackBufferHeight);
            slider._verticalScroll    = false;
            slider._skipRectangleDraw = true;
            //slider._horizontalSpacing = 30.0f;
            //slider.SetSnapPosition(position);
            //slider._leftTouchThreshold = 0;

            AddChild(slider);

            //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);
            //positionModifierExit.Ini(position, position0, duration, delay);
            //AddStateExitModifier(positionModifierExit);

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

            #region quests
            questName = "Prologue";
            //position.X = (float)Pax4Camera._backBufferWidth / 2.0f - (float)texture.Width / 2.0f;
            //position.Y = 330.0f;
            sprite     = new Pax4ButtonLavaAndIceQuest("lavaandicePrologueBtn", slider, questName);
            position.X = -.17f; // 64.0f;//108.0f delta 44
            position.Y = -.1f;  // 200.0f;//255.0f delta 55
            ((Pax4Button)sprite).SetText(questName, position);
            ((Pax4Button)sprite).SetTexture(texture);
            sprite.SetRectangleWidthHeight(texture.Width, texture.Height);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            ((Pax4Button)sprite).SetOnClick(this.lavaandicePrologueBtn_Click);
            slider.AddChild(sprite);
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            //alphaModifier = new Pax4SpriteAlphaModifier(sprite);
            //alphaModifier.Ini(0.0f, 1.0f, 3.0f);
            //AddStateEnterModifier(alphaModifier);
            //alphaModifier.SetOscillating();

            questName = "Equilibrium";
            sprite    = new Pax4ButtonLavaAndIceQuest("lavaandiceEquilibriumBtn", slider, questName);
            //position.X = 10f;//50.0f;
            //position.Y = 0f;// 200.0f;
            ((Pax4Button)sprite).SetText(questName, position);
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceQuest)sprite).SetComingSoon();
            if (!((Pax4ButtonLavaAndIceQuest)sprite)._comingSoon)
            {
                ((Pax4Button)sprite).SetOnClick(this.lavaandiceEquilibriumBtn_Click);
            }
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            questName = "LavaGrail";
            sprite    = new Pax4ButtonLavaAndIceQuest("lavaandiceLavaGrailBtn", slider, questName);
            //position.X = 68.0f;
            //position.Y = 200.0f;
            ((Pax4Button)sprite).SetText("Lava Grail", position);
            ((Pax4Button)sprite).SetTexture(texture);
            ((Pax4Button)sprite).SetTextureOver(textureOver);
            slider.AddChild(sprite);
            ((Pax4ButtonLavaAndIceQuest)sprite).SetComingSoon();
            if (!((Pax4ButtonLavaAndIceQuest)sprite)._comingSoon)
            {
                ((Pax4Button)sprite).SetOnClick(this.lavaandiceLavaGrailBtn_Click);
            }
            colorModifierEnter.AddChild(sprite);
            colorModifierExit.AddChild(sprite);
            alphaModifierEnter.AddChild(sprite);
            alphaModifierExit.AddChild(sprite);

            //questName = "IceGrail";
            //sprite = new Pax4ButtonLavaAndIceQuest("lavaandiceIceGrailBtn", slider, questName);
            //position.X = 78.0f;
            //position.Y = 200.0f;
            //((Pax4Button)sprite).SetText("Ice Grail", position);
            //((Pax4Button)sprite).SetTexture(texture);
            //((Pax4Button)sprite).SetTextureOver(textureOver);
            //slider.AddChild(sprite);
            //((Pax4ButtonLavaAndIceQuest)sprite).SetComingSoon();
            //if (!((Pax4ButtonLavaAndIceQuest)sprite)._comingSoon)
            //    ((Pax4Button)sprite).SetOnClick(this.lavaandiceIceGrailBtn_Click);
            //colorModifierEnter.AddChild(sprite);
            //colorModifierExit.AddChild(sprite);
            //alphaModifierEnter.AddChild(sprite);
            //alphaModifierExit.AddChild(sprite);

            //questName = "Dragons";
            //sprite = new Pax4ButtonLavaAndIceQuest("lavaandiceDragonsBtn", slider, questName);
            //position.X = 70.0f;
            //position.Y = 200.0f;
            //((Pax4Button)sprite).SetText("Dragons", position);
            //((Pax4Button)sprite).SetTexture(texture);
            //((Pax4Button)sprite).SetTextureOver(textureOver);
            //slider.AddChild(sprite);
            //((Pax4ButtonLavaAndIceQuest)sprite).SetComingSoon();
            //if (!((Pax4ButtonLavaAndIceQuest)sprite)._comingSoon)
            //    ((Pax4Button)sprite).SetOnClick(this.lavaandiceDragonsBtn_Click);
            //colorModifierEnter.AddChild(sprite);
            //colorModifierExit.AddChild(sprite);
            //alphaModifierEnter.AddChild(sprite);
            //alphaModifierExit.AddChild(sprite);



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



            #endregion //quests

            //Moved Stuff up

            //misc
            //sprite = new Pax4Button("lavaandiceSettingsBtn", null);
            //AddSprite(sprite);
            //textureName = "Sprite/lavaandiceSettingsBtn";
            //texture = Pax4Texture2D._current.Get(textureName);
            //((Pax4Button)sprite).SetTexture(texture);
            //textureName = "Sprite/lavaandiceSettingsBtnOver";
            //texture = Pax4Texture2D._current.Get(textureName);
            //((Pax4Button)sprite).SetTextureOver(texture);
            ////position.X = 14.0f;
            ////position.Y = 20.0f;
            ////((Pax4Button)sprite).SetTextSpriteFont("SpriteFont/Livingstone", position, "Settings", 0.8f);
            //position.X = 28.0f;
            //position.Y = 7.0f;
            //((Pax4Button)sprite).SetTextSpriteFont("SpriteFont/Livingstone", position, "Instru\nctions", 0.7f);
            //((Pax4Button)sprite).SetOnClick(this.lavaandiceSettingsBtn_Click);

            //position.X = 160.0f;
            //position.Y = 820.0f;

            //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, delay);
            //AddStateEnterModifier(positionModifierEnter);

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

            //colorModifierEnter.AddChild(sprite);
            //colorModifierExit.AddChild(sprite);
            //alphaModifierEnter.AddChild(sprite);
            //alphaModifierExit.AddChild(sprite);
        }
Ejemplo n.º 4
0
        public Pax4ButtonLavaAndIceQuest(String p_name, Pax4Sprite p_parent, String p_questName)
            : base(p_name, p_parent)
        {
            _questButton.Add(this);

            _questName = p_questName;

            _sprite = new List <Pax4Sprite>();

            Pax4Sprite sprite = null;
            Vector2    position;
            float      scale;

            float xpos  = 0.0f;
            float xstep = 0.0f;
            float xoff  = 0.0f;

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

            #region scores

            //title
            sprite     = new Pax4SpriteText(p_name + "_Text", this);
            position.X = 0f; //120.0f;
            position.Y = 0f; //250.0f;
            scale      = 1.0f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.White);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/Livingstone");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _textSprite = (Pax4SpriteText)sprite;

            //pct completed
            sprite = new Pax4SpriteText("pctCompleted", this);
            //position.X = 140.0f;//50
            //position.Y = 82.0f;//20
            scale = 0.45f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.White);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            ((Pax4SpriteText)sprite).SetText("% completed");
            _sprite.Add(sprite);

            //pct completed value
            sprite = new Pax4SpriteText("pctCompletedValue", this);
            //position.X = 176.0f;
            //position.Y = 40.0f;
            scale = 1.0f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.GreenYellow);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _sprite.Add(sprite);
            _pctCompletedValue = sprite;

            //Total Score
            xpos   = 30.0f;
            ypos   = 260.0f;
            ystep  = 20.0f;
            sprite = new Pax4SpriteText("totalScore", this);
            //position.X = xpos;
            //position.Y = ypos; ypos += ystep;
            scale = 0.41f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.White);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            ((Pax4SpriteText)sprite).SetText("Total Score");
            _sprite.Add(sprite);

            //Total Score value
            sprite = new Pax4SpriteText("totalScoreValue", this);
            //position.X = xpos;
            //position.Y = ypos; ypos += ystep;
            scale = 0.41f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.GreenYellow);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _sprite.Add(sprite);
            _totalScoreValue = sprite;

            //Last Score
            sprite = new Pax4SpriteText("lastScore", this);
            //position.X = xpos;
            //position.Y = ypos; ypos += ystep;
            scale = 0.41f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.White);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            ((Pax4SpriteText)sprite).SetText("Last Score");
            _sprite.Add(sprite);

            //Last Score value
            sprite = new Pax4SpriteText("lastScoreValue", this);
            //position.X = xpos;
            //position.Y = ypos; ypos += ystep;
            scale = 0.41f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.GreenYellow);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _sprite.Add(sprite);
            _lastScoreValue = sprite;

            ////Kills
            //sprite = new Pax4SpriteText("kills", this);
            //position.X = 160.0f;
            //position.Y = 370.0f;
            //scale = 0.3f;
            //sprite.SetPosition(position);
            //sprite.SetColor(Color.White);
            //((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            //((Pax4SpriteText)sprite).SetScale(scale);
            //((Pax4SpriteText)sprite).SetText(_kills);
            //_sprite.Add(sprite);

            xpos  = 160.0f;
            ypos  = 247.0f;
            ystep = 18;
            //lava
            sprite = new Pax4SpriteText("lavaKills", this);
            //position.X = xpos;
            //position.Y = ypos; ypos += ystep;
            scale = 0.39f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.Red);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            ((Pax4SpriteText)sprite).SetText("lava kills");
            _sprite.Add(sprite);

            //lava value
            sprite = new Pax4SpriteText("lavaKillsValue", this);
            //position.X = xpos + 20.0f;
            //position.Y = ypos; ypos += ystep;
            scale = 0.39f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.GreenYellow);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _sprite.Add(sprite);
            _lavaKillsValue = sprite;

            //ice
            sprite = new Pax4SpriteText("iceKills", this);
            //position.X = xpos;
            //position.Y = ypos; ypos += ystep;
            scale = 0.39f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.Cyan);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            ((Pax4SpriteText)sprite).SetText("ice kills");
            _sprite.Add(sprite);

            //ice value
            sprite = new Pax4SpriteText("iceKillsValue", this);
            //position.X = xpos + 20.0f;
            //position.Y = ypos; ypos += ystep;
            scale = 0.39f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.GreenYellow);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _sprite.Add(sprite);
            _iceKillsValue = sprite;

            //monsters
            sprite = new Pax4SpriteText("monsterKills", this);
            //position.X = xpos;
            //position.Y = ypos; ypos += ystep;
            scale = 0.39f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.OrangeRed);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            ((Pax4SpriteText)sprite).SetText("monster kills");
            _sprite.Add(sprite);

            //monsters value
            sprite = new Pax4SpriteText("monsterKillsValue", this);
            //position.X = xpos + 20.0f;
            //position.Y = ypos; ypos += ystep;
            scale = 0.39f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.GreenYellow);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _sprite.Add(sprite);
            _monsterKillsValue = sprite;

            #endregion //scores

            #region medals

            //String textureName = null;
            //Texture2D texture = null;

            xpos  = 58.0f;
            xoff  = 24.0f;
            xstep = 48.0f;
            ypos  = 152.0f;
            yoff  = 26.0f;

            sprite = new Pax4SpriteTexture("nightmare", this);
            sprite.SetPosition(new Vector2(xpos, ypos));
            _sprite.Add(sprite);
            _nightmareMedal = sprite;

            sprite     = new Pax4SpriteText("nightmareCount", this);
            position.X = xpos + xoff;
            position.Y = ypos + yoff;
            scale      = 0.4f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.White);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _sprite.Add(sprite);
            _nightmareMedalCount = sprite;

            xpos += xstep;

            sprite = new Pax4SpriteTexture("hard", this);
            sprite.SetPosition(new Vector2(xpos, ypos));
            _sprite.Add(sprite);
            _hardMedal = sprite;

            sprite     = new Pax4SpriteText("hardCount", this);
            position.X = xpos + xoff;
            position.Y = ypos + yoff;
            scale      = 0.4f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.White);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _sprite.Add(sprite);
            _hardMedalCount = sprite;

            xpos += xstep;

            sprite = new Pax4SpriteTexture("normal", this);
            sprite.SetPosition(new Vector2(xpos, ypos));
            _sprite.Add(sprite);
            _normalMedal = sprite;

            sprite     = new Pax4SpriteText("normalCount", this);
            position.X = xpos + xoff;
            position.Y = ypos + yoff;
            scale      = 0.4f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.White);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _sprite.Add(sprite);
            _normalMedalCount = sprite;

            xpos += xstep;

            sprite = new Pax4SpriteTexture("easy", this);
            sprite.SetPosition(new Vector2(xpos, ypos));
            _sprite.Add(sprite);
            _easyMedal = sprite;

            sprite     = new Pax4SpriteText("easyCount", this);
            position.X = xpos + xoff;
            position.Y = ypos + yoff;
            scale      = 0.4f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.White);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _sprite.Add(sprite);
            _easyMedalCount = sprite;

            #endregion //medals
        }
Ejemplo n.º 5
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;
        }
Ejemplo n.º 6
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);
        }
Ejemplo n.º 7
0
        public Pax4ButtonLavaAndIceMission(String p_name, Pax4Sprite p_parent, String p_questName, int p_missionIndex)
            : base(p_name, p_parent)
        {
            _questName    = p_questName;
            _missionIndex = p_missionIndex;

            _missionButton.Add(this);

            _questNameMissionIndex = p_questName + "_" + p_missionIndex;

            _sprite = new List <Pax4Sprite>();

            Pax4Sprite sprite = null;
            Vector2    position;
            float      scale;

            float xpos  = 0.0f;
            float xstep = 0.0f;
            float xoff  = 0.0f;

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

            //title
            sprite = new Pax4SpriteText(p_name + "_Text", this);
            //position.X = 154.0f;
            //position.Y = 66.0f;
            scale = 0.9f;
            sprite.SetPosition(Vector2.Zero);
            sprite.SetColor(Color.Gold);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/Livingstone");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _textSprite = (Pax4SpriteText)sprite;

            if (p_missionIndex <= 0)
            {
                return;
            }

            #region scores

            //High Score
            xpos       = 12.0f;
            ypos       = 12.0f;
            ystep      = 12.0f;
            sprite     = new Pax4SpriteText("highScore", this);
            position.X = xpos;
            position.Y = ypos; ypos += ystep;
            scale      = 0.30f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.White);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            ((Pax4SpriteText)sprite).SetText("High Score");
            _sprite.Add(sprite);

            //High Score value
            sprite     = new Pax4SpriteText("highScoreValue", this);
            position.X = xpos;
            position.Y = ypos; ypos += ystep;
            scale      = 0.35f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.GreenYellow);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _sprite.Add(sprite);
            _highScoreValue = sprite;

            //xpos = xpos;
            ypos  = ypos + 5.0f;
            ystep = 12.0f;
            //Last Score
            sprite     = new Pax4SpriteText("lastScore", this);
            position.X = xpos;
            position.Y = ypos; ypos += ystep;
            scale      = 0.30f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.White);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            ((Pax4SpriteText)sprite).SetText("Last Score");
            _sprite.Add(sprite);

            //Last Score value
            sprite     = new Pax4SpriteText("lastScoreValue", this);
            position.X = xpos;
            position.Y = ypos; ypos += ystep;
            scale      = 0.35f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.GreenYellow);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _sprite.Add(sprite);
            _lastScoreValue = sprite;

            #endregion

            #region medals

            //String textureName = null;
            //Texture2D texture = null;

            xpos  = 142.0f;
            xoff  = 24.0f;
            xstep = 48.0f;
            ypos  = 14.0f;
            yoff  = 26.0f;

            //int medalCount = 0;
            //int medal = 0;

            sprite = new Pax4SpriteTexture("nightmare", this);
            sprite.SetPosition(new Vector2(xpos, ypos));
            _sprite.Add(sprite);
            _nightmareMedal = sprite;

            sprite     = new Pax4SpriteText("nightmareCount", this);
            position.X = xpos + xoff;
            position.Y = ypos + yoff;
            scale      = 0.4f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.White);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _sprite.Add(sprite);
            _nightmareMedalCount = sprite;

            xpos += xstep;

            sprite = new Pax4SpriteTexture("hard", this);
            sprite.SetPosition(new Vector2(xpos, ypos));
            _sprite.Add(sprite);
            _hardMedal = sprite;

            sprite     = new Pax4SpriteText("hardCount", this);
            position.X = xpos + xoff;
            position.Y = ypos + yoff;
            scale      = 0.4f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.White);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _sprite.Add(sprite);
            _hardMedalCount = sprite;

            xpos += xstep;

            sprite = new Pax4SpriteTexture("normal", this);
            sprite.SetPosition(new Vector2(xpos, ypos));
            _sprite.Add(sprite);
            _normalMedal = sprite;

            sprite     = new Pax4SpriteText("normalCount", this);
            position.X = xpos + xoff;
            position.Y = ypos + yoff;
            scale      = 0.4f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.White);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _sprite.Add(sprite);
            _normalMedalCount = sprite;

            xpos += xstep;

            sprite = new Pax4SpriteTexture("easy", this);
            sprite.SetPosition(new Vector2(xpos, ypos));
            _sprite.Add(sprite);
            _easyMedal = sprite;

            sprite = new Pax4SpriteText("easyCount", this);
            //position.X = xpos + xoff;
            //position.Y = ypos + yoff;
            scale = 0.4f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.White);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _sprite.Add(sprite);
            _easyMedalCount = sprite;

            #endregion //medals

            //pct completed value
            sprite = new Pax4SpriteText("pctCompletedValue", this);
            //position.X = 86.0f;
            //position.Y = 50.0f;
            scale = 0.4f;
            sprite.SetPosition(position);
            sprite.SetColor(Color.OrangeRed);
            ((Pax4SpriteText)sprite).SetSpriteFont("SpriteFont/ArialBold");
            ((Pax4SpriteText)sprite).SetScale(scale);
            _sprite.Add(sprite);
            _pctCompletedValue = sprite;

            if (Pax4UiLavaAndIceQuestScore._score[_questNameMissionIndex + "_Locked"] > 0)
            {
                SetLocked();
            }
        }
        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;
        }