public bool initWithAction(CCActionInterval action) { Debug.Assert(action != null); m_pInnerAction = action; return true; }
public bool initWithAction(CCActionInterval action) { Debug.Assert(action != null); m_pInnerAction = action; return(true); }
public override CCObject copyWithZone(CCZone zone) { CCZone tmpZone = zone; CCRepeatForever ret = null; if (tmpZone != null && tmpZone.m_pCopyObject != null) { ret = tmpZone.m_pCopyObject as CCRepeatForever; if (ret == null) { return(null); } } else { ret = new CCRepeatForever(); tmpZone = new CCZone(ret); } base.copyWithZone(tmpZone); CCActionInterval param = m_pInnerAction.copy() as CCActionInterval; if (param == null) { return(null); } ret.initWithAction(param); return(ret); }
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 static CCRepeatForever actionWithAction(CCActionInterval action) { CCRepeatForever ret = new CCRepeatForever(); ret.initWithAction(action); return ret; }
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), CCShow.action(), CCOrbitCamera.actionWithDuration(this.m_fDuration / 2f, 1f, 0f, single1, single, 0f, 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, 0f, 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() { 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() { 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 CCObject copyWithZone(CCZone zone) { CCZone cCZone = zone; CCRepeatForever cCRepeatForever = null; if (cCZone == null || cCZone.m_pCopyObject == null) { cCRepeatForever = new CCRepeatForever(); cCZone = new CCZone(cCRepeatForever); } else { cCRepeatForever = cCZone.m_pCopyObject as CCRepeatForever; if (cCRepeatForever == null) { return(null); } } base.copyWithZone(cCZone); CCActionInterval cCActionInterval = this.m_pInnerAction.copy() as CCActionInterval; if (cCActionInterval == null) { return(null); } cCRepeatForever.initWithAction(cCActionInterval); return(cCRepeatForever); }
public LabelAtlasColorTest() { CCLabelAtlas label1 = CCLabelAtlas.labelWithString("123 Test", "fonts/tuffy_bold_italic-charmap.png", 48, 64, ' '); addChild(label1, 0, (int)TagSprite.kTagSprite1); label1.position = new CCPoint(10, 100); label1.Opacity = 200; CCLabelAtlas label2 = CCLabelAtlas.labelWithString("0123456789", "fonts/tuffy_bold_italic-charmap.png", 48, 64, ' '); addChild(label2, 0, (int)TagSprite.kTagSprite2); label2.position = new CCPoint(10, 200); //label2.setColor( ccRED ); label2.Color = ccRED; CCActionInterval fade = CCFadeOut.actionWithDuration(1.0f); //CCActionInterval fade_in = fade.reverse(); CCActionInterval fade_in = null; CCFiniteTimeAction seq = CCSequence.actions(fade, fade_in, null); CCAction repeat = CCRepeatForever.actionWithAction((CCActionInterval)seq); label2.runAction(repeat); m_time = 0; //schedule( schedule_selector(LabelAtlasColorTest.step) ); //:@selector(step:)]; }
public static CCRepeatForever actionWithAction(CCActionInterval action) { CCRepeatForever cCRepeatForever = new CCRepeatForever(); cCRepeatForever.initWithAction(action); return(cCRepeatForever); }
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 static CCActionInterval actionWithDuration(float d) { CCActionInterval cCActionInterval = new CCActionInterval(); cCActionInterval.initWithDuration(d); return(cCActionInterval); }
public static CCActionInterval actionWithDuration(float d) { CCActionInterval ret = new CCActionInterval(); ret.initWithDuration(d); return ret; }
public static CCActionInterval actionWithDuration(float d) { CCActionInterval ret = new CCActionInterval(); ret.initWithDuration(d); return(ret); }
public static CCRepeatForever actionWithAction(CCActionInterval action) { CCRepeatForever ret = new CCRepeatForever(); ret.initWithAction(action); return(ret); }
public bool initWithAction(CCActionInterval pAction, float fPeriod) { if (!base.initWithAction(pAction)) { return(false); } this.m_fPeriod = fPeriod; return(true); }
public bool initWithAction(CCActionInterval pAction) { if (!base.initWithDuration(pAction.duration)) { return(false); } this.m_pOther = pAction; return(true); }
protected bool InitWithAction(CCActionInterval action, float fRate) { Debug.Assert(action != null); m_pInnerAction = action; m_fSpeed = fRate; return true; }
public static new CCEaseElasticOut actionWithAction(CCActionInterval pAction, float fPeriod) { CCEaseElasticOut cCEaseElasticOut = new CCEaseElasticOut(); if (cCEaseElasticOut != null) { cCEaseElasticOut.initWithAction(pAction, fPeriod); } return cCEaseElasticOut; }
public bool initWithAction(CCActionInterval pAction, float fRate) { if (!base.initWithAction(pAction)) { return(false); } this.m_fRate = fRate; return(true); }
/// <summary> /// initializes the action /// </summary> public bool initWithAction(CCActionInterval action, float fRate) { Debug.Assert(action != null); m_pInnerAction = action; m_fSpeed = fRate; return(true); }
public Atlas4() { m_time = 0; // Upper Label CCLabelBMFont label = CCLabelBMFont.labelWithString("Bitmap Font Atlas", "fonts/bitmapFontTest.fnt"); addChild(label); CCSize s = CCDirector.sharedDirector().getWinSize(); label.position = new CCPoint(s.width / 2, s.height / 2); label.anchorPoint = new CCPoint(0.5f, 0.5f); CCSprite BChar = (CCSprite)label.getChildByTag(1); CCSprite FChar = (CCSprite)label.getChildByTag(7); CCSprite AChar = (CCSprite)label.getChildByTag(12); CCActionInterval rotate = CCRotateBy.actionWithDuration(2, 360); CCAction rot_4ever = CCRepeatForever.actionWithAction(rotate); CCActionInterval scale = CCScaleBy.actionWithDuration(2, 1.5f); //CCActionInterval scale_back = scale.reverse(); CCActionInterval scale_back = null; CCFiniteTimeAction scale_seq = CCSequence.actions(scale, scale_back, null); CCAction scale_4ever = CCRepeatForever.actionWithAction((CCActionInterval)scale_seq); CCActionInterval jump = CCJumpBy.actionWithDuration(0.5f, new CCPoint(), 60, 1); CCAction jump_4ever = CCRepeatForever.actionWithAction(jump); CCActionInterval fade_out = CCFadeOut.actionWithDuration(1); CCActionInterval fade_in = CCFadeIn.actionWithDuration(1); CCFiniteTimeAction seq = CCSequence.actions(fade_out, fade_in, null); CCAction fade_4ever = CCRepeatForever.actionWithAction((CCActionInterval)seq); BChar.runAction(rot_4ever); BChar.runAction(scale_4ever); FChar.runAction(jump_4ever); AChar.runAction(fade_4ever); // Bottom Label CCLabelBMFont label2 = CCLabelBMFont.labelWithString("00.0", "fonts/bitmapFontTest.fnt"); addChild(label2, 0, (int)TagSprite.kTagBitmapAtlas2); label2.position = new CCPoint(s.width / 2.0f, 80); CCSprite lastChar = (CCSprite)label2.getChildByTag(3); lastChar.runAction((CCAction)(rot_4ever.copy())); //schedule( schedule_selector(Atlas4::step), 0.1f); base.schedule(step, 0.1f); }
public static CCActionEase actionWithAction(CCActionInterval pAction) { CCActionEase cCActionEase = new CCActionEase(); if (cCActionEase != null) { cCActionEase.initWithAction(pAction); } return(cCActionEase); }
public static CCSpeed actionWithAction(CCActionInterval action, float fRate) { CCSpeed speed = new CCSpeed(); if ((speed != null) && speed.initWithAction(action, fRate)) { return(speed); } return(null); }
public static CCEaseRateAction actionWithAction(CCActionInterval pAction, float fRate) { CCEaseRateAction cCEaseRateAction = new CCEaseRateAction(); if (cCEaseRateAction != null) { cCEaseRateAction.initWithAction(pAction, fRate); } return(cCEaseRateAction); }
/// <summary> /// initializes the action /// </summary> /// <param name="pAction"></param> /// <returns></returns> public bool initWithAction(CCActionInterval pAction) { if (base.initWithDuration(pAction.duration)) { m_pOther = pAction; return true; } return false; }
public static CCEaseElastic actionWithAction(CCActionInterval pAction, float fPeriod) { CCEaseElastic cCEaseElastic = new CCEaseElastic(); if (cCEaseElastic != null) { cCEaseElastic.initWithAction(pAction, fPeriod); } return(cCEaseElastic); }
protected virtual bool InitWithAction(CCAction pAction, float duration) { if (base.InitWithDuration(duration)) { m_fRate = 1.0f; m_pOther = pAction as CCActionInterval; return true; } return false; }
public static new CCEaseElasticIn actionWithAction(CCActionInterval pAction, float fPeriod) { CCEaseElasticIn cCEaseElasticIn = new CCEaseElasticIn(); if (cCEaseElasticIn != null) { cCEaseElasticIn.initWithAction(pAction, fPeriod); } return(cCEaseElasticIn); }
/// <summary> /// Initializes the action with the inner action and the period in radians (default is 0.3) /// </summary> /// <param name="pAction"></param> /// <param name="fPeriod"></param> /// <returns></returns> public bool initWithAction(CCActionInterval pAction, float fPeriod) { if (base.initWithAction(pAction)) { m_fPeriod = fPeriod; return true; } return false; }
public static new CCEaseInOut actionWithAction(CCActionInterval pAction, float fRate) { CCEaseInOut cCEaseInOut = new CCEaseInOut(); if (cCEaseInOut != null) { cCEaseInOut.initWithAction(pAction, fRate); } return(cCEaseInOut); }
/// <summary> /// Initializes the action with the inner action and the rate parameter /// </summary> /// <param name="pAction"></param> /// <param name="fRate"></param> /// <returns></returns> public bool initWithAction(CCActionInterval pAction, float fRate) { if (base.initWithAction(pAction)) { m_fRate = fRate; return true; } return false; }
public override void onEnter() { base.onEnter(); this.initScenes(); CCActionInterval cCActionInterval = this.action(); CCScene mPInScene = this.m_pInScene; CCFiniteTimeAction[] cCFiniteTimeActionArray = new CCFiniteTimeAction[] { this.easeActionWithAction(cCActionInterval), CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.finish)) }; mPInScene.runAction(CCSequence.actions(cCFiniteTimeActionArray)); }
public bool initWithAction(CCAction pAction, float duration) { if (!base.initWithDuration(duration)) { return(false); } this.m_fRate = 1f; this.m_pOther = pAction as CCActionInterval; return(true); }
public static new CCEaseSineIn actionWithAction(CCActionInterval pAction) { CCEaseSineIn cCEaseSineIn = new CCEaseSineIn(); if (cCEaseSineIn != null) { cCEaseSineIn.initWithAction(pAction); } return(cCEaseSineIn); }
public static new CCEaseBounce actionWithAction(CCActionInterval pAction) { CCEaseBounce cCEaseBounce = new CCEaseBounce(); if (cCEaseBounce != null) { cCEaseBounce.initWithAction(pAction); } return(cCEaseBounce); }
public static new CCEaseBackOut actionWithAction(CCActionInterval pAction) { CCEaseBackOut cCEaseBackOut = new CCEaseBackOut(); if (cCEaseBackOut != null) { cCEaseBackOut.initWithAction(pAction); } return(cCEaseBackOut); }
public static CCSpeed actionWithAction(CCActionInterval action, float fRate) { CCSpeed ret = new CCSpeed(); if (ret != null && ret.initWithAction(action, fRate)) { return ret; } return null; }
/// <summary> /// initializes the action with an inner action that has the amplitude property, and a duration time /// </summary> public bool initWithAction(CCAction pAction, float duration) { if (base.initWithDuration(duration)) { m_fRate = 1.0f; m_pOther = pAction as CCActionInterval; return true; } return false; }
/// <summary> /// Creates the action with the inner action and the rate parameter /// </summary> /// <param name="pAction"></param> /// <param name="fRate"></param> /// <returns></returns> public static new CCEaseIn actionWithAction(CCActionInterval pAction, float fRate) { CCEaseIn pRet = new CCEaseIn(); if (pRet != null) { if (pRet.initWithAction(pAction, fRate)) { //pRet.autorelease(); } else { //CC_SAFE_RELEASE_NULL(pRet); } } return pRet; }
/// <summary> /// creates the action /// </summary> /// <param name="pAction"></param> /// <returns></returns> public static new CCEaseExponentialIn actionWithAction(CCActionInterval pAction) { CCEaseExponentialIn pRet = new CCEaseExponentialIn(); if (pRet != null) { if (pRet.initWithAction(pAction)) { //pRet->autorelease(); } else { //CC_SAFE_RELEASE_NULL(pRet); } } return pRet; }
/// <summary> /// Creates the action with the inner action and the period in radians (default is 0.3) /// </summary> /// <param name="pAction"></param> /// <param name="fPeriod"></param> /// <returns></returns> public static new CCEaseElasticOut actionWithAction(CCActionInterval pAction, float fPeriod) { CCEaseElasticOut pRet = new CCEaseElasticOut(); if (pRet != null) { if (pRet.initWithAction(pAction, fPeriod)) { //pRet.autorelease(); } else { //CC_SAFE_RELEASE_NULL(pRet); } } return pRet; }
/// <summary> /// creates the action /// </summary> /// <param name="pAction"></param> /// <returns></returns> public new static CCEaseSineInOut actionWithAction(CCActionInterval pAction) { CCEaseSineInOut pRet = new CCEaseSineInOut(); if (pRet != null) { if (pRet.initWithAction(pAction)) { //pRet.autorelease(); } else { //CC_SAFE_RELEASE_NULL(pRet); } } return pRet; }
/// <summary> /// Creates the action with the inner action and the rate parameter /// </summary> /// <param name="pAction"></param> /// <param name="fRate"></param> /// <returns></returns> public new static CCEaseOut actionWithAction(CCActionInterval pAction, float fRate) { CCEaseOut pRet = new CCEaseOut(); if (pRet != null) { if (pRet.initWithAction(pAction, fRate)) { } else { } } return pRet; }
public override CCObject copyWithZone(CCZone zone) { CCZone tmpZone = zone; CCActionInterval ret = null; if (tmpZone != null && tmpZone.m_pCopyObject != null) { ret = (CCActionInterval)(tmpZone.m_pCopyObject); } else { // action's base class , must be called using __super::copyWithZone(), after overriding from derived class Debug.Assert(false); ret = new CCActionInterval(); tmpZone = new CCZone(ret); } base.copyWithZone(tmpZone); ret.initWithDuration(Duration); return ret; }
public CCSpeed(CCActionInterval action, float fRate) { InitWithAction(action, fRate); }
public static new CCEaseExponentialIn Create(CCActionInterval pAction) { var pRet = new CCEaseExponentialIn(); pRet.InitWithAction(pAction); return pRet; }
public virtual CCFiniteTimeAction easeActionWithAction(CCActionInterval action) { return action; }
public static new CCEaseSineOut Create(CCActionInterval pAction) { var pRet = new CCEaseSineOut(); pRet.InitWithAction(pAction); return pRet; }
public CCEaseSineOut(CCActionInterval pAction) : base(pAction) { }
public static new CCEaseInOut Create(CCActionInterval pAction, float fRate) { var pRet = new CCEaseInOut(); pRet.InitWithAction(pAction, fRate); return pRet; }
public CCEaseOut(CCActionInterval pAction, float fRate) : base(pAction, fRate) { }
public virtual CCActionInterval easeActionWithAction(CCActionInterval action) { return CCEaseInOut.actionWithAction(action, 3.0f); }
protected CCActionInterval(CCActionInterval actionInterval) : base(actionInterval) { InitWithDuration(actionInterval.m_fDuration); }
public CCFiniteTimeAction EaseAction(CCActionInterval action) { return CCEaseOut.Create(action, 2.0f); }
public CCEaseElasticIn(CCActionInterval pAction) : base(pAction) { }
public CCEaseElasticIn(CCActionInterval pAction, float fPeriod) : base(pAction, fPeriod) { }
CCFiniteTimeAction ICCTransitionEaseScene.easeActionWithAction(CCActionInterval action) { throw new NotImplementedException(); }
public CCFiniteTimeAction EaseAction(CCActionInterval action) { return new CCEaseOut(action, 2.0f); }