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 = new CCSequence(jump1, t1, rot1, t2); var always = new CCRepeatForever (seq); m_tamara.RunAction(always); }