public override void OnEnter() { base.OnEnter(); var waves = new CCWaves(5, new CCGridSize(15, 10), 5, 20, true, false); var shaky = new CCShaky3D(5, new CCGridSize(15, 10), 4, false); Target1.RepeatForever(waves); Target2.RepeatForever(shaky); // moving background. Testing issue #244 var move = new CCMoveBy(3, new CCPoint(200, 0)); bgNode.RepeatForever(move, move.Reverse()); }
public override void onEnter() { base.onEnter(); CCNode bg = getChildByTag(EffectAdvanceScene.kTagBackground); CCNode target1 = bg.getChildByTag(EffectAdvanceScene.kTagSprite1); CCNode target2 = bg.getChildByTag(EffectAdvanceScene.kTagSprite2); CCActionInterval waves = CCWaves.actionWithWaves(5, 20, true, false, new ccGridSize(15, 10), 5); CCActionInterval shaky = CCShaky3D.actionWithRange(4, false, new ccGridSize(15, 10), 5); target1.runAction(CCRepeatForever.actionWithAction(waves)); target2.runAction(CCRepeatForever.actionWithAction(shaky)); //// moving background. Testing issue #244 //CCActionInterval move = CCMoveBy.actionWithDuration(3, new CCPoint(200, 0)); //bg.runAction(CCRepeatForever.actionWithAction((CCActionInterval)(CCSequence.actions(move)))); }
public override object Copy(ICopyable pZone) { CCShaky3D pCopy; if (pZone != null) { //in case of being called at sub class pCopy = (CCShaky3D) (pZone); } else { pCopy = new CCShaky3D(); pZone = pCopy; } base.Copy(pZone); pCopy.InitWithRange(m_nRandrange, m_bShakeZ, m_sGridSize, m_fDuration); return pCopy; }
public override void OnEnter() { base.OnEnter(); CCNode bg = GetChildByTag(EffectAdvanceScene.kTagBackground); CCNode target1 = bg.GetChildByTag(EffectAdvanceScene.kTagSprite1); CCNode target2 = bg.GetChildByTag(EffectAdvanceScene.kTagSprite2); CCActionInterval waves = new CCWaves(5, new CCGridSize(15, 10), 5, 20, true, false); CCActionInterval shaky = new CCShaky3D(5, new CCGridSize(15, 10), 4, false); target1.RunAction(new CCRepeatForever(waves)); target2.RunAction(new CCRepeatForever(shaky)); // moving background. Testing issue #244 CCActionInterval move = new CCMoveBy(3, new CCPoint(200, 0)); bg.RunAction(new CCRepeatForever(new CCSequence(move, move.Reverse()))); }
public override void OnEnter() { base.OnEnter(); //var bg = this[EffectAdvanceScene.kTagBackground]; //var target1 = bg[EffectAdvanceScene.kTagSprite1]; //var target2 = bg[EffectAdvanceScene.kTagSprite2]; var waves = new CCWaves(5, new CCGridSize(15, 10), 5, 20, true, false); var shaky = new CCShaky3D(5, new CCGridSize(15, 10), 4, false); grossini.RepeatForever(waves); tamara.RepeatForever(shaky); // moving background. Testing issue #244 var move = new CCMoveBy(3, new CCPoint(200, 0)); bgNode.RepeatForever(move, move.Reverse()); }
public override object Copy(ICCCopyable pZone) { CCShaky3D pCopy; if (pZone != null) { //in case of being called at sub class pCopy = (CCShaky3D)(pZone); } else { pCopy = new CCShaky3D(); pZone = pCopy; } base.Copy(pZone); pCopy.InitWithRange(m_nRandrange, m_bShakeZ, m_sGridSize, m_fDuration); return(pCopy); }
public override void onEnter() { base.onEnter(); CCActionInterval effect = (CCActionInterval)(CCSequence.actions(CCDelayTime.actionWithDuration(2.0f), CCShaky3D.actionWithRange(16, false, new ccGridSize(5, 5), 5.0f))); // cleanup CCNode bg = getChildByTag(EffectAdvanceScene.kTagBackground); removeChild(bg, true); // background CCLayerColor layer = CCLayerColor.layerWithColor(new ccColor4B(255, 0, 0, 255)); addChild(layer, -10); CCSprite sprite = CCSprite.spriteWithFile("Images/grossini"); sprite.position = new CCPoint(50, 80); layer.addChild(sprite, 10); // foreground CCLayerColor layer2 = CCLayerColor.layerWithColor(new ccColor4B(0, 255, 0, 255)); CCSprite fog = CCSprite.spriteWithFile("Images/Fog"); ccBlendFunc bf = new ccBlendFunc { src = 0x0302, dst = 0x0303 }; fog.BlendFunc = bf; layer2.addChild(fog, 1); addChild(layer2, 1); layer2.runAction(CCRepeatForever.actionWithAction(effect)); }
public static CCShaky3D Create(int range, bool shakeZ, CCGridSize gridSize, float duration) { var pAction = new CCShaky3D(); pAction.InitWithRange(range, shakeZ, gridSize, duration); return pAction; }
public CCShaky3DState (CCShaky3D action, CCNodeGrid target) : base (action, target) { Shake = action.Shake; Range = action.Range; }
public static CCActionInterval actionWithDuration(float t) { return(CCShaky3D.actionWithRange(5, true, new ccGridSize(15, 10), t)); }
public CCShaky3DState(CCShaky3D action, CCNode target) : base(action, target) { Shake = action.Shake; Range = action.Range; }