예제 #1
0
        public virtual CCActionFiniteTime reverse()
        {
            CCActionFiniteTime act = (CCActionFiniteTime)reverseImpl();

            NSUtils.Assert(act != null, "{0}:reverseImpl not implemented", GetType().Name);
            return(act);
        }
예제 #2
0
        public new virtual CCActionFiniteTime copy()
        {
            CCActionFiniteTime act = (CCActionFiniteTime)copyImpl();

            NSUtils.Assert(act != null, "{0}:copyImpl not implemented", GetType().Name);
            return(act);
        }
예제 #3
0
        public void initWithAction(CCActionFiniteTime action)
        {
            NSUtils.Assert(action != null, "CCReverseTime: action should not be nil");
            NSUtils.Assert(action != _other, "CCReverseTime: re-init doesn't support using the same arguments");

            base.initWithDuration(action.duration);
            _other = action;
        }
예제 #4
0
        public static CCActionFiniteTime Actions(CCActionFiniteTime action1, params CCActionFiniteTime[] args)
        {
            CCActionFiniteTime prev = action1;

            for (int i = 0; i < args.Length; i++)
            {
                CCActionFiniteTime now = args[i];
                prev = ActionWithOneTwo(prev, now);
            }
            return(prev);
        }
예제 #5
0
        public static CCActionFiniteTime ActionWithArray(CCActionFiniteTime[] actions)
        {
            NSUtils.Assert(actions != null && actions.Length > 0, "CCActionSequence: actions should not be null.");
            CCActionFiniteTime prev = actions [0];

            for (int i = 1; i < actions.Length; i++)
            {
                prev = ActionWithOneTwo(prev, actions [i]);
            }
            return(prev);
        }
예제 #6
0
        protected void initWithAction(CCActionFiniteTime one, CCActionFiniteTime two)
        {
            NSUtils.Assert(one != null && two != null, "Sequence: arguments must be non-nil");
            NSUtils.Assert(one != _actions[0] && one != _actions[1], "Sequence: re-init using the same parameters is not supported");
            NSUtils.Assert(two != _actions[1] && two != _actions[0], "Sequence: re-init using the same parameters is not supported");

            float d = one.duration + two.duration;

            base.initWithDuration(d);
            _actions [0] = one;
            _actions [1] = two;
        }
예제 #7
0
        public void initWithAction(CCActionFiniteTime action, uint times)
        {
            float d = action.duration * times;

            base.initWithDuration(d);
            _times           = times;
            this.innerAction = action;
            _isActionInstant = action is CCActionInstant;
            if (_isActionInstant)
            {
                _times -= 1;
            }
            _total = 0;
        }
예제 #8
0
        public static CCActionFiniteTime Actions(CCActionFiniteTime action1, params CCActionFiniteTime[] args)
        {
            CCActionFiniteTime prev = action1;

            if (args != null)
            {
                for (int i = 0; i < args.Length; i++)
                {
                    CCActionFiniteTime now = args[i];
                    if (now == null)
                    {
                        break;
                    }
                    prev = ActionWithOneTwo(prev, now);
                }
            }
            return(prev);
        }
예제 #9
0
        public void initWithAction(CCActionFiniteTime one, CCActionFiniteTime two)
        {
            NSUtils.Assert(one != null && two != null, "Sequence: arguments must be non-nil");
            NSUtils.Assert(one != _one && one != _two, "Spawn: reinit using same parameters is not supported");
            NSUtils.Assert(two != _two && two != _one, "Spawn: reinit using same parameters is not supported");

            float d1 = one.duration;
            float d2 = two.duration;

            base.initWithDuration(Mathf.Max(d1, d2));
            _one = one;
            _two = two;

            if (FloatUtils.Big(d1, d2))
            {
                _two = CCSequence.Actions(two, new CCDelayTime(d1 - d2));
            }
            else if (d1 < d2)
            {
                _one = CCSequence.Actions(one, new CCDelayTime(d2 - d1));
            }
        }
예제 #10
0
 /** Init an action with the specified action and forced target */
 void initWithTarget(System.Object targetIn, CCActionFiniteTime actionIn)
 {
     base.initWithDuration(actionIn.duration);
     _forcedTarget = targetIn;
     _action       = actionIn;
 }
예제 #11
0
 /** Create an action with the specified action and forced target */
 public CCTargetedAction(System.Object target, CCActionFiniteTime action)
 {
     NSUtils.Assert(target != null, "CCTargetedAction: target should not be null");
     NSUtils.Assert(action != null, "CCTargetedAction: action should not be null");
     initWithTarget(target, action);
 }
예제 #12
0
 public CCSequence(CCActionFiniteTime one, CCActionFiniteTime two)
 {
     initWithAction(one, two);
 }
예제 #13
0
        public static CCActionFiniteTime ActionWithOneTwo(CCActionFiniteTime one, CCActionFiniteTime two)
        {
            CCSequence act = new CCSequence(one, two);

            return(act);
        }
예제 #14
0
 public CCRepeat(CCActionFiniteTime action, uint times)
 {
     initWithAction(action, times);
 }
예제 #15
0
 public CCReverseTime(CCActionFiniteTime action)
 {
     initWithAction(action);
 }
예제 #16
0
 protected CCSpawn(CCActionFiniteTime one, CCActionFiniteTime two)
 {
     initWithAction(one, two);
 }