/libs/cocos2d/CCEaseAction.h

http://github.com/kstenerud/ObjectAL-for-iPhone · C Header · 159 lines · 43 code · 20 blank · 96 comment · 0 complexity · df0134e4dc711cfd77ce9bdb121c6137 MD5 · raw file

  1. /*
  2. * cocos2d for iPhone: http://www.cocos2d-iphone.org
  3. *
  4. * Copyright (c) 2008-2009 Jason Booth
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining a copy
  7. * of this software and associated documentation files (the "Software"), to deal
  8. * in the Software without restriction, including without limitation the rights
  9. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  10. * copies of the Software, and to permit persons to whom the Software is
  11. * furnished to do so, subject to the following conditions:
  12. *
  13. * The above copyright notice and this permission notice shall be included in
  14. * all copies or substantial portions of the Software.
  15. *
  16. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  19. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  20. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  21. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  22. * THE SOFTWARE.
  23. *
  24. */
  25. #import "CCIntervalAction.h"
  26. /** Base class for Easing actions
  27. */
  28. @interface CCEaseAction : CCIntervalAction <NSCopying>
  29. {
  30. CCIntervalAction * other;
  31. }
  32. /** creates the action */
  33. +(id) actionWithAction: (CCIntervalAction*) action;
  34. /** initializes the action */
  35. -(id) initWithAction: (CCIntervalAction*) action;
  36. @end
  37. /** Base class for Easing actions with rate parameters
  38. */
  39. @interface CCEaseRateAction : CCEaseAction <NSCopying>
  40. {
  41. float rate;
  42. }
  43. /** rate value for the actions */
  44. @property (nonatomic,readwrite,assign) float rate;
  45. /** Creates the action with the inner action and the rate parameter */
  46. +(id) actionWithAction: (CCIntervalAction*) action rate:(float)rate;
  47. /** Initializes the action with the inner action and the rate parameter */
  48. -(id) initWithAction: (CCIntervalAction*) action rate:(float)rate;
  49. @end
  50. /** CCEaseIn action with a rate
  51. */
  52. @interface CCEaseIn : CCEaseRateAction <NSCopying> {} @end
  53. /** CCEaseOut action with a rate
  54. */
  55. @interface CCEaseOut : CCEaseRateAction <NSCopying> {} @end
  56. /** CCEaseInOut action with a rate
  57. */
  58. @interface CCEaseInOut : CCEaseRateAction <NSCopying> {} @end
  59. /** CCEase Exponential In
  60. */
  61. @interface CCEaseExponentialIn : CCEaseAction <NSCopying> {} @end
  62. /** Ease Exponential Out
  63. */
  64. @interface CCEaseExponentialOut : CCEaseAction <NSCopying> {} @end
  65. /** Ease Exponential InOut
  66. */
  67. @interface CCEaseExponentialInOut : CCEaseAction <NSCopying> {} @end
  68. /** Ease Sine In
  69. */
  70. @interface CCEaseSineIn : CCEaseAction <NSCopying> {} @end
  71. /** Ease Sine Out
  72. */
  73. @interface CCEaseSineOut : CCEaseAction <NSCopying> {} @end
  74. /** Ease Sine InOut
  75. */
  76. @interface CCEaseSineInOut : CCEaseAction <NSCopying> {} @end
  77. /** Ease Elastic abstract class
  78. @since v0.8.2
  79. */
  80. @interface CCEaseElastic : CCEaseAction <NSCopying>
  81. {
  82. float period_;
  83. }
  84. /** period of the wave in radians. default is 0.3 */
  85. @property (nonatomic,readwrite) float period;
  86. /** Creates the action with the inner action and the period in radians (default is 0.3) */
  87. +(id) actionWithAction: (CCIntervalAction*) action period:(float)period;
  88. /** Initializes the action with the inner action and the period in radians (default is 0.3) */
  89. -(id) initWithAction: (CCIntervalAction*) action period:(float)period;
  90. @end
  91. /** Ease Elastic In action.
  92. @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action.
  93. @since v0.8.2
  94. */
  95. @interface CCEaseElasticIn : CCEaseElastic <NSCopying> {} @end
  96. /** Ease Elastic Out action.
  97. @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action.
  98. @since v0.8.2
  99. */
  100. @interface CCEaseElasticOut : CCEaseElastic <NSCopying> {} @end
  101. /** Ease Elastic InOut action.
  102. @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action.
  103. @since v0.8.2
  104. */
  105. @interface CCEaseElasticInOut : CCEaseElastic <NSCopying> {} @end
  106. /** CCEaseBounce abstract class.
  107. @since v0.8.2
  108. */
  109. @interface CCEaseBounce : CCEaseAction <NSCopying> {} @end
  110. /** CCEaseBounceIn action.
  111. @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action.
  112. @since v0.8.2
  113. */
  114. @interface CCEaseBounceIn : CCEaseBounce <NSCopying> {} @end
  115. /** EaseBounceOut action.
  116. @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action.
  117. @since v0.8.2
  118. */
  119. @interface CCEaseBounceOut : CCEaseBounce <NSCopying> {} @end
  120. /** CCEaseBounceInOut action.
  121. @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action.
  122. @since v0.8.2
  123. */
  124. @interface CCEaseBounceInOut : CCEaseBounce <NSCopying> {} @end
  125. /** CCEaseBackIn action.
  126. @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action.
  127. @since v0.8.2
  128. */
  129. @interface CCEaseBackIn : CCEaseAction <NSCopying> {} @end
  130. /** CCEaseBackOut action.
  131. @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action.
  132. @since v0.8.2
  133. */
  134. @interface CCEaseBackOut : CCEaseAction <NSCopying> {} @end
  135. /** CCEaseBackInOut action.
  136. @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action.
  137. @since v0.8.2
  138. */
  139. @interface CCEaseBackInOut : CCEaseAction <NSCopying> {} @end