Пример #1
0
        public void Show()
        {
            if (hangingButton != null)
            {
                hangingButton.Show(0.5f);
            }

            if (isDisabled)
            {
                isClickable = true;
                isDisabled  = false;
                zobject.SetShowAlpha(1);
            }

            wasPressed = false;
            state      = ButtonState.EActive;
            if (clickStyle == (int)ButtonClickStyle.kButtonClick_Highlight)
            {
                zobject.SetTexture(normalTexture);
            }

            zobject.SetScreenPosition(position);
            zobject.SetState(ZobjectState.kZobjectHidden);
            zobject.Show();
            if (zobjectLabel != null)
            {
                CGPoint labePos = Utilities.CGPointMake(position.x + labelOffset.x, position.y + labelOffset.y);
                zobjectLabel.SetScreenPosition(labePos);
                zobjectLabel.SetState(ZobjectState.kZobjectHidden);
                zobjectLabel.Show();
            }
        }
Пример #2
0
        public void StartAppearing()
        {
            Zobject.ZobjectInfo info = new Zobject.ZobjectInfo();
            info.position    = Utilities.GetScreenCentre();
            info.isMapObject = false;
            info.startState  = ZobjectState.kZobjectHidden;
            info.texture     = pTexture;
            zobject.Initialise(info);
            switch (type)
            {
            case TransitionType.e_Invisible:
                this.StartTransition_Fade();
                zobject.SetTexture(null);
                break;

            case TransitionType.e_Fade:
                this.StartTransition_Fade();
                break;

            case TransitionType.e_WhirlingShape:
                this.StartTransition_WhirlingShape();
                break;
            }

            zobject.Show();
        }
Пример #3
0
        public void IterateAnim()
        {
            currentAnim++;
            if (currentAnim == 3)
            {
                currentAnim = 0;
            }

            if (zobject != null)
            {
                zobject.SetTexture(inTextures[currentAnim]);
            }
        }