public static CCSkewTo actionWithDuration(float t, float sx, float sy) { CCSkewTo cCSkewTo = new CCSkewTo(); if (cCSkewTo != null) { cCSkewTo.initWithDuration(t, sx, sy); } return(cCSkewTo); }
public override CCObject copyWithZone(CCZone pZone) { CCSkewTo cCSkewTo = null; if (pZone == null || pZone.m_pCopyObject == null) { cCSkewTo = new CCSkewTo(); pZone = new CCZone(cCSkewTo); } else { cCSkewTo = (CCSkewTo)pZone.m_pCopyObject; } base.copyWithZone(pZone); cCSkewTo.initWithDuration(this.m_fDuration, this.m_fEndSkewX, this.m_fEndSkewY); return(cCSkewTo); }
public static CCSkewTo actionWithDuration(float t, float sx, float sy) { CCSkewTo pSkewTo = new CCSkewTo(); if (pSkewTo != null) { if (pSkewTo.initWithDuration(t, sx, sy)) { //pSkewTo->autorelease(); } else { //CC_SAFE_DELETE(pSkewTo); } } return pSkewTo; }
public static CCSkewTo actionWithDuration(float t, float sx, float sy) { CCSkewTo pSkewTo = new CCSkewTo(); if (pSkewTo != null) { if (pSkewTo.initWithDuration(t, sx, sy)) { //pSkewTo->autorelease(); } else { //CC_SAFE_DELETE(pSkewTo); } } return(pSkewTo); }
public override void startWithTarget(CCNode pTarget) { base.startWithTarget(pTarget); this.m_fStartSkewX = pTarget.skewX; if (this.m_fStartSkewX <= 0f) { this.m_fStartSkewX = this.m_fStartSkewX % -180f; } else { this.m_fStartSkewX = this.m_fStartSkewX % 180f; } this.m_fDeltaX = this.m_fEndSkewX - this.m_fStartSkewX; if (this.m_fDeltaX > 180f) { CCSkewTo mFDeltaX = this; mFDeltaX.m_fDeltaX = mFDeltaX.m_fDeltaX - 360f; } if (this.m_fDeltaX < -180f) { CCSkewTo cCSkewTo = this; cCSkewTo.m_fDeltaX = cCSkewTo.m_fDeltaX + 360f; } this.m_fStartSkewY = pTarget.skewY; if (this.m_fStartSkewY <= 0f) { this.m_fStartSkewY = this.m_fStartSkewY % -360f; } else { this.m_fStartSkewY = this.m_fStartSkewY % 360f; } this.m_fDeltaY = this.m_fEndSkewY - this.m_fStartSkewY; if (this.m_fDeltaY > 180f) { CCSkewTo mFDeltaY = this; mFDeltaY.m_fDeltaY = mFDeltaY.m_fDeltaY - 360f; } if (this.m_fDeltaY < -180f) { CCSkewTo mFDeltaY1 = this; mFDeltaY1.m_fDeltaY = mFDeltaY1.m_fDeltaY + 360f; } }
public override CCObject copyWithZone(CCZone pZone) { CCZone pNewZone = null; CCSkewTo pCopy = null; if (pZone != null && pZone.m_pCopyObject != null) { //in case of being called at sub class pCopy = (CCSkewTo)(pZone.m_pCopyObject); } else { pCopy = new CCSkewTo(); pZone = pNewZone = new CCZone(pCopy); } base.copyWithZone(pZone); pCopy.initWithDuration(m_fDuration, m_fEndSkewX, m_fEndSkewY); //CC_SAFE_DELETE(pNewZone); return pCopy; }
public override CCObject copyWithZone(CCZone pZone) { CCZone pNewZone = null; CCSkewTo pCopy = null; if (pZone != null && pZone.m_pCopyObject != null) { //in case of being called at sub class pCopy = (CCSkewTo)(pZone.m_pCopyObject); } else { pCopy = new CCSkewTo(); pZone = pNewZone = new CCZone(pCopy); } base.copyWithZone(pZone); pCopy.initWithDuration(m_fDuration, m_fEndSkewX, m_fEndSkewY); //CC_SAFE_DELETE(pNewZone); return(pCopy); }
public override void OnEnter() { base.OnEnter(); m_tamara.RemoveFromParentAndCleanup(true); m_grossini.RemoveFromParentAndCleanup(true); m_kathia.RemoveFromParentAndCleanup(true); // Get window size so that we can center the box layer var winSize = CCDirector.SharedDirector.WinSize; var boxSize = new CCSize(100.0f, 100.0f); var box = new CCLayerColor(new CCColor4B(255, 255, 0, 255)); box.AnchorPoint = new CCPoint(0, 0); box.Position = new CCPoint(winSize.Center.X - (boxSize.Width / 2), winSize.Center.Y - (boxSize.Height / 2)); box.ContentSize = boxSize; var uL = new CCLayerColor(new CCColor4B(255, 0, 0, 255)); box.AddChild(uL); uL.ContentSize = new CCSize(markrside, markrside); uL.Position = new CCPoint(0.0f, boxSize.Height - markrside); uL.AnchorPoint = new CCPoint(0, 0); var uR = new CCLayerColor(new CCColor4B(0, 0, 255, 255)); box.AddChild(uR); uR.ContentSize = new CCSize(markrside, markrside); uR.Position = new CCPoint(boxSize.Width - markrside, boxSize.Height - markrside); uR.AnchorPoint = new CCPoint(0, 0); AddChild(box); var actionTo = new CCSkewTo (2, 0.0f, 2.0f); var rotateTo = new CCRotateTo (2, 61.0f); var actionScaleTo = new CCScaleTo(2, -0.44f, 0.47f); var actionScaleToBack = new CCScaleTo(2, 1.0f, 1.0f); var rotateToBack = new CCRotateTo (2, 0); var actionToBack = new CCSkewTo (2, 0, 0); box.RunAction(CCSequence.FromActions(actionTo, actionToBack)); box.RunAction(CCSequence.FromActions(rotateTo, rotateToBack)); box.RunAction(CCSequence.FromActions(actionScaleTo, actionScaleToBack)); }
public override void OnEnter() { base.OnEnter(); centerSprites(3); var actionTo = new CCSkewTo (2, 37.2f, -37.2f); var actionToBack = new CCSkewTo (2, 0, 0); var actionBy = new CCSkewBy (2, 0.0f, -90.0f); var actionBy2 = new CCSkewBy (2, 45.0f, 45.0f); var actionByBack = actionBy.Reverse(); m_tamara.RunAction(CCSequence.FromActions(actionTo, actionToBack)); m_grossini.RunAction(CCSequence.FromActions(actionBy, actionByBack)); m_kathia.RunAction(CCSequence.FromActions(actionBy2, actionBy2.Reverse())); }