public override void onEnter() { base.onEnter(); CCSize s = CCDirector.sharedDirector().getWinSize(); m_pInScene.scale = 0.5f; m_pInScene.position = new CCPoint(s.width, 0); m_pInScene.anchorPoint = new CCPoint(0.5f, 0.5f); m_pOutScene.anchorPoint = new CCPoint(0.5f, 0.5f); CCActionInterval jump = CCJumpBy.actionWithDuration(m_fDuration / 4, new CCPoint(-s.width, 0), s.width / 4, 2); CCActionInterval scaleIn = CCScaleTo.actionWithDuration(m_fDuration / 4, 1.0f); CCActionInterval scaleOut = CCScaleTo.actionWithDuration(m_fDuration / 4, 0.5f); CCActionInterval jumpZoomOut = (CCActionInterval)(CCSequence.actions(scaleOut, jump)); CCActionInterval jumpZoomIn = (CCActionInterval)(CCSequence.actions(jump, scaleIn)); CCActionInterval delay = CCDelayTime.actionWithDuration(m_fDuration / 2); m_pOutScene.runAction(jumpZoomOut); m_pInScene.runAction ( CCSequence.actions ( delay, jumpZoomIn, CCCallFunc.actionWithTarget(this, base.finish) ) ); }
public override void onEnter() { base.onEnter(); m_pInScene.Scale = 0.001f; m_pOutScene.Scale = 1.0f; m_pInScene.AnchorPoint = new CCPoint(0.5f, 0.5f); m_pOutScene.AnchorPoint = new CCPoint(0.5f, 0.5f); CCActionInterval rotozoom = (CCActionInterval)(CCSequence.actions ( CCSpawn.actions ( CCScaleBy.actionWithDuration(m_fDuration / 2, 0.001f), CCRotateBy.actionWithDuration(m_fDuration / 2, 360 * 2) ), CCDelayTime.actionWithDuration(m_fDuration / 2) )); m_pOutScene.RunAction(rotozoom); m_pInScene.RunAction ( CCSequence.actions ( rotozoom.Reverse(), CCCallFunc.actionWithTarget(this, (base.finish)) ) ); }
public void disableMenuCallback(object pSender) { m_pMenu1.Enabled = false; CCDelayTime wait = new CCDelayTime (5); CCCallFunc enable = new CCCallFunc(enableMenuCallback); CCFiniteTimeAction seq = CCSequence.FromActions(wait, enable); m_pMenu1.RunAction(seq); }
public static CCCallFunc actionWithTarget(SelectorProtocol pSelectorTarget, SEL_CallFunc selector) { CCCallFunc cCCallFunc = new CCCallFunc(); if (cCCallFunc == null || !cCCallFunc.initWithTarget(pSelectorTarget)) { return(null); } cCCallFunc.m_pCallFunc = selector; return(cCCallFunc); }
public static CCCallFunc actionWithTarget(SelectorProtocol pSelectorTarget, SEL_CallFunc selector) { CCCallFunc pRet = new CCCallFunc(); if (pRet != null && pRet.initWithTarget(pSelectorTarget)) { pRet.m_pCallFunc = selector; return(pRet); } return(null); }
public static CCCallFunc actionWithTarget(SelectorProtocol pSelectorTarget, SEL_CallFunc selector) { CCCallFunc pRet = new CCCallFunc(); if (pRet != null && pRet.initWithTarget(pSelectorTarget)) { pRet.m_pCallFunc = selector; return pRet; } return null; }
public override void onEnter() { base.onEnter(); CCActionInterval inA, outA; m_pInScene.Visible = false; float inDeltaZ, inAngleZ; float outDeltaZ, outAngleZ; if (m_eOrientation == tOrientation.kOrientationUpOver) { inDeltaZ = 90; inAngleZ = 270; outDeltaZ = 90; outAngleZ = 0; } else { inDeltaZ = -90; inAngleZ = 90; outDeltaZ = -90; outAngleZ = 0; } inA = (CCActionInterval)CCSequence.actions ( CCDelayTime.actionWithDuration(m_fDuration / 2), CCSpawn.actions ( new CCOrbitCamera(m_fDuration / 2, 1, 0, inAngleZ, inDeltaZ, 90, 0), CCScaleTo.actionWithDuration(m_fDuration / 2, 1), CCShow.action() ), CCCallFunc.actionWithTarget(this, base.finish) ); outA = (CCActionInterval)CCSequence.actions ( CCSpawn.actions ( new CCOrbitCamera(m_fDuration / 2, 1, 0, outAngleZ, outDeltaZ, 90, 0), CCScaleTo.actionWithDuration(m_fDuration / 2, 0.5f) ), CCHide.action(), CCDelayTime.actionWithDuration(m_fDuration / 2) ); m_pInScene.Scale = 0.5f; m_pInScene.RunAction(inA); m_pOutScene.RunAction(outA); }
public override void onEnter() { base.onEnter(); // create a transparent color layer // in which we are going to add our rendertextures CCSize size = CCDirector.sharedDirector().getWinSize(); // create the second render texture for outScene CCRenderTexture outTexture = CCRenderTexture.renderTextureWithWidthAndHeight((int)size.width, (int)size.height); if (outTexture == null) { return; } outTexture.Sprite.anchorPoint = new CCPoint(0.5f, 0.5f); outTexture.position = new CCPoint(size.width / 2, size.height / 2); outTexture.anchorPoint = new CCPoint(0.5f, 0.5f); // render outScene to its texturebuffer outTexture.clear(0, 0, 0, 1); outTexture.begin(); m_pOutScene.visit(); outTexture.end(); // Since we've passed the outScene to the texture we don't need it. this.hideOutShowIn(); // We need the texture in RenderTexture. CCProgressTimer outNode = CCProgressTimer.progressWithTexture(outTexture.Sprite.Texture); // but it's flipped upside down so we flip the sprite //outNode.Sprite.->setFlipY(true); // Return the radial type that we want to use outNode.Type = radialType(); outNode.Percentage = 100.0f; outNode.position = new CCPoint(size.width / 2, size.height / 2); outNode.anchorPoint = new CCPoint(0.5f, 0.5f); // create the blend action CCAction layerAction = CCSequence.actions ( CCProgressFromTo.actionWithDuration(m_fDuration, 100.0f, 0.0f), CCCallFunc.actionWithTarget(this, base.finish) ); // run the blend action outNode.runAction(layerAction); // add the layer (which contains our two rendertextures) to the scene this.addChild(outNode, 2, kSceneRadial); }
public override void onEnter() { base.onEnter(); this.initScenes(); CCActionInterval a = this.action(); m_pInScene.RunAction ( CCSequence.actions ( this.easeActionWithAction(a), CCCallFunc.actionWithTarget(this, base.finish) ) ); }
public override void onEnter() { base.onEnter(); this.initScenes(); CCActionInterval incAction = this.action(); CCActionInterval outcAction = this.action(); CCActionInterval inAction = easeActionWithAction(incAction); CCActionInterval outAction = (CCActionInterval)CCSequence.actions ( easeActionWithAction(outcAction), CCCallFunc.actionWithTarget(this, (base.finish)) ); m_pInScene.RunAction(inAction); m_pOutScene.RunAction(outAction); }
public override void onEnter() { base.onEnter(); m_pInScene.Visible = false; CCActionInterval split = action(); CCActionInterval seq = (CCActionInterval)CCSequence.actions ( split, CCCallFunc.actionWithTarget(this, (base.hideOutShowIn)), split.Reverse() ); this.RunAction(CCSequence.actions( easeActionWithAction(seq), CCCallFunc.actionWithTarget(this, base.finish), CCStopGrid.action())); }
public override CCObject copyWithZone(CCZone pZone) { CCCallFunc cCCallFunc = null; if (pZone == null || pZone.m_pCopyObject == null) { cCCallFunc = new CCCallFunc(); pZone = new CCZone(cCCallFunc); } else { cCCallFunc = (CCCallFunc)pZone.m_pCopyObject; } base.copyWithZone(pZone); cCCallFunc.initWithTarget(this.m_pSelectorTarget); cCCallFunc.m_pCallFunc = this.m_pCallFunc; cCCallFunc.m_scriptFuncName = this.m_scriptFuncName; return(cCCallFunc); }
public override void onEnter() { float single; float single1; float single2; float single3; base.onEnter(); this.m_pInScene.visible = false; if (this.m_eOrientation != tOrientation.kOrientationRightOver) { single = -90f; single1 = 90f; single2 = -90f; single3 = 0f; } else { single = 90f; single1 = 270f; single2 = 90f; single3 = 0f; } CCFiniteTimeAction[] cCFiniteTimeActionArray = new CCFiniteTimeAction[] { CCDelayTime.actionWithDuration(this.m_fDuration / 2f), null, null, null }; CCFiniteTimeAction[] cCFiniteTimeActionArray1 = new CCFiniteTimeAction[] { CCOrbitCamera.actionWithDuration(this.m_fDuration / 2f, 1f, 0f, single1, single, -45f, 0f), CCScaleTo.actionWithDuration(this.m_fDuration / 2f, 1f), CCShow.action() }; cCFiniteTimeActionArray[1] = CCSpawn.actions(cCFiniteTimeActionArray1); cCFiniteTimeActionArray[2] = CCShow.action(); cCFiniteTimeActionArray[3] = CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.finish)); CCActionInterval cCActionInterval = (CCActionInterval)CCSequence.actions(cCFiniteTimeActionArray); CCFiniteTimeAction[] cCFiniteTimeActionArray2 = new CCFiniteTimeAction[3]; CCFiniteTimeAction[] cCFiniteTimeActionArray3 = new CCFiniteTimeAction[] { CCOrbitCamera.actionWithDuration(this.m_fDuration / 2f, 1f, 0f, single3, single2, 45f, 0f), CCScaleTo.actionWithDuration(this.m_fDuration / 2f, 0.5f) }; cCFiniteTimeActionArray2[0] = CCSpawn.actions(cCFiniteTimeActionArray3); cCFiniteTimeActionArray2[1] = CCHide.action(); cCFiniteTimeActionArray2[2] = CCDelayTime.actionWithDuration(this.m_fDuration / 2f); CCActionInterval cCActionInterval1 = (CCActionInterval)CCSequence.actions(cCFiniteTimeActionArray2); this.m_pInScene.scale = 0.5f; this.m_pInScene.runAction(cCActionInterval); this.m_pOutScene.runAction(cCActionInterval1); }
public override void onEnter() { base.onEnter(); CCLayerColor l = CCLayerColor.layerWithColor(m_tColor); m_pInScene.visible = false; addChild(l, 2, kSceneFade); CCNode f = getChildByTag(kSceneFade); CCActionInterval a = (CCActionInterval)CCSequence.actions ( CCFadeIn.actionWithDuration(m_fDuration / 2), CCCallFunc.actionWithTarget(this, (base.hideOutShowIn)), CCFadeOut.actionWithDuration(m_fDuration / 2), CCCallFunc.actionWithTarget(this, (base.finish)) ); f.runAction(a); }
public override void onEnter() { base.onEnter(); CCSize s = Director.SharedDirector.DesignSize; float aspect = s.Width / s.Height; int x = (int)(12 * aspect); int y = 12; CCTurnOffTiles toff = CCTurnOffTiles.actionWithSize(new ccGridSize(x, y), m_fDuration); CCFiniteTimeAction action = easeActionWithAction(toff); m_pOutScene.RunAction ( CCSequence.actions ( action, CCCallFunc.actionWithTarget(this, (base.finish)), CCStopGrid.action() ) ); }
public override void onEnter() { base.onEnter(); CCSize s = Director.SharedDirector.DesignSize; float aspect = s.Width / s.Height; int x = (int)(12 * aspect); int y = 12; CCActionInterval action = actionWithSize(new ccGridSize(x, y)); m_pOutScene.RunAction ( CCSequence.actions ( easeActionWithAction(action), CCCallFunc.actionWithTarget(this, base.finish), CCStopGrid.action() ) ); }
public override void OnEnter() { base.OnEnter(); CCSize s = CCDirector.SharedDirector.WinSize; CCLabelTTF l = new CCLabelTTF("Should not crash", "arial", 16); AddChild(l); l.Position = (new CCPoint(s.Width / 2, 245)); CCMoveBy pMove = new CCMoveBy (2, new CCPoint(200, 0)); CCCallFunc pCallback = new CCCallFunc(stopAction); CCActionInterval pSequence = (CCActionInterval)CCSequence.FromActions(pMove, pCallback); pSequence.Tag = (int)KTag.kTagSequence; CCSprite pChild = new CCSprite(s_pPathGrossini); pChild.Position = (new CCPoint(200, 200)); AddChild(pChild, 1, kTagGrossini); pChild.RunAction(pSequence); }
public override void onEnter() { base.onEnter(); CCSize s = Director.SharedDirector.DesignSize; int x, y; if (s.Width > s.Height) { x = 16; y = 12; } else { x = 12; y = 16; } CCActionInterval action = this.actionWithSize(ccTypes.ccg(x, y)); if (!m_bBack) { m_pOutScene.RunAction(CCSequence.actions ( action, CCCallFunc.actionWithTarget(this, base.finish), CCStopGrid.action())); } else { // to prevent initial flicker m_pInScene.Visible = false; m_pInScene.RunAction(CCSequence.actions ( CCShow.action(), action, CCCallFunc.actionWithTarget(this, base.finish), CCStopGrid.action())); } }
public override CCObject copyWithZone(CCZone pZone) { CCZone pNewZone = null; CCCallFunc pRet = null; if (pZone != null && pZone.m_pCopyObject != null) { //in case of being called at sub class pRet = (CCCallFunc)(pZone.m_pCopyObject); } else { pRet = new CCCallFunc(); pZone = pNewZone = new CCZone(pRet); } base.copyWithZone(pZone); pRet.initWithTarget(m_pSelectorTarget); pRet.m_pCallFunc = m_pCallFunc; pRet.m_scriptFuncName = m_scriptFuncName; return pRet; }
public override CCObject copyWithZone(CCZone pZone) { CCZone pNewZone = null; CCCallFunc pRet = null; if (pZone != null && pZone.m_pCopyObject != null) { //in case of being called at sub class pRet = (CCCallFunc)(pZone.m_pCopyObject); } else { pRet = new CCCallFunc(); pZone = pNewZone = new CCZone(pRet); } base.copyWithZone(pZone); pRet.initWithTarget(m_pSelectorTarget); pRet.m_pCallFunc = m_pCallFunc; pRet.m_scriptFuncName = m_scriptFuncName; return(pRet); }
public override void onEnter() { base.onEnter(); m_pInScene.scale = 0.001f; m_pOutScene.scale = (1.0f); m_pInScene.anchorPoint = new CCPoint(2 / 3.0f, 0.5f); m_pOutScene.anchorPoint = new CCPoint(1 / 3.0f, 0.5f); CCActionInterval scaleOut = CCScaleTo.actionWithDuration(m_fDuration, 0.01f); CCActionInterval scaleIn = CCScaleTo.actionWithDuration(m_fDuration, 1.0f); m_pInScene.runAction(this.easeActionWithAction(scaleIn)); m_pOutScene.runAction ( CCSequence.actions ( this.easeActionWithAction(scaleOut), CCCallFunc.actionWithTarget(this, (base.finish)) ) ); }
public override void onEnter() { base.onEnter(); CCSize winSize = CCDirector.sharedDirector().getWinSize(); this.m_pInScene.scale = 0.5f; this.m_pInScene.position = new CCPoint(winSize.width, 0f); this.m_pInScene.anchorPoint = new CCPoint(0.5f, 0.5f); this.m_pOutScene.anchorPoint = new CCPoint(0.5f, 0.5f); CCActionInterval cCActionInterval = CCJumpBy.actionWithDuration(this.m_fDuration / 4f, new CCPoint(-winSize.width, 0f), winSize.width / 4f, 2); CCActionInterval cCActionInterval1 = CCScaleTo.actionWithDuration(this.m_fDuration / 4f, 1f); CCActionInterval cCActionInterval2 = CCScaleTo.actionWithDuration(this.m_fDuration / 4f, 0.5f); CCFiniteTimeAction[] cCFiniteTimeActionArray = new CCFiniteTimeAction[] { cCActionInterval2, cCActionInterval }; CCActionInterval cCActionInterval3 = (CCActionInterval)CCSequence.actions(cCFiniteTimeActionArray); CCFiniteTimeAction[] cCFiniteTimeActionArray1 = new CCFiniteTimeAction[] { cCActionInterval, cCActionInterval1 }; CCActionInterval cCActionInterval4 = (CCActionInterval)CCSequence.actions(cCFiniteTimeActionArray1); CCActionInterval cCActionInterval5 = CCDelayTime.actionWithDuration(this.m_fDuration / 2f); this.m_pOutScene.runAction(cCActionInterval3); CCScene mPInScene = this.m_pInScene; CCFiniteTimeAction[] cCFiniteTimeActionArray2 = new CCFiniteTimeAction[] { cCActionInterval5, cCActionInterval4, CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.finish)) }; mPInScene.runAction(CCSequence.actions(cCFiniteTimeActionArray2)); }
public override void onEnter() { base.onEnter(); CCSize winSize = CCDirector.sharedDirector().getWinSize(); int num = (int)(12f * (winSize.width / winSize.height)); int num1 = 12; CCTurnOffTiles cCTurnOffTile = CCTurnOffTiles.actionWithSize(new ccGridSize(num, num1), this.m_fDuration); CCFiniteTimeAction cCFiniteTimeAction = this.easeActionWithAction(cCTurnOffTile); CCScene mPOutScene = this.m_pOutScene; CCFiniteTimeAction[] cCFiniteTimeActionArray = new CCFiniteTimeAction[] { cCFiniteTimeAction, CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.finish)), CCStopGrid.action() }; mPOutScene.runAction(CCSequence.actions(cCFiniteTimeActionArray)); }
public override void onEnter() { float single; float single1; float single2; float single3; base.onEnter(); this.m_pInScene.visible = false; if (this.m_eOrientation != tOrientation.kOrientationLeftOver) { single = -90f; single1 = 90f; single2 = -90f; single3 = 0f; } else { single = 90f; single1 = 270f; single2 = 90f; single3 = 0f; } CCFiniteTimeAction[] cCFiniteTimeActionArray = new CCFiniteTimeAction[] { CCDelayTime.actionWithDuration(this.m_fDuration / 2f), CCShow.action(), CCOrbitCamera.actionWithDuration(this.m_fDuration / 2f, 1f, 0f, single1, single, 90f, 0f), CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.finish)) }; CCActionInterval cCActionInterval = (CCActionInterval)CCSequence.actions(cCFiniteTimeActionArray); CCFiniteTimeAction[] cCFiniteTimeActionArray1 = new CCFiniteTimeAction[] { CCOrbitCamera.actionWithDuration(this.m_fDuration / 2f, 1f, 0f, single3, single2, 90f, 0f), CCHide.action(), CCDelayTime.actionWithDuration(this.m_fDuration / 2f) }; CCActionInterval cCActionInterval1 = (CCActionInterval)CCSequence.actions(cCFiniteTimeActionArray1); this.m_pInScene.runAction(cCActionInterval); this.m_pOutScene.runAction(cCActionInterval1); }
public override void onEnter() { int num; int num1; base.onEnter(); CCSize winSize = CCDirector.sharedDirector().getWinSize(); if (winSize.width <= winSize.height) { num = 12; num1 = 16; } else { num = 16; num1 = 12; } CCActionInterval cCActionInterval = this.actionWithSize(ccTypes.ccg(num, num1)); if (!this.m_bBack) { CCScene mPOutScene = this.m_pOutScene; CCFiniteTimeAction[] cCFiniteTimeActionArray = new CCFiniteTimeAction[] { cCActionInterval, CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.finish)), CCStopGrid.action() }; mPOutScene.runAction(CCSequence.actions(cCFiniteTimeActionArray)); return; } this.m_pInScene.visible = false; CCScene mPInScene = this.m_pInScene; CCFiniteTimeAction[] cCFiniteTimeActionArray1 = new CCFiniteTimeAction[] { CCShow.action(), cCActionInterval, CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.finish)), CCStopGrid.action() }; mPInScene.runAction(CCSequence.actions(cCFiniteTimeActionArray1)); }
public override void onEnter() { base.onEnter(); // create a transparent color layer // in which we are going to add our rendertextures ccColor4B color = new ccColor4B(0, 0, 0, 0); CCSize size = CCDirector.sharedDirector().getWinSize(); //CCLayerColor layer = CCLayerColor.layerWithColor(color); CCLayer layer = new CCLayer(); // create the first render texture for inScene CCRenderTexture inTexture = CCRenderTexture.renderTextureWithWidthAndHeight((int)size.width, (int)size.height); if (null == inTexture) { return; } inTexture.Sprite.anchorPoint = new CCPoint(0.5f, 0.5f); inTexture.position = new CCPoint(size.width / 2, size.height / 2); inTexture.anchorPoint = new CCPoint(0.5f, 0.5f); // render inScene to its texturebuffer inTexture.begin(); m_pInScene.visit(); inTexture.end(); // create the second render texture for outScene CCRenderTexture outTexture = CCRenderTexture.renderTextureWithWidthAndHeight((int)size.width, (int)size.height); outTexture.Sprite.anchorPoint = new CCPoint(0.5f, 0.5f); outTexture.position = new CCPoint(size.width / 2, size.height / 2); outTexture.anchorPoint = new CCPoint(0.5f, 0.5f); // render outScene to its texturebuffer outTexture.begin(); m_pOutScene.visit(); outTexture.end(); // create blend functions ccBlendFunc blend1 = new ccBlendFunc(OGLES.GL_ONE, OGLES.GL_ONE); // inScene will lay on background and will not be used with alpha ccBlendFunc blend2 = new ccBlendFunc(OGLES.GL_SRC_ALPHA, OGLES.GL_ONE_MINUS_SRC_ALPHA); // we are going to blend outScene via alpha // set blendfunctions inTexture.Sprite.BlendFunc = blend1; outTexture.Sprite.BlendFunc = blend2; // add render textures to the layer layer.addChild(inTexture); layer.addChild(outTexture); // initial opacity: inTexture.Sprite.Opacity = 255; outTexture.Sprite.Opacity = 255; // create the blend action CCAction layerAction = CCSequence.actions ( CCFadeTo.actionWithDuration(m_fDuration, 0), CCCallFunc.actionWithTarget(this, (base.hideOutShowIn)), CCCallFunc.actionWithTarget(this, (base.finish)) ); //// run the blend action outTexture.Sprite.runAction(layerAction); // add the layer (which contains our two rendertextures) to the scene addChild(layer, 2, kSceneFade); }
public override void onEnter() { base.onEnter(); this.m_pInScene.scale = 0.001f; this.m_pOutScene.scale = 1f; this.m_pInScene.anchorPoint = new CCPoint(0.6666667f, 0.5f); this.m_pOutScene.anchorPoint = new CCPoint(0.333333343f, 0.5f); CCActionInterval cCActionInterval = CCScaleTo.actionWithDuration(this.m_fDuration, 0.01f); CCActionInterval cCActionInterval1 = CCScaleTo.actionWithDuration(this.m_fDuration, 1f); this.m_pInScene.runAction(this.easeActionWithAction(cCActionInterval1)); CCScene mPOutScene = this.m_pOutScene; CCFiniteTimeAction[] cCFiniteTimeActionArray = new CCFiniteTimeAction[] { this.easeActionWithAction(cCActionInterval), CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.finish)) }; mPOutScene.runAction(CCSequence.actions(cCFiniteTimeActionArray)); }
public override void OnEnter() { base.OnEnter(); centerSprites(0); var spr = new CCSprite("Images/grossini"); spr.Position = new CCPoint(200, 200); AddChild(spr); var act1 = new CCMoveBy (2, new CCPoint(0, 100)); var act2 = new CCCallFunc(log1); var act3 = new CCMoveBy (2, new CCPoint(0, -100)); var act4 = new CCCallFunc(log2); var act5 = new CCMoveBy (2, new CCPoint(100, -100)); var act6 = new CCCallFunc(log3); var act7 = new CCMoveBy (2, new CCPoint(-100, 0)); var act8 = new CCCallFunc(log4); var actF = CCSequence.FromActions(act1, act2, act3, act4, act5, act6, act7, act8); CCDirector.SharedDirector.ActionManager.AddAction(actF, spr, false); }
public override void onEnter() { base.onEnter(); ccColor4B _ccColor4B = new ccColor4B(0, 0, 0, 0); CCSize winSize = CCDirector.sharedDirector().getWinSize(); CCLayer cCLayer = new CCLayer(); CCRenderTexture cCPoint = CCRenderTexture.renderTextureWithWidthAndHeight((int)winSize.width, (int)winSize.height); if (cCPoint == null) { return; } cCPoint.Sprite.anchorPoint = new CCPoint(0.5f, 0.5f); cCPoint.position = new CCPoint(winSize.width / 2f, winSize.height / 2f); cCPoint.anchorPoint = new CCPoint(0.5f, 0.5f); cCPoint.begin(); this.m_pInScene.visit(); cCPoint.end(); CCRenderTexture cCRenderTexture = CCRenderTexture.renderTextureWithWidthAndHeight((int)winSize.width, (int)winSize.height); cCRenderTexture.Sprite.anchorPoint = new CCPoint(0.5f, 0.5f); cCRenderTexture.position = new CCPoint(winSize.width / 2f, winSize.height / 2f); cCRenderTexture.anchorPoint = new CCPoint(0.5f, 0.5f); cCRenderTexture.begin(); this.m_pOutScene.visit(); cCRenderTexture.end(); ccBlendFunc _ccBlendFunc = new ccBlendFunc(1, 1); ccBlendFunc _ccBlendFunc1 = new ccBlendFunc(770, 771); cCPoint.Sprite.BlendFunc = _ccBlendFunc; cCRenderTexture.Sprite.BlendFunc = _ccBlendFunc1; cCLayer.addChild(cCPoint); cCLayer.addChild(cCRenderTexture); cCPoint.Sprite.Opacity = 255; cCRenderTexture.Sprite.Opacity = 255; CCFiniteTimeAction[] cCFiniteTimeActionArray = new CCFiniteTimeAction[] { CCFadeTo.actionWithDuration(this.m_fDuration, 0), CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.hideOutShowIn)), CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.finish)) }; CCAction cCAction = CCSequence.actions(cCFiniteTimeActionArray); cCRenderTexture.Sprite.runAction(cCAction); this.addChild(cCLayer, 2, 2147483647); }
public override void onEnter() { base.onEnter(); CCSize winSize = CCDirector.sharedDirector().getWinSize(); int num = (int)(12f * (winSize.width / winSize.height)); CCActionInterval cCActionInterval = this.actionWithSize(new ccGridSize(num, 12)); CCScene mPOutScene = this.m_pOutScene; CCFiniteTimeAction[] cCFiniteTimeActionArray = new CCFiniteTimeAction[] { this.easeActionWithAction(cCActionInterval), CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.finish)), CCStopGrid.action() }; mPOutScene.runAction(CCSequence.actions(cCFiniteTimeActionArray)); }
public override void onEnter() { base.onEnter(); this.initScenes(); CCActionInterval cCActionInterval = this.action(); CCActionInterval cCActionInterval1 = this.action(); CCActionInterval cCActionInterval2 = this.easeActionWithAction(cCActionInterval); CCFiniteTimeAction[] cCFiniteTimeActionArray = new CCFiniteTimeAction[] { this.easeActionWithAction(cCActionInterval1), CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.finish)) }; CCActionInterval cCActionInterval3 = (CCActionInterval)CCSequence.actions(cCFiniteTimeActionArray); this.m_pInScene.runAction(cCActionInterval2); this.m_pOutScene.runAction(cCActionInterval3); }
public override void onEnter() { base.onEnter(); CCLayerColor cCLayerColor = CCLayerColor.layerWithColor(this.m_tColor); this.m_pInScene.visible = false; this.addChild(cCLayerColor, 2, 2147483647); CCNode childByTag = base.getChildByTag(2147483647); CCFiniteTimeAction[] cCFiniteTimeActionArray = new CCFiniteTimeAction[] { CCFadeIn.actionWithDuration(this.m_fDuration / 2f), CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.hideOutShowIn)), CCFadeOut.actionWithDuration(this.m_fDuration / 2f), CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.finish)) }; childByTag.runAction((CCActionInterval)CCSequence.actions(cCFiniteTimeActionArray)); }
public override void onEnter() { base.onEnter(); this.m_pInScene.scale = 0.001f; this.m_pOutScene.scale = 1f; this.m_pInScene.anchorPoint = new CCPoint(0.5f, 0.5f); this.m_pOutScene.anchorPoint = new CCPoint(0.5f, 0.5f); CCFiniteTimeAction[] cCFiniteTimeActionArray = new CCFiniteTimeAction[2]; CCFiniteTimeAction[] cCFiniteTimeActionArray1 = new CCFiniteTimeAction[] { CCScaleBy.actionWithDuration(this.m_fDuration / 2f, 0.001f), CCRotateBy.actionWithDuration(this.m_fDuration / 2f, 720f) }; cCFiniteTimeActionArray[0] = CCSpawn.actions(cCFiniteTimeActionArray1); cCFiniteTimeActionArray[1] = CCDelayTime.actionWithDuration(this.m_fDuration / 2f); CCActionInterval cCActionInterval = (CCActionInterval)CCSequence.actions(cCFiniteTimeActionArray); this.m_pOutScene.runAction(cCActionInterval); CCScene mPInScene = this.m_pInScene; CCFiniteTimeAction[] cCFiniteTimeActionArray2 = new CCFiniteTimeAction[] { cCActionInterval.reverse(), CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.finish)) }; mPInScene.runAction(CCSequence.actions(cCFiniteTimeActionArray2)); }
public override void onEnter() { base.onEnter(); this.m_pInScene.visible = false; CCActionInterval cCActionInterval = this.action(); CCFiniteTimeAction[] cCFiniteTimeActionArray = new CCFiniteTimeAction[] { cCActionInterval, CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.hideOutShowIn)), cCActionInterval.reverse() }; CCActionInterval cCActionInterval1 = (CCActionInterval)CCSequence.actions(cCFiniteTimeActionArray); CCFiniteTimeAction[] cCFiniteTimeActionArray1 = new CCFiniteTimeAction[] { this.easeActionWithAction(cCActionInterval1), CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.finish)), CCStopGrid.action() }; base.runAction(CCSequence.actions(cCFiniteTimeActionArray1)); }
public override void onEnter() { base.onEnter(); CCSize winSize = CCDirector.sharedDirector().getWinSize(); CCRenderTexture cCPoint = CCRenderTexture.renderTextureWithWidthAndHeight((int)winSize.width, (int)winSize.height); if (cCPoint == null) { return; } cCPoint.Sprite.anchorPoint = new CCPoint(0.5f, 0.5f); cCPoint.position = new CCPoint(winSize.width / 2f, winSize.height / 2f); cCPoint.anchorPoint = new CCPoint(0.5f, 0.5f); cCPoint.clear(0f, 0f, 0f, 1f); cCPoint.begin(); this.m_pOutScene.visit(); cCPoint.end(); base.hideOutShowIn(); CCProgressTimer cCProgressTimer = CCProgressTimer.progressWithTexture(cCPoint.Sprite.Texture); cCProgressTimer.Type = this.radialType(); cCProgressTimer.Percentage = 100f; cCProgressTimer.position = new CCPoint(winSize.width / 2f, winSize.height / 2f); cCProgressTimer.anchorPoint = new CCPoint(0.5f, 0.5f); CCFiniteTimeAction[] cCFiniteTimeActionArray = new CCFiniteTimeAction[] { CCProgressFromTo.actionWithDuration(this.m_fDuration, 100f, 0f), CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.finish)) }; cCProgressTimer.runAction(CCSequence.actions(cCFiniteTimeActionArray)); this.addChild(cCProgressTimer, 2, 2147483647); }