/** Creates a Repeat action. Times is an unsigned integer between 1 and pow(2,30). * * @param action The action needs to repeat. * @param times The repeat times. * @return An autoreleased Repeat object. */ public Repeat(FiniteTimeAction action, uint times) : base(action.duration * times) { _innerAction = action; _times = times; _actionInstant = _innerAction as ActionInstant != null ? true : false; //an instant action needs to be executed one time less in the update method since it uses startWithTarget to execute the action if (_actionInstant) { _times -= 1; } _total = 0; }
/** Create an action with the specified action and forced target. * * @param target The target needs to override. * @param action The action needs to override. * @return An autoreleased TargetedAction object. */ public TargetedAction(GameObject target, FiniteTimeAction action) : base(action.duration) { _forcedTarget = target; _action = action; }