public override void OnEnter() { base.OnEnter(); var s = CCDirector.SharedDirector.WinSize; var move = new CCMoveBy(3, new CCPoint(s.Width - 130, 0)); var move_back = move.Reverse(); var move_ease_in = new CCEaseBackIn((CCActionInterval)(move.Copy())); var move_ease_in_back = move_ease_in.Reverse(); var move_ease_out = new CCEaseBackOut((CCActionInterval)(move.Copy())); var move_ease_out_back = move_ease_out.Reverse(); var delay = new CCDelayTime(0.25f); var seq1 = CCSequence.FromActions(move, delay, move_back, (CCFiniteTimeAction)delay.Copy()); var seq2 = CCSequence.FromActions(move_ease_in, (CCFiniteTimeAction)delay.Copy(), move_ease_in_back, (CCFiniteTimeAction)delay.Copy()); var seq3 = CCSequence.FromActions(move_ease_out, (CCFiniteTimeAction)delay.Copy(), move_ease_out_back, (CCFiniteTimeAction)delay.Copy()); m_grossini.RunAction(new CCRepeatForever(seq1)); m_tamara.RunAction(new CCRepeatForever(seq2)); m_kathia.RunAction(new CCRepeatForever(seq3)); }
public override void OnEnter() { base.OnEnter(); var s = CCDirector.SharedDirector.WinSize; var move = new CCMoveBy(3, new CCPoint(s.Width - 130, 0)); var move_ease_inout1 = new CCEaseElasticInOut((CCActionInterval)(move.Copy()), 0.3f); var move_ease_inout_back1 = move_ease_inout1.Reverse(); var move_ease_inout2 = new CCEaseElasticInOut((CCActionInterval)(move.Copy()), 0.45f); var move_ease_inout_back2 = move_ease_inout2.Reverse(); var move_ease_inout3 = new CCEaseElasticInOut((CCActionInterval)(move.Copy()), 0.6f); var move_ease_inout_back3 = move_ease_inout3.Reverse(); var delay = new CCDelayTime(0.25f); var seq1 = CCSequence.FromActions(move_ease_inout1, delay, move_ease_inout_back1, (CCFiniteTimeAction)delay.Copy()); var seq2 = CCSequence.FromActions(move_ease_inout2, (CCFiniteTimeAction)delay.Copy(), move_ease_inout_back2, (CCFiniteTimeAction)delay.Copy()); var seq3 = CCSequence.FromActions(move_ease_inout3, (CCFiniteTimeAction)delay.Copy(), move_ease_inout_back3, (CCFiniteTimeAction)delay.Copy()); m_tamara.RunAction(new CCRepeatForever(seq1)); m_kathia.RunAction(new CCRepeatForever(seq2)); m_grossini.RunAction(new CCRepeatForever(seq3)); }
public StressTest2() { CCSize s = CCDirector.SharedDirector.WinSize; CCLayer sublayer = new CCLayer(); CCSprite sp1 = new CCSprite(TestResource.s_pPathSister1); sp1.Position = (new CCPoint(80, s.Height / 2)); CCActionInterval move = new CCMoveBy(3, new CCPoint(350, 0)); CCActionInterval move_ease_inout3 = new CCEaseInOut((CCActionInterval)(move.Copy()), 2.0f); var move_ease_inout_back3 = (CCActionInterval)move_ease_inout3.Reverse(); CCFiniteTimeAction seq3 = CCSequence.FromActions(move_ease_inout3, move_ease_inout_back3); sp1.RunAction(new CCRepeatForever((CCActionInterval)seq3)); sublayer.AddChild(sp1, 1); CCParticleFire fire = new CCParticleFire(); fire.Texture = (CCTextureCache.SharedTextureCache.AddImage("Images/fire")); fire.Position = (new CCPoint(80, s.Height / 2 - 50)); var copy_seq3 = (CCActionInterval)(seq3.Copy()); fire.RunAction(new CCRepeatForever(copy_seq3)); sublayer.AddChild(fire, 2); Schedule((shouldNotLeak), 6.0f); AddChild(sublayer, 0, CocosNodeTestStaticLibrary.kTagSprite1); }
public override void OnEnter() { base.OnEnter(); var size = CCDirector.SharedDirector.WinSize; var move = new CCMoveBy(3, new CCPoint(size.Width - 130, 0)); var move_back = (CCActionInterval)move.Reverse(); var move_ease_in = new CCEaseIn((CCActionInterval)move.Copy(), 2.5f); var move_ease_in_back = move_ease_in.Reverse(); var move_ease_out = new CCEaseOut((CCActionInterval)move.Copy(), 2.5f); var move_ease_out_back = move_ease_out.Reverse(); var delay = new CCDelayTime(0.25f); var seq1 = CCSequence.FromActions(move, delay, move_back, (CCFiniteTimeAction)delay.Copy()); var seq2 = CCSequence.FromActions(move_ease_in, (CCFiniteTimeAction)delay.Copy(), move_ease_in_back, (CCFiniteTimeAction)delay.Copy()); var seq3 = CCSequence.FromActions(move_ease_out, (CCFiniteTimeAction)delay.Copy(), move_ease_out_back, (CCFiniteTimeAction)delay.Copy()); var a2 = m_grossini.RunAction(new CCRepeatForever((CCActionInterval)seq1)); a2.Tag = 1; var a1 = m_tamara.RunAction(new CCRepeatForever((CCActionInterval)seq2)); a1.Tag = 1; var a = m_kathia.RunAction(new CCRepeatForever((CCActionInterval)seq3)); a.Tag = 1; Schedule(testStopAction, 6.25f); }
public override void OnEnter() { base.OnEnter(); alignSpritesLeft(2); var a1 = new CCMoveBy(1, new CCPoint(150, 0)); var action1 = new CCRepeat( CCSequence.FromActions(new CCPlace(new CCPoint(60, 60)), a1), 3); var action2 = new CCRepeatForever( (CCSequence.FromActions((CCActionInterval)(a1.Copy()), a1.Reverse())) ); m_kathia.RunAction(action1); m_tamara.RunAction(action2); }
public override void OnEnter() { base.OnEnter(); var s = CCDirector.SharedDirector.WinSize; var move = new CCMoveBy(3, new CCPoint(s.Width - 130, 0)); var move_back = move.Reverse(); var move_ease = new CCEaseExponentialInOut((CCActionInterval)move.Copy()); var move_ease_back = move_ease.Reverse(); //-. reverse() var delay = new CCDelayTime(0.25f); var seq1 = CCSequence.FromActions(move, delay, move_back, (CCFiniteTimeAction)delay.Copy()); var seq2 = CCSequence.FromActions(move_ease, (CCFiniteTimeAction)delay.Copy(), move_ease_back, (CCFiniteTimeAction)delay.Copy()); positionForTwo(); m_grossini.RunAction(new CCRepeatForever(seq1)); m_tamara.RunAction(new CCRepeatForever(seq2)); }