Inheritance: CCActionInterval
コード例 #1
0
        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;
        }
コード例 #2
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));
            }
        }
コード例 #3
0
		public static CCActionFiniteTime ActionWithOneTwo(CCActionFiniteTime one, CCActionFiniteTime two){
			CCSequence act = new CCSequence(one, two);
			return act;
		}
コード例 #4
0
		protected override CCAction reverseImpl ()
		{
			CCAction act = new CCSequence (_actions[1].reverse(), _actions[0].reverse());
			return act;
		}
コード例 #5
0
		protected override CCAction copyImpl ()
		{
			CCSequence act = new CCSequence(_actions [0].copy (), _actions [1].copy ());
			return act;
		}
コード例 #6
0
        public static CCActionFiniteTime ActionWithOneTwo(CCActionFiniteTime one, CCActionFiniteTime two)
        {
            CCSequence act = new CCSequence(one, two);

            return(act);
        }
コード例 #7
0
        protected override CCAction reverseImpl()
        {
            CCAction act = new CCSequence(_actions[1].reverse(), _actions[0].reverse());

            return(act);
        }
コード例 #8
0
        protected override CCAction copyImpl()
        {
            CCSequence act = new CCSequence(_actions [0].copy(), _actions [1].copy());

            return(act);
        }