示例#1
0
        /// <summary>
        /// Set the scale value or animate scale
        /// </summary>
        /// <param name="index"></param>
        public override void SetIndex(int index)
        {
            base.SetIndex(index);

            Vector3 item = Current;

            if (mScaler != null)
            {
                mScaler.TargetValue = item;
                mScaler.StartRunning();
            }
            else
            {
                TargetObject.transform.localScale = item;
            }
        }
        public override void SetIndex(int index)
        {
            base.SetIndex(index);

            if (isFirstCall)
            {
                StartScale  = TargetObject.transform.localScale;
                isFirstCall = false;
            }

            float item = Current;

            if (mScaler != null)
            {
                mScaler.TargetValue = item * StartScale;
                mScaler.StartRunning();
            }
            else
            {
                TargetObject.transform.localScale = item * StartScale;
            }
        }