/* Functions */

        protected override void Awake()
        {
            base.Awake();

            this.mTrackAction = this.GetComponent <JCS_SimpleTrackAction>();
            this.mScaleEffect = this.GetComponent <JCS_ScaleEffect>();

            // set system call back.
            // so when the player click it will call the function.
            SetSystemCallback(SetFocus);
        }
Esempio n. 2
0
        //========================================
        //      Unity's function
        //------------------------------
        private void Awake()
        {
            mText = this.GetComponent <Text>();

            mFadeObject        = this.GetComponent <JCS_FadeObject>();
            mSimpleTrackAction = this.GetComponent <JCS_SimpleTrackAction>();
            mSlideEffect       = this.GetComponent <JCS_SlideEffect>();

            // set the fade out call back,
            // so we active from pool,
            // and check to see if the object is fade out complete.
            // if is complete set the active to false (return
            // to pool).
            mFadeObject.fadeOutCallback = FadeOutCompleteCallback;
        }
        /* Functions */

        private void Awake()
        {
            this.mSimpleTrackAction = this.GetComponent <JCS_SimpleTrackAction>();

            // start at the current position.
            // so trick make the trackaction not moving at all at the
            // beginning of the action.
            this.mSimpleTrackAction.TargetPosition = this.transform.localPosition;

            for (int index = 0; index < mButtons.Length; ++index)
            {
                if (mButtons[index] == null)
                {
                    continue;
                }

                mButtons[index].SetSystemCallback(PointToButton);
            }
        }