diff options
author | Starla Insigna <starla4444@gmail.com> | 2011-07-30 11:19:14 -0400 |
---|---|---|
committer | Starla Insigna <starla4444@gmail.com> | 2011-07-30 11:19:14 -0400 |
commit | 9cd57b731ab1c666d4a1cb725538fdc137763d12 (patch) | |
tree | 5bac45ae5157a1cb10c6e45500cbf72789917980 /libs/cocos2d/CCActionEase.h | |
download | cartcollect-9cd57b731ab1c666d4a1cb725538fdc137763d12.tar.gz cartcollect-9cd57b731ab1c666d4a1cb725538fdc137763d12.tar.bz2 cartcollect-9cd57b731ab1c666d4a1cb725538fdc137763d12.zip |
Initial commit (version 0.2.1)
Diffstat (limited to 'libs/cocos2d/CCActionEase.h')
-rwxr-xr-x | libs/cocos2d/CCActionEase.h | 159 |
1 files changed, 159 insertions, 0 deletions
diff --git a/libs/cocos2d/CCActionEase.h b/libs/cocos2d/CCActionEase.h new file mode 100755 index 0000000..fced701 --- /dev/null +++ b/libs/cocos2d/CCActionEase.h | |||
@@ -0,0 +1,159 @@ | |||
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 | |||
26 | |||
27 | #import "CCActionInterval.h" | ||
28 | |||
29 | /** Base class for Easing actions | ||
30 | */ | ||
31 | @interface CCActionEase : CCActionInterval <NSCopying> | ||
32 | { | ||
33 | CCActionInterval * other; | ||
34 | } | ||
35 | /** creates the action */ | ||
36 | +(id) actionWithAction: (CCActionInterval*) action; | ||
37 | /** initializes the action */ | ||
38 | -(id) initWithAction: (CCActionInterval*) action; | ||
39 | @end | ||
40 | |||
41 | /** Base class for Easing actions with rate parameters | ||
42 | */ | ||
43 | @interface CCEaseRateAction : CCActionEase <NSCopying> | ||
44 | { | ||
45 | float rate; | ||
46 | } | ||
47 | /** rate value for the actions */ | ||
48 | @property (nonatomic,readwrite,assign) float rate; | ||
49 | /** Creates the action with the inner action and the rate parameter */ | ||
50 | +(id) actionWithAction: (CCActionInterval*) action rate:(float)rate; | ||
51 | /** Initializes the action with the inner action and the rate parameter */ | ||
52 | -(id) initWithAction: (CCActionInterval*) action rate:(float)rate; | ||
53 | @end | ||
54 | |||
55 | /** CCEaseIn action with a rate | ||
56 | */ | ||
57 | @interface CCEaseIn : CCEaseRateAction <NSCopying> {} @end | ||
58 | |||
59 | /** CCEaseOut action with a rate | ||
60 | */ | ||
61 | @interface CCEaseOut : CCEaseRateAction <NSCopying> {} @end | ||
62 | |||
63 | /** CCEaseInOut action with a rate | ||
64 | */ | ||
65 | @interface CCEaseInOut : CCEaseRateAction <NSCopying> {} @end | ||
66 | |||
67 | /** CCEase Exponential In | ||
68 | */ | ||
69 | @interface CCEaseExponentialIn : CCActionEase <NSCopying> {} @end | ||
70 | /** Ease Exponential Out | ||
71 | */ | ||
72 | @interface CCEaseExponentialOut : CCActionEase <NSCopying> {} @end | ||
73 | /** Ease Exponential InOut | ||
74 | */ | ||
75 | @interface CCEaseExponentialInOut : CCActionEase <NSCopying> {} @end | ||
76 | /** Ease Sine In | ||
77 | */ | ||
78 | @interface CCEaseSineIn : CCActionEase <NSCopying> {} @end | ||
79 | /** Ease Sine Out | ||
80 | */ | ||
81 | @interface CCEaseSineOut : CCActionEase <NSCopying> {} @end | ||
82 | /** Ease Sine InOut | ||
83 | */ | ||
84 | @interface CCEaseSineInOut : CCActionEase <NSCopying> {} @end | ||
85 | |||
86 | /** Ease Elastic abstract class | ||
87 | @since v0.8.2 | ||
88 | */ | ||
89 | @interface CCEaseElastic : CCActionEase <NSCopying> | ||
90 | { | ||
91 | float period_; | ||
92 | } | ||
93 | |||
94 | /** period of the wave in radians. default is 0.3 */ | ||
95 | @property (nonatomic,readwrite) float period; | ||
96 | |||
97 | /** Creates the action with the inner action and the period in radians (default is 0.3) */ | ||
98 | +(id) actionWithAction: (CCActionInterval*) action period:(float)period; | ||
99 | /** Initializes the action with the inner action and the period in radians (default is 0.3) */ | ||
100 | -(id) initWithAction: (CCActionInterval*) action period:(float)period; | ||
101 | @end | ||
102 | |||
103 | /** Ease Elastic In action. | ||
104 | @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action. | ||
105 | @since v0.8.2 | ||
106 | */ | ||
107 | @interface CCEaseElasticIn : CCEaseElastic <NSCopying> {} @end | ||
108 | /** Ease Elastic Out action. | ||
109 | @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action. | ||
110 | @since v0.8.2 | ||
111 | */ | ||
112 | @interface CCEaseElasticOut : CCEaseElastic <NSCopying> {} @end | ||
113 | /** Ease Elastic InOut action. | ||
114 | @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action. | ||
115 | @since v0.8.2 | ||
116 | */ | ||
117 | @interface CCEaseElasticInOut : CCEaseElastic <NSCopying> {} @end | ||
118 | |||
119 | /** CCEaseBounce abstract class. | ||
120 | @since v0.8.2 | ||
121 | */ | ||
122 | @interface CCEaseBounce : CCActionEase <NSCopying> {} @end | ||
123 | |||
124 | /** CCEaseBounceIn action. | ||
125 | @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action. | ||
126 | @since v0.8.2 | ||
127 | */ | ||
128 | @interface CCEaseBounceIn : CCEaseBounce <NSCopying> {} @end | ||
129 | |||
130 | /** EaseBounceOut 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 CCEaseBounceOut : CCEaseBounce <NSCopying> {} @end | ||
135 | |||
136 | /** CCEaseBounceInOut action. | ||
137 | @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action. | ||
138 | @since v0.8.2 | ||
139 | */ | ||
140 | @interface CCEaseBounceInOut : CCEaseBounce <NSCopying> {} @end | ||
141 | |||
142 | /** CCEaseBackIn action. | ||
143 | @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action. | ||
144 | @since v0.8.2 | ||
145 | */ | ||
146 | @interface CCEaseBackIn : CCActionEase <NSCopying> {} @end | ||
147 | |||
148 | /** CCEaseBackOut action. | ||
149 | @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action. | ||
150 | @since v0.8.2 | ||
151 | */ | ||
152 | @interface CCEaseBackOut : CCActionEase <NSCopying> {} @end | ||
153 | |||
154 | /** CCEaseBackInOut action. | ||
155 | @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action. | ||
156 | @since v0.8.2 | ||
157 | */ | ||
158 | @interface CCEaseBackInOut : CCActionEase <NSCopying> {} @end | ||
159 | |||