public override void OnEnter() { base.OnEnter(); CCSize s = CCDirector.SharedDirector.WinSize; 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 = new CCJumpBy(m_fDuration / 4, new CCPoint(-s.Width, 0), s.Width / 4, 2); CCActionInterval scaleIn = new CCScaleTo(m_fDuration / 4, 1.0f); CCActionInterval scaleOut = new CCScaleTo(m_fDuration / 4, 0.5f); CCSequence jumpZoomOut = (CCSequence.FromActions(scaleOut, jump)); CCSequence jumpZoomIn = (CCSequence.FromActions((CCActionInterval)jump.Copy(), scaleIn)); CCActionInterval delay = new CCDelayTime(m_fDuration / 2); m_pOutScene.RunAction(jumpZoomOut); m_pInScene.RunAction ( CCSequence.FromActions ( delay, jumpZoomIn, new CCCallFunc(Finish) ) ); }
public override void OnEnter() { base.OnEnter(); CCSize s = CCDirector.SharedDirector.WinSize; 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 = new CCJumpBy (m_fDuration / 4, new CCPoint(-s.Width, 0), s.Width / 4, 2); CCActionInterval scaleIn = new CCScaleTo(m_fDuration / 4, 1.0f); CCActionInterval scaleOut = new CCScaleTo(m_fDuration / 4, 0.5f); CCSequence jumpZoomOut = (CCSequence.FromActions(scaleOut, jump)); CCSequence jumpZoomIn = (CCSequence.FromActions((CCActionInterval) jump.Copy(), scaleIn)); CCActionInterval delay = new CCDelayTime (m_fDuration / 2); m_pOutScene.RunAction(jumpZoomOut); m_pInScene.RunAction ( CCSequence.FromActions ( delay, jumpZoomIn, new CCCallFunc(Finish) ) ); }
public override void OnEnter() { base.OnEnter(); float x, y; CCSize size = CCDirector.SharedDirector.WinSize; x = size.Width; y = size.Height; CCSprite sprite = new CCSprite(s_pPathGrossini); CCSprite spriteSister1 = new CCSprite(s_pPathSister1); CCSprite spriteSister2 = new CCSprite(s_pPathSister2); sprite.Scale = (1.5f); spriteSister1.Scale = (1.5f); spriteSister2.Scale = (1.5f); sprite.Position = (new CCPoint(x / 2, y / 2)); spriteSister1.Position = (new CCPoint(40, y / 2)); spriteSister2.Position = (new CCPoint(x - 40, y / 2)); CCAction rot = new CCRotateBy(16, -3600); AddChild(sprite); AddChild(spriteSister1); AddChild(spriteSister2); sprite.RunAction(rot); CCActionInterval jump1 = new CCJumpBy(4, new CCPoint(-400, 0), 100, 4); CCActionInterval jump2 = (CCActionInterval)jump1.Reverse(); CCActionInterval rot1 = new CCRotateBy(4, 360 * 2); CCActionInterval rot2 = (CCActionInterval)rot1.Reverse(); spriteSister1.RunAction(new CCRepeat(new CCSequence(jump2, jump1), 5)); spriteSister2.RunAction(new CCRepeat(new CCSequence((CCFiniteTimeAction)(jump1.Copy()), (CCFiniteTimeAction)(jump2.Copy())), 5)); spriteSister1.RunAction(new CCRepeat(new CCSequence(rot1, rot2), 5)); spriteSister2.RunAction(new CCRepeat(new CCSequence((CCFiniteTimeAction)(rot2.Copy()), (CCFiniteTimeAction)(rot1.Copy())), 5)); }
public override void OnEnter() { base.OnEnter(); centerSprites(2); var jump1 = new CCJumpBy(2, CCPoint.Zero, 100, 3); var jump2 = (CCJumpBy)jump1.Copy(); var rot1 = new CCRotateBy(1, 360); var rot2 = (CCRotateBy)rot1.Copy(); var t1 = new CCTargetedAction(m_kathia, jump2); var t2 = new CCTargetedAction(m_kathia, rot2); var seq = CCSequence.FromActions(jump1, t1, rot1, t2); var always = new CCRepeatForever(seq); m_tamara.RunAction(always); }