public static CCShaky3D actionWithRange(int range, bool shakeZ, ccGridSize gridSize, float duration) { CCShaky3D cCShaky3D = new CCShaky3D(); if (cCShaky3D.initWithRange(range, shakeZ, gridSize, duration)) { return(cCShaky3D); } return(null); }
/// <summary> /// creates the action with a range, shake Z vertices, a grid and duration /// </summary> public static CCShaky3D actionWithRange(int range, bool shakeZ, ccGridSize gridSize, float duration) { CCShaky3D pAction = new CCShaky3D(); if (pAction.initWithRange(range, shakeZ, gridSize, duration)) { return pAction; } return null; }
public override CCObject copyWithZone(CCZone pZone) { CCShaky3D cCShaky3D = null; if (pZone == null || pZone.m_pCopyObject == null) { cCShaky3D = new CCShaky3D(); pZone = new CCZone(cCShaky3D); } else { cCShaky3D = (CCShaky3D)pZone.m_pCopyObject; } base.copyWithZone(pZone); cCShaky3D.initWithRange(this.m_nRandrange, this.m_bShakeZ, this.m_sGridSize, this.m_fDuration); return(cCShaky3D); }
/** creates the action with a range, shake Z vertices, a grid and duration */ public static CCShaky3D actionWithRange(int range, bool shakeZ, ccGridSize gridSize, float duration) { CCShaky3D pAction = new CCShaky3D(); if (pAction != null) { if (pAction.initWithRange(range, shakeZ, gridSize, duration)) { // pAction->autorelease(); } else { // CC_SAFE_RELEASE_NULL(pAction); } } return pAction; }
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, 20, true, false, new CCGridSize(15, 10), 5); CCActionInterval shaky = new CCShaky3D(4, false, new CCGridSize(15, 10), 5); 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 (CCSequence.FromActions(move, move.Reverse()))); }
public override CCObject copyWithZone(CCZone pZone) { CCZone pNewZone = null; CCShaky3D pCopy = null; if (pZone != null && pZone.m_pCopyObject != null) { //in case of being called at sub class pCopy = (CCShaky3D)(pZone.m_pCopyObject); } else { pCopy = new CCShaky3D(); pZone = pNewZone = new CCZone(pCopy); } base.copyWithZone(pZone); pCopy.initWithRange(m_nRandrange, m_bShakeZ, m_sGridSize, m_fDuration); return pCopy; }
public override CCObject copyWithZone(CCZone pZone) { CCZone pNewZone = null; CCShaky3D pCopy = null; if (pZone != null && pZone.m_pCopyObject != null) { //in case of being called at sub class pCopy = (CCShaky3D)(pZone.m_pCopyObject); } else { pCopy = new CCShaky3D(); pZone = pNewZone = new CCZone(pCopy); } base.copyWithZone(pZone); pCopy.initWithRange(m_nRandrange, m_bShakeZ, m_sGridSize, Duration); return(pCopy); }