public override void OnEnter() { base.OnEnter(); var s = Layer.VisibleBoundsWorldspace.Size; var move = new CCMoveBy(3, new CCPoint(s.Width - 130, 0)); var move_back = move.Reverse(); var move_ease_in = new CCEaseSineIn(move); var move_ease_in_back = move_ease_in.Reverse(); var move_ease_out = new CCEaseSineOut(move); var move_ease_out_back = move_ease_out.Reverse(); var delay = new CCDelayTime(0.25f); var seq1 = new CCSequence(move, delay, move_back, delay); var seq2 = new CCSequence(move_ease_in, delay, move_ease_in_back, delay); var seq3 = new CCSequence(move_ease_out, delay, move_ease_out_back, delay); 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_back = move.Reverse(); var move_ease_in = new CCEaseSineIn((CCActionInterval)move.Copy()); var move_ease_in_back = move_ease_in.Reverse(); var move_ease_out = new CCEaseSineOut((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)); }