public void moveToPage(int page) { if (page < 0 || page >= layers_.Count) { CCDebug.Error("CCScrollLayer#moveToPage: {0} - wrong page number, out of bounds. ", page); return; } if (this.delegate_ != null) { this.delegate_.scrollLayerScrollingStarted(this, page); } isMoving_ = true; CCActionFiniteTime changePage = new CCMoveTo(scrollTime_, this.positionForPageWithNumber(page)); changePage = CCSequence.Actions(changePage, new CCCallFunc(this, moveToPageEnded)); this.runAction(changePage); prevScreen_ = currentScreen_; currentScreen_ = page; }
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)); } }
public static CCActionFiniteTime ActionWithOneTwo(CCActionFiniteTime one, CCActionFiniteTime two){ CCSequence act = new CCSequence(one, two); return act; }
protected override CCAction reverseImpl () { CCAction act = new CCSequence (_actions[1].reverse(), _actions[0].reverse()); return act; }
protected override CCAction copyImpl () { CCSequence act = new CCSequence(_actions [0].copy (), _actions [1].copy ()); return act; }
public static CCActionFiniteTime ActionWithOneTwo(CCActionFiniteTime one, CCActionFiniteTime two) { CCSequence act = new CCSequence(one, two); return(act); }
protected override CCAction reverseImpl() { CCAction act = new CCSequence(_actions[1].reverse(), _actions[0].reverse()); return(act); }
protected override CCAction copyImpl() { CCSequence act = new CCSequence(_actions [0].copy(), _actions [1].copy()); return(act); }