Exemplo n.º 1
0
        public int To(float _startValue, float _endValue, float _time, Action <float> _delegate, Action _endCallBack, bool isFixed)
        {
            lock (dic) {
                if (toDic.ContainsKey(_delegate))
                {
                    SuperTweenUnit unit = toDic [_delegate];

                    unit.Init(unit.index, _startValue, _endValue, _time, _delegate, _endCallBack, isFixed);

                    return(unit.index);
                }
                else
                {
                    int result = GetIndex();

                    SuperTweenUnit unit = new SuperTweenUnit();

                    unit.Init(result, _startValue, _endValue, _time, _delegate, _endCallBack, isFixed);

                    dic.Add(result, unit);

                    toDic.Add(_delegate, unit);

                    return(result);
                }
            }
        }
Exemplo n.º 2
0
        public int NextFrameCall(Action _endCallBack)
        {
            int result = GetIndex();

            SuperTweenUnit unit = GetUnit();

            unit.Init(result, 0, 0, 0, null, _endCallBack, false);

            dic.Add(result, unit);

            return(result);
        }
Exemplo n.º 3
0
        public int DelayCall(float _time, Action _endCallBack, bool isFixed)
        {
            int result = GetIndex();

            SuperTweenUnit unit = GetUnit();

            unit.Init(result, 0, 0, _time, null, _endCallBack, isFixed);

            dic.Add(result, unit);

            return(result);
        }