summary refs log tree commit diff stats
path: root/libs/cocos2d/CCActionGrid.h
diff options
context:
space:
mode:
authorStarla Insigna <starla4444@gmail.com>2011-07-30 11:19:14 -0400
committerStarla Insigna <starla4444@gmail.com>2011-07-30 11:19:14 -0400
commit9cd57b731ab1c666d4a1cb725538fdc137763d12 (patch)
tree5bac45ae5157a1cb10c6e45500cbf72789917980 /libs/cocos2d/CCActionGrid.h
downloadcartcollect-9cd57b731ab1c666d4a1cb725538fdc137763d12.tar.gz
cartcollect-9cd57b731ab1c666d4a1cb725538fdc137763d12.tar.bz2
cartcollect-9cd57b731ab1c666d4a1cb725538fdc137763d12.zip
Initial commit (version 0.2.1)
Diffstat (limited to 'libs/cocos2d/CCActionGrid.h')
-rwxr-xr-xlibs/cocos2d/CCActionGrid.h165
1 files changed, 165 insertions, 0 deletions
diff --git a/libs/cocos2d/CCActionGrid.h b/libs/cocos2d/CCActionGrid.h new file mode 100755 index 0000000..6b31179 --- /dev/null +++ b/libs/cocos2d/CCActionGrid.h
@@ -0,0 +1,165 @@
1/*
2 * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 *
4 * Copyright (c) 2009 On-Core
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#import "CCActionInstant.h"
29#import "CCGrid.h"
30
31@class CCGridBase;
32
33/** Base class for Grid actions */
34@interface CCGridAction : CCActionInterval
35{
36 ccGridSize gridSize_;
37}
38
39/** size of the grid */
40@property (nonatomic,readwrite) ccGridSize gridSize;
41
42/** creates the action with size and duration */
43+(id) actionWithSize:(ccGridSize)size duration:(ccTime)d;
44/** initializes the action with size and duration */
45-(id) initWithSize:(ccGridSize)gridSize duration:(ccTime)d;
46/** returns the grid */
47-(CCGridBase *)grid;
48
49@end
50
51////////////////////////////////////////////////////////////
52
53/** Base class for CCGrid3D actions.
54 Grid3D actions can modify a non-tiled grid.
55 */
56@interface CCGrid3DAction : CCGridAction
57{
58}
59
60/** returns the vertex than belongs to certain position in the grid */
61-(ccVertex3F)vertex:(ccGridSize)pos;
62/** returns the non-transformed vertex than belongs to certain position in the grid */
63-(ccVertex3F)originalVertex:(ccGridSize)pos;
64/** sets a new vertex to a certain position of the grid */
65-(void)setVertex:(ccGridSize)pos vertex:(ccVertex3F)vertex;
66
67@end
68
69////////////////////////////////////////////////////////////
70
71/** Base class for CCTiledGrid3D actions */
72@interface CCTiledGrid3DAction : CCGridAction
73{
74}
75
76/** returns the tile that belongs to a certain position of the grid */
77-(ccQuad3)tile:(ccGridSize)pos;
78/** returns the non-transformed tile that belongs to a certain position of the grid */
79-(ccQuad3)originalTile:(ccGridSize)pos;
80/** sets a new tile to a certain position of the grid */
81-(void)setTile:(ccGridSize)pos coords:(ccQuad3)coords;
82
83@end
84
85////////////////////////////////////////////////////////////
86
87/** CCAccelDeccelAmplitude action */
88@interface CCAccelDeccelAmplitude : CCActionInterval
89{
90 float rate_;
91 CCActionInterval *other_;
92}
93
94/** amplitude rate */
95@property (nonatomic,readwrite) float rate;
96
97/** creates the action with an inner action that has the amplitude property, and a duration time */
98+(id)actionWithAction:(CCAction*)action duration:(ccTime)d;
99/** initializes the action with an inner action that has the amplitude property, and a duration time */
100-(id)initWithAction:(CCAction*)action duration:(ccTime)d;
101
102@end
103
104////////////////////////////////////////////////////////////
105
106/** CCAccelAmplitude action */
107@interface CCAccelAmplitude : CCActionInterval
108{
109 float rate_;
110 CCActionInterval *other_;
111}
112
113/** amplitude rate */
114@property (nonatomic,readwrite) float rate;
115
116/** creates the action with an inner action that has the amplitude property, and a duration time */
117+(id)actionWithAction:(CCAction*)action duration:(ccTime)d;
118/** initializes the action with an inner action that has the amplitude property, and a duration time */
119-(id)initWithAction:(CCAction*)action duration:(ccTime)d;
120
121@end
122
123////////////////////////////////////////////////////////////
124
125/** CCDeccelAmplitude action */
126@interface CCDeccelAmplitude : CCActionInterval
127{
128 float rate_;
129 CCActionInterval *other_;
130}
131
132/** amplitude rate */
133@property (nonatomic,readwrite) float rate;
134
135/** creates the action with an inner action that has the amplitude property, and a duration time */
136+(id)actionWithAction:(CCAction*)action duration:(ccTime)d;
137/** initializes the action with an inner action that has the amplitude property, and a duration time */
138-(id)initWithAction:(CCAction*)action duration:(ccTime)d;
139
140@end
141
142////////////////////////////////////////////////////////////
143
144/** CCStopGrid action.
145 Don't call this action if another grid action is active.
146 Call if you want to remove the the grid effect. Example:
147 [Sequence actions:[Lens ...], [StopGrid action], nil];
148 */
149@interface CCStopGrid : CCActionInstant
150{
151}
152@end
153
154////////////////////////////////////////////////////////////
155
156/** CCReuseGrid action */
157@interface CCReuseGrid : CCActionInstant
158{
159 int t_;
160}
161/** creates an action with the number of times that the current grid will be reused */
162+(id) actionWithTimes: (int) times;
163/** initializes an action with the number of times that the current grid will be reused */
164-(id) initWithTimes: (int) times;
165@end