Exemple #1
0
        public void SetOrientationParent(HangingButton inThing)
        {
            positionZob = inThing;

            for (int i = 0; i < numDigits; i++)
            {
                CGPoint pos = new CGPoint();
                pos.x = zobject[i].screenPosition.x - inThing.myButton.zobject.screenPosition.x;
                pos.y = zobject[i].screenPosition.y - inThing.myButton.zobject.screenPosition.y;
//										0.0f);

                //Uh?...
                if (score > 9)
                {
                    pos.x *= 0.8f;
                }
                else
                {
                    pos.x *= 0.15f;
                }

                pos.y *= -1.0f;

                zobject[i].myAtlasBillboard.myObject.transform.parent =
                    inThing.myButton.zobject.myAtlasBillboard.myObject.transform;

                zobject[i].myAtlasBillboard.localPosition = pos;
            }
//						positionZob = inThing;
        }
        public void AddHangingButton(HangingButton.HangingButtonInfo info)
        {
            if (hangingButton == null)
            {
                hangingButton = new HangingButton();
            }

            hangingButton.AddToSceneP1(info, this);
        }
//        public FrontEndButton()
//      {
//        return this.init(0);
//  }
        public void Dealloc()
        {
            if (zobjectLabel != null)
            {
                zobjectLabel.Dealloc();
                zobjectLabel = null;
            }

            if (hangingButton != null)
            {
                hangingButton.Dealloc();
                hangingButton = null;
            }

            if (zobject != null)
            {
                zobject.Dealloc();
                zobject = null;
            }
        }
        }                                                     ///@property(readwrite,assign) CGPoint position;

        public FrontEndButton(int buttonId)
        {
            //if (!base.init()) return null;

            hangingButton   = null;
            zobjectLabel    = null;
            goToScreen      = FrontEndScreenEnum.kFrontEndScreen_Invalid;
            myId            = buttonId;
            zobject         = new Zobject();
            state           = ButtonState.EInactive;
            isClickable     = true;
            actionId        = FrontEndActions.kFrontEndAction_None;
            soundEffectId   = (int)Audio.Enum1.kSoundEffect_ButtonPress;
            flagClicked     = false;
            clickedOneFrame = false;
            wasPressed      = false;
            isDisabled      = false;
            labelOffset     = Utilities.CGPointMake(0, 0);
            //return this;
        }
Exemple #5
0
        }                                                  ////@property(readwrite,assign) ZAtlas* myAtlas;

        public Zscore()
        {
            //  //if (!base.init()) return null;

            myAtlas           = null;
            orientationButton = null;
            positionButton    = null;
            for (int i = 0; i < (int)Enum.kMaxNumScoreDigits; i++)
            {
                zobject[i] = new Zobject();
            }

            rotationWholeWord        = 0.0f;
            scale                    = 1;
            state                    = ZscoreState.e_Hidden;
            prevScore                = -1;
            decimalPoint             = -1;
            digitWidth               = 31;
            defaultColour            = Constants.kColourWhite;
            dontDisplayLeadingZeros  = false;
            xDigit[0]                = 10.5f;
            xDigit[1]                = 6.5f;
            xDigit[2]                = 10.0f;
            xDigit[3]                = 10.0f;
            xDigit[4]                = 10.0f;
            xDigit[5]                = 10.0f;
            xDigit[6]                = 10.0f;
            xDigit[7]                = 8.5f;
            xDigit[8]                = 10.0f;
            xDigit[9]                = 10.0f;
            xDigit[10]               = 6.0f;
            timeBetweenShowingDigits = 0.05f;
            for (int i = 0; i < 11; i++)
            {
                xDigit[i] *= 3.0f;
            }

            //    //return this;
        }
 //public void SetWaitToShow(float inThing) {waitToShow = inThing;}///@property(readwrite,assign) float waitToShow;
 public void SetHangingButton(HangingButton inThing)
 {
     hangingButton = inThing;
 }                                                                     ////@property(readwrite,assign) HangingButton* hangingButton;
Exemple #7
0
        }                                                                                        ////@property(readwrite,assign) FrontEndButton* positionButton;

//public void SetTimeBetweenShowingDigits(float inThing) {timeBetweenShowingDigits = inThing;}///@property(readonly) float timeBetweenShowingDigits;
        public void SetOrientationButton(HangingButton inThing)
        {
            orientationButton = inThing;
        }                                                                             ////@property(readwrite,assign) HangingButton* orientationButton;