public static Actions ( |
||
action1 | ||
리턴 |
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)); } }