public override void onEnter() { base.onEnter(); CCActionInterval lens = CCLens3D.actionWithPosition(new CCPoint(100, 180), 150, new ccGridSize(32, 24), 10); //id move = [MoveBy::actionWithDuration:5 position:ccp(400,0)]; /** * @todo we only support CCNode run actions now. */ // CCActionInterval* move = CCJumpBy::actionWithDuration(5, ccp(380,0), 100, 4); // CCActionInterval* move_back = move->reverse(); // CCActionInterval* seq = (CCActionInterval *)(CCSequence::actions( move, move_back, NULL)); // CCActionManager::sharedManager()->addAction(seq, lens, false); runAction(lens); }
public override void onEnter() { base.onEnter(); CCNode target = getChildByTag(EffectAdvanceScene.kTagBackground); // To reuse a grid the grid size and the grid type must be the same. // in this case: // Lens3D is Grid3D and it's size is (15,10) // Waves3D is Grid3D and it's size is (15,10) CCSize size = CCDirector.sharedDirector().getWinSize(); CCActionInterval lens = CCLens3D.actionWithPosition(new CCPoint(size.width / 2, size.height / 2), 240, new ccGridSize(15, 10), 0.0f); CCActionInterval waves = CCWaves3D.actionWithWaves(18, 15, new ccGridSize(15, 10), 10); CCFiniteTimeAction reuse = CCReuseGrid.actionWithTimes(1); CCActionInterval delay = CCDelayTime.actionWithDuration(8); CCActionInterval orbit = CCOrbitCamera.actionWithDuration(5, 1, 2, 0, 180, 0, -90); CCFiniteTimeAction orbit_back = orbit.reverse(); target.runAction(CCRepeatForever.actionWithAction((CCActionInterval)(CCSequence.actions(orbit, orbit_back)))); target.runAction(CCSequence.actions(lens, delay, reuse, waves)); }
public new static CCActionInterval actionWithDuration(float t) { CCSize size = CCDirector.sharedDirector().getWinSize(); return(CCLens3D.actionWithPosition(new CCPoint(size.width / 2, size.height / 2), 240, new ccGridSize(15, 10), t)); }