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 CCObject copyWithZone(CCZone pZone) { CCZone pNewZone = null; CCHide pRet = null; if (pZone != null && pZone.m_pCopyObject != null) { pRet = (CCHide)(pZone.m_pCopyObject); } else { pRet = new CCHide(); pZone = pNewZone = new CCZone(pRet); } base.copyWithZone(pZone); return pRet; }
public override CCObject copyWithZone(CCZone pZone) { CCHide cCHide = null; if (pZone == null || pZone.m_pCopyObject == null) { cCHide = new CCHide(); pZone = new CCZone(cCHide); } else { cCHide = (CCHide)pZone.m_pCopyObject; } base.copyWithZone(pZone); return(cCHide); }
public override CCObject copyWithZone(CCZone pZone) { CCZone pNewZone = null; CCHide pRet = null; if (pZone != null && pZone.m_pCopyObject != null) { pRet = (CCHide)(pZone.m_pCopyObject); } else { pRet = new CCHide(); pZone = pNewZone = new CCZone(pRet); } base.copyWithZone(pZone); return(pRet); }
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(); this.TouchEnabled = true; CCSize s = CCDirector.SharedDirector.WinSize; CCLayerColor layer = new CCLayerColor(new CCColor4B(0xFF, 0x00, 0x00, 0x80), s.Width * 0.75f, s.Height * 0.75f); layer.IgnoreAnchorPointForPosition = false; layer.Position = (new CCPoint(s.Width / 2, s.Height / 2)); AddChild(layer, 1, kTagLayer); // // Add two labels using BM label class // CCLabelBMFont CCLabelBMFont label1 = CCLabelBMFont.Create("LABEL1", "fonts/konqa32.fnt"); layer.AddChild(label1); label1.Position = new CCPoint(layer.ContentSize.Width / 2, layer.ContentSize.Height * 0.75f); CCLabelBMFont label2 = CCLabelBMFont.Create("LABEL2", "fonts/konqa32.fnt"); layer.AddChild(label2); label2.Position = new CCPoint(layer.ContentSize.Width / 2, layer.ContentSize.Height * 0.25f); // // Do the sequence of actions in the bug report float waitTime = 3f; float runTime = 12f; layer.Visible = false; CCHide hide = new CCHide(); CCScaleTo scaleTo1 = new CCScaleTo(0.0f, 0.0f); CCShow show = new CCShow(); CCDelayTime delay = new CCDelayTime (waitTime); CCScaleTo scaleTo2 = new CCScaleTo(runTime * 0.25f, 1.2f); CCScaleTo scaleTo3 = new CCScaleTo(runTime * 0.25f, 0.95f); CCScaleTo scaleTo4 = new CCScaleTo(runTime * 0.25f, 1.1f); CCScaleTo scaleTo5 = new CCScaleTo(runTime * 0.25f, 1.0f); CCFiniteTimeAction seq = CCSequence.FromActions(hide, scaleTo1, show, delay, scaleTo2, scaleTo3, scaleTo4, scaleTo5); layer.RunAction(seq); }
public override void onEnter() { base.onEnter(); alignSpritesLeft(2); // Test: // Sequence should work both with IntervalAction and InstantActions CCActionInterval move1 = CCMoveBy.actionWithDuration(1, new CCPoint(250,0)); CCActionInterval move2 = CCMoveBy.actionWithDuration(1, new CCPoint(0,50)); CCToggleVisibility tog1 = new CCToggleVisibility(); CCToggleVisibility tog2 = new CCToggleVisibility(); CCFiniteTimeAction seq = CCSequence.actions( move1, tog1, move2, tog2, move1.reverse()); CCActionInterval action = CCRepeat.actionWithAction((CCActionInterval)(CCSequence.actions(seq, seq.reverse())), 3); // Test: // Also test that the reverse of Hide is Show, and vice-versa m_kathia.runAction(action); CCActionInterval move_tamara = CCMoveBy.actionWithDuration(1, new CCPoint(100,0)); CCActionInterval move_tamara2 = CCMoveBy.actionWithDuration(1, new CCPoint(50,0)); CCActionInstant hide = new CCHide(); CCFiniteTimeAction seq_tamara = CCSequence.actions( move_tamara, hide, move_tamara2); CCFiniteTimeAction seq_back = seq_tamara.reverse(); m_tamara.runAction( CCSequence.actions( seq_tamara, seq_back)); }
public static new CCHide action() { CCHide pRet = new CCHide(); return pRet; }
public static new CCHide action() { CCHide pRet = new CCHide(); return(pRet); }
public override void OnEnter() { base.OnEnter(); alignSpritesLeft(2); // Test: // Sequence should work both with IntervalAction and InstantActions var move1 = new CCMoveBy (1, new CCPoint(250, 0)); var move2 = new CCMoveBy (1, new CCPoint(0, 50)); var tog1 = new CCToggleVisibility(); var tog2 = new CCToggleVisibility(); var seq = CCSequence.FromActions(move1, tog1, move2, tog2, move1.Reverse()); var action = new CCRepeat ((CCSequence.FromActions(seq, seq.Reverse())), 3); // Test: // Also test that the reverse of Hide is Show, and vice-versa m_kathia.RunAction(action); var move_tamara = new CCMoveBy (1, new CCPoint(100, 0)); var move_tamara2 = new CCMoveBy (1, new CCPoint(50, 0)); var hide = new CCHide(); var seq_tamara = CCSequence.FromActions(move_tamara, hide, move_tamara2); var seq_back = seq_tamara.Reverse(); m_tamara.RunAction(CCSequence.FromActions(seq_tamara, seq_back)); }
public override CCFiniteTimeAction reverse() { return((CCFiniteTimeAction)(CCHide.action())); }
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); }