Beispiel #1
0
        public void initInvencible()
        {
            invencibleButton.reload(".\\Sprites\\GUI\\frontBarInvencible");
            invencibleButton.init(content);
            backBar.reload(".\\Sprites\\GUI\\backColorBarInvencible");
            backBar.init(content);
            colorBar.reload(".\\Sprites\\GUI\\colorBarInvencible");
            colorBar.init(content);

            initDown = true;

            barTween             = new Tweener(1f, 0f, 10f, Linear.EaseNone);
            barTween.endCallback = endDownTween;
            invelnciblecallback();
        }
Beispiel #2
0
        public void show(RufusModel rufusModel, int _type)
        {
            type = _type;
            if (type == ItemBoxModel.WEARS_ID)
            {
                firstAtt = "BOUNCE";
                secAtt   = "GRAVITY";
                thrAtt   = "SPEED";

                if (rufusModel.behaviour.bounce == AbstractBehaviour.DEFAULT_BOUNCE)
                {
                    firstSymbol.reload(".\\Sprites\\GUI\\symbols\\equalSymbol");
                }
                else if (rufusModel.behaviour.bounce < AbstractBehaviour.DEFAULT_BOUNCE)
                {
                    firstSymbol.reload(".\\Sprites\\GUI\\symbols\\minusSymbol");
                }
                else
                {
                    firstSymbol.reload(".\\Sprites\\GUI\\symbols\\plusSymbol");
                }
                firstSymbol.init(content);

                if (rufusModel.behaviour.gravity == AbstractBehaviour.DEFAULT_GRAVITY)
                {
                    secSymbol.reload(".\\Sprites\\GUI\\symbols\\equalSymbol");
                }
                else if (rufusModel.behaviour.gravity < AbstractBehaviour.DEFAULT_GRAVITY)
                {
                    secSymbol.reload(".\\Sprites\\GUI\\symbols\\minusSymbol");
                }
                else
                {
                    secSymbol.reload(".\\Sprites\\GUI\\symbols\\plusSymbol");
                }
                secSymbol.init(content);

                if (rufusModel.behaviour.force == AbstractBehaviour.DEFAULT_SPEED)
                {
                    thrSymbol.reload(".\\Sprites\\GUI\\symbols\\equalSymbol");
                }
                else if (rufusModel.behaviour.force < AbstractBehaviour.DEFAULT_SPEED)
                {
                    thrSymbol.reload(".\\Sprites\\GUI\\symbols\\minusSymbol");
                }
                else
                {
                    thrSymbol.reload(".\\Sprites\\GUI\\symbols\\plusSymbol");
                }
                thrSymbol.init(content);
            }
            else if (type == ItemBoxModel.ITENS_ID)
            {
                firstAtt = "FREQUENCY";
                secAtt   = "POINTS";
                thrAtt   = "SPEED";

                if (rufusModel.behaviour.frequency == AbstractBehaviour.DEFAULT_FREQUENCY)
                {
                    firstSymbol.reload(".\\Sprites\\GUI\\symbols\\equalSymbol");
                }
                else if (rufusModel.behaviour.frequency < AbstractBehaviour.DEFAULT_FREQUENCY)
                {
                    firstSymbol.reload(".\\Sprites\\GUI\\symbols\\minusSymbol");
                }
                else
                {
                    firstSymbol.reload(".\\Sprites\\GUI\\symbols\\plusSymbol");
                }
                firstSymbol.init(content);

                if (rufusModel.behaviour.points == AbstractBehaviour.DEFAULT_POINTS)
                {
                    secSymbol.reload(".\\Sprites\\GUI\\symbols\\equalSymbol");
                }
                else if (rufusModel.behaviour.points < AbstractBehaviour.DEFAULT_POINTS)
                {
                    secSymbol.reload(".\\Sprites\\GUI\\symbols\\minusSymbol");
                }
                else
                {
                    secSymbol.reload(".\\Sprites\\GUI\\symbols\\plusSymbol");
                }
                secSymbol.init(content);

                if (rufusModel.behaviour.force == AbstractBehaviour.DEFAULT_SPEED)
                {
                    thrSymbol.reload(".\\Sprites\\GUI\\symbols\\equalSymbol");
                }
                else if (rufusModel.behaviour.force < AbstractBehaviour.DEFAULT_SPEED)
                {
                    thrSymbol.reload(".\\Sprites\\GUI\\symbols\\minusSymbol");
                }
                else
                {
                    thrSymbol.reload(".\\Sprites\\GUI\\symbols\\plusSymbol");
                }
                thrSymbol.init(content);
            }
            else if (type == ItemBoxModel.LEVELS_ID)
            {
                firstAtt = "GRAVITY";
                secAtt   = "POINTS";
                thrAtt   = "ENEMY FREQ.";

                if (rufusModel.behaviour.gravity == AbstractBehaviour.DEFAULT_GRAVITY)
                {
                    firstSymbol.reload(".\\Sprites\\GUI\\symbols\\equalSymbol");
                }
                else if (rufusModel.behaviour.gravity < AbstractBehaviour.DEFAULT_GRAVITY)
                {
                    firstSymbol.reload(".\\Sprites\\GUI\\symbols\\minusSymbol");
                }
                else
                {
                    firstSymbol.reload(".\\Sprites\\GUI\\symbols\\plusSymbol");
                }
                firstSymbol.init(content);

                if (rufusModel.behaviour.points == AbstractBehaviour.DEFAULT_POINTS)
                {
                    secSymbol.reload(".\\Sprites\\GUI\\symbols\\equalSymbol");
                }
                else if (rufusModel.behaviour.points < AbstractBehaviour.DEFAULT_POINTS)
                {
                    secSymbol.reload(".\\Sprites\\GUI\\symbols\\minusSymbol");
                }
                else
                {
                    secSymbol.reload(".\\Sprites\\GUI\\symbols\\plusSymbol");
                }
                secSymbol.init(content);

                if (rufusModel.behaviour.frequency == AbstractBehaviour.DEFAULT_FREQUENCY)
                {
                    thrSymbol.reload(".\\Sprites\\GUI\\symbols\\equalSymbol");
                }
                else if (rufusModel.behaviour.frequency < AbstractBehaviour.DEFAULT_FREQUENCY)
                {
                    thrSymbol.reload(".\\Sprites\\GUI\\symbols\\minusSymbol");
                }
                else
                {
                    thrSymbol.reload(".\\Sprites\\GUI\\symbols\\plusSymbol");
                }
                thrSymbol.init(content);
            }
            currentModel = rufusModel;
            titleLabel   = currentModel.title;
            descLabel    = currentModel.description;

            mainImage.reload(currentModel.largePath);
            mainImage.init(content);
            tweener = new Tweener(-texture.Height, 100f, 0.4f, Back.EaseOut);
            tweener.Start();
            tweener.endCallback = endShow;
        }
 private void reloadRufus()
 {
     rufusImage.reload(GameModel.rufusModels.ElementAt(GameModel.currentRufusID).largePath);
     rufusImage.init(content);
 }