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;
		}
        public new virtual CCActionFiniteTime copy()
        {
            CCActionFiniteTime act = (CCActionFiniteTime)copyImpl();

            NSUtils.Assert(act != null, "{0}:copyImpl not implemented", GetType().Name);
            return(act);
        }
		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;
		}
        public virtual CCActionFiniteTime reverse()
        {
            CCActionFiniteTime act = (CCActionFiniteTime)reverseImpl();

            NSUtils.Assert(act != null, "{0}:reverseImpl not implemented", GetType().Name);
            return(act);
        }
		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;
		}
        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;
        }
		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;
		}
		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;
		}
        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);
        }
        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);
        }
Exemple #11
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;
        }
        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;
        }
Exemple #13
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));
		}
Exemple #14
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);
        }
        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));
            }
        }
Exemple #16
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;
 }
Exemple #17
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);
 }
 public CCRepeat(CCActionFiniteTime action, uint times)
 {
     initWithAction(action, times);
 }
		public CCSequence(CCActionFiniteTime one, CCActionFiniteTime two){
			initWithAction (one, two);		
		}
		public static CCActionFiniteTime ActionWithOneTwo(CCActionFiniteTime one, CCActionFiniteTime two){
			CCSequence act = new CCSequence(one, two);
			return act;
		}
		/** 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);	
		}
 protected CCSpawn(CCActionFiniteTime one, CCActionFiniteTime two)
 {
     initWithAction(one, two);
 }
        public static CCActionFiniteTime ActionWithOneTwo(CCActionFiniteTime one, CCActionFiniteTime two)
        {
            CCSpawn act = new CCSpawn(one, two);

            return(act);
        }
		/** 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;
		}
 public CCReverseTime(CCActionFiniteTime action)
 {
     initWithAction(action);
 }
		public CCRepeat(CCActionFiniteTime action, uint times){
			initWithAction (action, times);	
		}
Exemple #27
0
 public CCSequence(CCActionFiniteTime one, CCActionFiniteTime two)
 {
     initWithAction(one, two);
 }
		public CCReverseTime(CCActionFiniteTime action){
			initWithAction(action);
		}
Exemple #29
0
		protected CCSpawn(CCActionFiniteTime one, CCActionFiniteTime two){
			initWithAction (one, two);
		}