CCActionTiledGrid.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609
  1. /****************************************************************************
  2. Copyright (c) 2009 On-Core
  3. Copyright (c) 2010-2012 cocos2d-x.org
  4. Copyright (c) 2013-2017 Chukong Technologies Inc.
  5. http://www.cocos2d-x.org
  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. The above copyright notice and this permission notice shall be included in
  13. all copies or substantial portions of the Software.
  14. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. THE SOFTWARE.
  21. ****************************************************************************/
  22. #ifndef __ACTION_CCTILEDGRID_ACTION_H__
  23. #define __ACTION_CCTILEDGRID_ACTION_H__
  24. #include "2d/CCActionGrid.h"
  25. NS_CC_BEGIN
  26. /**
  27. * @addtogroup actions
  28. * @{
  29. */
  30. /**
  31. @brief ShakyTiles3D action.
  32. @details This action is make the target node shake with many tiles.
  33. You can create the action by these parameters:
  34. duration, grid size, range, whether shake on the z axis.
  35. */
  36. class CC_DLL ShakyTiles3D : public TiledGrid3DAction
  37. {
  38. public:
  39. /**
  40. @brief Create the action with a range, shake Z vertices, a grid and duration.
  41. @param duration Specify the duration of the ShakyTiles3D action. It's a value in seconds.
  42. @param gridSize Specify the size of the grid.
  43. @param range Specify the range of the shaky effect.
  44. @param shakeZ Specify whether shake on the z axis.
  45. @return If the creation success, return a pointer of ShakyTiles3D action; otherwise, return nil.
  46. */
  47. static ShakyTiles3D* create(float duration, const Size& gridSize, int range, bool shakeZ);
  48. // Override
  49. virtual ShakyTiles3D* clone() const override;
  50. virtual void update(float time) override;
  51. CC_CONSTRUCTOR_ACCESS:
  52. ShakyTiles3D() {}
  53. virtual ~ShakyTiles3D() {}
  54. /**
  55. @brief Initializes the action with a range, shake Z vertices, grid size and duration.
  56. @param duration Specify the duration of the ShakyTiles3D action. It's a value in seconds.
  57. @param gridSize Specify the size of the grid.
  58. @param range Specify the range of the shaky effect.
  59. @param shakeZ Specify whether shake on the z axis.
  60. @return If the Initialization success, return true; otherwise, return false.
  61. */
  62. bool initWithDuration(float duration, const Size& gridSize, int range, bool shakeZ);
  63. protected:
  64. int _randrange;
  65. bool _shakeZ;
  66. private:
  67. CC_DISALLOW_COPY_AND_ASSIGN(ShakyTiles3D);
  68. };
  69. /**
  70. @brief ShatteredTiles3D action.
  71. @details This action make the target node shattered with many tiles.
  72. You can create the action by these parameters:
  73. duration, grid size, range, whether shatter on the z axis.
  74. */
  75. class CC_DLL ShatteredTiles3D : public TiledGrid3DAction
  76. {
  77. public:
  78. /**
  79. * @brief Create the action with a range, whether of not to shatter Z vertices, grid size and duration.
  80. * @param duration Specify the duration of the ShatteredTiles3D action. It's a value in seconds.
  81. * @param gridSize Specify the size of the grid.
  82. * @param range Specify the range of the shatter effect.
  83. * @param shatterZ Specify whether shatter on the z axis.
  84. * @return If the creation success, return a pointer of ShatteredTiles3D action; otherwise, return nil.
  85. */
  86. static ShatteredTiles3D* create(float duration, const Size& gridSize, int range, bool shatterZ);
  87. // Override
  88. virtual ShatteredTiles3D* clone() const override;
  89. virtual void update(float time) override;
  90. CC_CONSTRUCTOR_ACCESS:
  91. ShatteredTiles3D() {}
  92. virtual ~ShatteredTiles3D() {}
  93. /**
  94. @brief Initializes the action with a range, shatter Z vertices, grid size and duration.
  95. @param duration Specify the duration of the ShatteredTiles3D action. It's a value in seconds.
  96. @param gridSize Specify the size of the grid.
  97. @param range Specify the range of the shatter effect.
  98. @param shatterZ Specify whether shake on the z axis.
  99. @return If the Initialization success, return true; otherwise, return false.
  100. */
  101. bool initWithDuration(float duration, const Size& gridSize, int range, bool shatterZ);
  102. protected:
  103. int _randrange;
  104. bool _once;
  105. bool _shatterZ;
  106. private:
  107. CC_DISALLOW_COPY_AND_ASSIGN(ShatteredTiles3D);
  108. };
  109. struct Tile;
  110. /**
  111. @brief ShuffleTiles action.
  112. @details This action make the target node shuffle with many tiles in random order.
  113. You can create the action by these parameters:
  114. duration, grid size, the random seed.
  115. */
  116. class CC_DLL ShuffleTiles : public TiledGrid3DAction
  117. {
  118. public:
  119. /**
  120. * @brief Create the action with grid size, random seed and duration.
  121. * @param duration Specify the duration of the ShuffleTiles action. It's a value in seconds.
  122. * @param gridSize Specify the size of the grid.
  123. * @param seed Specify the random seed.
  124. * @return If the creation success, return a pointer of ShuffleTiles action; otherwise, return nil.
  125. */
  126. static ShuffleTiles* create(float duration, const Size& gridSize, unsigned int seed);
  127. void shuffle(unsigned int *array, unsigned int len);
  128. Size getDelta(const Size& pos) const;
  129. void placeTile(const Vec2& pos, Tile *t);
  130. // Overrides
  131. virtual void startWithTarget(Node *target) override;
  132. virtual void update(float time) override;
  133. virtual ShuffleTiles* clone() const override;
  134. CC_CONSTRUCTOR_ACCESS:
  135. ShuffleTiles() {}
  136. virtual ~ShuffleTiles();
  137. /**
  138. * @brief Initializes the action with grid size, random seed and duration.
  139. * @param duration Specify the duration of the ShuffleTiles action. It's a value in seconds.
  140. * @param gridSize Specify the size of the grid.
  141. * @param seed Specify the random seed.
  142. * @return If the Initialization success, return true; otherwise, return false.
  143. */
  144. bool initWithDuration(float duration, const Size& gridSize, unsigned int seed);
  145. protected:
  146. unsigned int _seed;
  147. unsigned int _tilesCount;
  148. unsigned int* _tilesOrder;
  149. Tile* _tiles;
  150. private:
  151. CC_DISALLOW_COPY_AND_ASSIGN(ShuffleTiles);
  152. };
  153. /**
  154. @brief FadeOutTRTiles action.
  155. @details Fades out the target node with many tiles from Bottom-Left to Top-Right.
  156. */
  157. class CC_DLL FadeOutTRTiles : public TiledGrid3DAction
  158. {
  159. public:
  160. /**
  161. * @brief Create the action with the grid size and the duration.
  162. * @param duration Specify the duration of the FadeOutTRTiles action. It's a value in seconds.
  163. * @param gridSize Specify the size of the grid.
  164. * @return If the creation success, return a pointer of FadeOutTRTiles action; otherwise, return nil.
  165. */
  166. static FadeOutTRTiles* create(float duration, const Size& gridSize);
  167. /**
  168. @brief Calculate the percentage a tile should be shown.
  169. @param pos The position index of the tile.
  170. @param time The current percentage of the action.
  171. @return Return the percentage the tile should be shown.
  172. */
  173. virtual float testFunc(const Size& pos, float time);
  174. /**
  175. @brief Show the tile at specified position.
  176. @param pos The position index of the tile should be shown.
  177. */
  178. void turnOnTile(const Vec2& pos);
  179. /**
  180. @brief Hide the tile at specified position.
  181. @param pos The position index of the tile should be hide.
  182. */
  183. void turnOffTile(const Vec2& pos);
  184. /**
  185. @brief Show part of the tile.
  186. @param pos The position index of the tile should be shown.
  187. @param distance The percentage that the tile should be shown.
  188. */
  189. virtual void transformTile(const Vec2& pos, float distance);
  190. // Overrides
  191. virtual void update(float time) override;
  192. virtual FadeOutTRTiles* clone() const override;
  193. CC_CONSTRUCTOR_ACCESS:
  194. FadeOutTRTiles() {}
  195. virtual ~FadeOutTRTiles() {}
  196. private:
  197. CC_DISALLOW_COPY_AND_ASSIGN(FadeOutTRTiles);
  198. };
  199. /**
  200. @brief FadeOutBLTiles action.
  201. @details Fades out the target node with many tiles from Top-Right to Bottom-Left.
  202. */
  203. class CC_DLL FadeOutBLTiles : public FadeOutTRTiles
  204. {
  205. public:
  206. /**
  207. * @brief Create the action with the grid size and the duration.
  208. * @param duration Specify the duration of the FadeOutBLTiles action. It's a value in seconds.
  209. * @param gridSize Specify the size of the grid.
  210. * @return If the creation success, return a pointer of FadeOutBLTiles action; otherwise, return nil.
  211. */
  212. static FadeOutBLTiles* create(float duration, const Size& gridSize);
  213. // Overrides
  214. virtual float testFunc(const Size& pos, float time) override;
  215. virtual FadeOutBLTiles* clone() const override;
  216. CC_CONSTRUCTOR_ACCESS:
  217. FadeOutBLTiles() {}
  218. virtual ~FadeOutBLTiles() {}
  219. private:
  220. CC_DISALLOW_COPY_AND_ASSIGN(FadeOutBLTiles);
  221. };
  222. /**
  223. @brief FadeOutUpTiles action.
  224. @details Fades out the target node with many tiles from bottom to top.
  225. */
  226. class CC_DLL FadeOutUpTiles : public FadeOutTRTiles
  227. {
  228. public:
  229. /**
  230. * @brief Create the action with the grid size and the duration.
  231. * @param duration Specify the duration of the FadeOutUpTiles action. It's a value in seconds.
  232. * @param gridSize Specify the size of the grid.
  233. * @return If the creation success, return a pointer of FadeOutUpTiles action; otherwise, return nil.
  234. */
  235. static FadeOutUpTiles* create(float duration, const Size& gridSize);
  236. virtual void transformTile(const Vec2& pos, float distance) override;
  237. // Overrides
  238. virtual FadeOutUpTiles* clone() const override;
  239. virtual float testFunc(const Size& pos, float time) override;
  240. CC_CONSTRUCTOR_ACCESS:
  241. FadeOutUpTiles() {}
  242. virtual ~FadeOutUpTiles() {}
  243. private:
  244. CC_DISALLOW_COPY_AND_ASSIGN(FadeOutUpTiles);
  245. };
  246. /**
  247. @brief FadeOutDownTiles action.
  248. @details Fades out the target node with many tiles from top to bottom.
  249. */
  250. class CC_DLL FadeOutDownTiles : public FadeOutUpTiles
  251. {
  252. public:
  253. /**
  254. * @brief Create the action with the grid size and the duration.
  255. * @param duration Specify the duration of the FadeOutDownTiles action. It's a value in seconds.
  256. * @param gridSize Specify the size of the grid.
  257. * @return If the creation success, return a pointer of FadeOutDownTiles action; otherwise, return nil.
  258. */
  259. static FadeOutDownTiles* create(float duration, const Size& gridSize);
  260. // Overrides
  261. virtual FadeOutDownTiles* clone() const override;
  262. virtual float testFunc(const Size& pos, float time) override;
  263. CC_CONSTRUCTOR_ACCESS:
  264. FadeOutDownTiles() {}
  265. virtual ~FadeOutDownTiles() {}
  266. private:
  267. CC_DISALLOW_COPY_AND_ASSIGN(FadeOutDownTiles);
  268. };
  269. /**
  270. @brief TurnOffTiles action.
  271. @details Turn off the target node with many tiles in random order.
  272. */
  273. class CC_DLL TurnOffTiles : public TiledGrid3DAction
  274. {
  275. public:
  276. /**
  277. * @brief Create the action with the grid size and the duration.
  278. * @param duration Specify the duration of the TurnOffTiles action. It's a value in seconds.
  279. * @param gridSize Specify the size of the grid.
  280. * @return If the creation success, return a pointer of TurnOffTiles action; otherwise, return nil.
  281. */
  282. static TurnOffTiles* create(float duration, const Size& gridSize);
  283. /**
  284. * @brief Create the action with the grid size and the duration.
  285. * @param duration Specify the duration of the TurnOffTiles action. It's a value in seconds.
  286. * @param gridSize Specify the size of the grid.
  287. * @param seed Specify the random seed.
  288. * @return If the creation success, return a pointer of TurnOffTiles action; otherwise, return nil.
  289. */
  290. static TurnOffTiles* create(float duration, const Size& gridSize, unsigned int seed);
  291. /**
  292. @brief Shuffle the array specified.
  293. @param array The array will be shuffled.
  294. @param len The size of the array.
  295. */
  296. void shuffle(unsigned int *array, unsigned int len);
  297. /**
  298. @brief Show the tile at specified position.
  299. @param pos The position index of the tile should be shown.
  300. */
  301. void turnOnTile(const Vec2& pos);
  302. /**
  303. @brief Hide the tile at specified position.
  304. @param pos The position index of the tile should be hide.
  305. */
  306. void turnOffTile(const Vec2& pos);
  307. // Overrides
  308. virtual TurnOffTiles* clone() const override;
  309. virtual void startWithTarget(Node *target) override;
  310. virtual void update(float time) override;
  311. CC_CONSTRUCTOR_ACCESS:
  312. TurnOffTiles() {}
  313. virtual ~TurnOffTiles();
  314. /**
  315. * @brief Initializes the action with grid size, random seed and duration.
  316. * @param duration Specify the duration of the TurnOffTiles action. It's a value in seconds.
  317. * @param gridSize Specify the size of the grid.
  318. * @param seed Specify the random seed.
  319. * @return If the Initialization success, return true; otherwise, return false.
  320. */
  321. bool initWithDuration(float duration, const Size& gridSize, unsigned int seed);
  322. protected:
  323. unsigned int _seed;
  324. unsigned int _tilesCount;
  325. unsigned int* _tilesOrder;
  326. private:
  327. CC_DISALLOW_COPY_AND_ASSIGN(TurnOffTiles);
  328. };
  329. /**
  330. @brief WavesTiles3D action.
  331. @details This action wave the target node with many tiles.
  332. */
  333. class CC_DLL WavesTiles3D : public TiledGrid3DAction
  334. {
  335. public:
  336. /**
  337. * @brief Create the action with a number of waves, the waves amplitude, the grid size and the duration.
  338. * @param duration Specify the duration of the WavesTiles3D action. It's a value in seconds.
  339. * @param gridSize Specify the size of the grid.
  340. * @param waves Specify the waves count of the WavesTiles3D action.
  341. * @param amplitude Specify the amplitude of the WavesTiles3D action.
  342. * @return If the creation success, return a pointer of WavesTiles3D action; otherwise, return nil.
  343. */
  344. static WavesTiles3D* create(float duration, const Size& gridSize, unsigned int waves, float amplitude);
  345. /**
  346. @brief Get the amplitude of the effect.
  347. @return Return the amplitude of the effect.
  348. */
  349. float getAmplitude() const { return _amplitude; }
  350. /**
  351. @brief Set the amplitude to the effect.
  352. @param amplitude The value of amplitude will be set.
  353. */
  354. void setAmplitude(float amplitude) { _amplitude = amplitude; }
  355. /**
  356. @brief Get the amplitude rate of the effect.
  357. @return Return the amplitude rate of the effect.
  358. */
  359. float getAmplitudeRate() const { return _amplitudeRate; }
  360. /**
  361. @brief Set the amplitude rate of the effect.
  362. @param amplitudeRate The value of amplitude rate will be set.
  363. */
  364. void setAmplitudeRate(float amplitudeRate) { _amplitudeRate = amplitudeRate; }
  365. // Override
  366. virtual WavesTiles3D* clone() const override;
  367. virtual void update(float time) override;
  368. CC_CONSTRUCTOR_ACCESS:
  369. WavesTiles3D() {}
  370. virtual ~WavesTiles3D() {}
  371. /**
  372. @brief Initializes an action with duration, grid size, waves count and amplitude.
  373. @param duration Specify the duration of the WavesTiles3D action. It's a value in seconds.
  374. @param gridSize Specify the size of the grid.
  375. @param waves Specify the waves count of the WavesTiles3D action.
  376. @param amplitude Specify the amplitude of the WavesTiles3D action.
  377. @return If the initialization success, return true; otherwise, return false.
  378. */
  379. bool initWithDuration(float duration, const Size& gridSize, unsigned int waves, float amplitude);
  380. protected:
  381. unsigned int _waves;
  382. float _amplitude;
  383. float _amplitudeRate;
  384. private:
  385. CC_DISALLOW_COPY_AND_ASSIGN(WavesTiles3D);
  386. };
  387. /**
  388. @brief JumpTiles3D action.
  389. @details Move the tiles of a target node across the Z axis.
  390. */
  391. class CC_DLL JumpTiles3D : public TiledGrid3DAction
  392. {
  393. public:
  394. /**
  395. * @brief Create the action with the number of jumps, the sin amplitude, the grid size and the duration.
  396. * @param duration Specify the duration of the JumpTiles3D action. It's a value in seconds.
  397. * @param gridSize Specify the size of the grid.
  398. * @param numberOfJumps Specify the jump tiles count.
  399. * @param amplitude Specify the amplitude of the JumpTiles3D action.
  400. * @return If the creation success, return a pointer of JumpTiles3D action; otherwise, return nil.
  401. */
  402. static JumpTiles3D* create(float duration, const Size& gridSize, unsigned int numberOfJumps, float amplitude);
  403. /**
  404. @brief Get the amplitude of the effect.
  405. @return Return the amplitude of the effect.
  406. */
  407. float getAmplitude() const { return _amplitude; }
  408. /**
  409. @brief Set the amplitude to the effect.
  410. @param amplitude The value of amplitude will be set.
  411. */
  412. void setAmplitude(float amplitude) { _amplitude = amplitude; }
  413. /**
  414. @brief Get the amplitude rate of the effect.
  415. @return Return the amplitude rate of the effect.
  416. */
  417. float getAmplitudeRate() const { return _amplitudeRate; }
  418. /**
  419. @brief Set the amplitude rate of the effect.
  420. @param amplitudeRate The value of amplitude rate will be set.
  421. */
  422. void setAmplitudeRate(float amplitudeRate) { _amplitudeRate = amplitudeRate; }
  423. // Override
  424. virtual JumpTiles3D* clone() const override;
  425. virtual void update(float time) override;
  426. CC_CONSTRUCTOR_ACCESS:
  427. JumpTiles3D() {}
  428. virtual ~JumpTiles3D() {}
  429. /**
  430. * @brief Initializes the action with the number of jumps, the sin amplitude, the grid size and the duration.
  431. * @param duration Specify the duration of the JumpTiles3D action. It's a value in seconds.
  432. * @param gridSize Specify the size of the grid.
  433. * @param numberOfJumps Specify the jump tiles count.
  434. * @param amplitude Specify the amplitude of the JumpTiles3D action.
  435. * @return If the initialization success, return true; otherwise, return false.
  436. */
  437. bool initWithDuration(float duration, const Size& gridSize, unsigned int numberOfJumps, float amplitude);
  438. protected:
  439. unsigned int _jumps;
  440. float _amplitude;
  441. float _amplitudeRate;
  442. private:
  443. CC_DISALLOW_COPY_AND_ASSIGN(JumpTiles3D);
  444. };
  445. /**
  446. @brief SplitRows action.
  447. @details Split the target node in many rows.
  448. Then move out some rows from left, move out the other rows from right.
  449. */
  450. class CC_DLL SplitRows : public TiledGrid3DAction
  451. {
  452. public :
  453. /**
  454. * @brief Create the action with the number of rows and the duration.
  455. * @param duration Specify the duration of the SplitRows action. It's a value in seconds.
  456. * @param rows Specify the rows count should be split.
  457. * @return If the creation success, return a pointer of SplitRows action; otherwise, return nil.
  458. */
  459. static SplitRows* create(float duration, unsigned int rows);
  460. // Overrides
  461. virtual SplitRows* clone() const override;
  462. virtual void update(float time) override;
  463. virtual void startWithTarget(Node *target) override;
  464. CC_CONSTRUCTOR_ACCESS:
  465. SplitRows() {}
  466. virtual ~SplitRows() {}
  467. /**
  468. * @brief Initializes the action with the number rows and the duration.
  469. * @param duration Specify the duration of the SplitRows action. It's a value in seconds.
  470. * @param rows Specify the rows count should be split.
  471. * @return If the creation success, return true; otherwise, return false.
  472. */
  473. bool initWithDuration(float duration, unsigned int rows);
  474. protected:
  475. unsigned int _rows;
  476. Size _winSize;
  477. private:
  478. CC_DISALLOW_COPY_AND_ASSIGN(SplitRows);
  479. };
  480. /**
  481. @brief SplitCols action.
  482. @details Split the target node in many columns.
  483. Then move out some columns from top, move out the other columns from bottom.
  484. */
  485. class CC_DLL SplitCols : public TiledGrid3DAction
  486. {
  487. public:
  488. /**
  489. * @brief Create the action with the number of columns and the duration.
  490. * @param duration Specify the duration of the SplitCols action. It's a value in seconds.
  491. * @param cols Specify the columns count should be split.
  492. * @return If the creation success, return a pointer of SplitCols action; otherwise, return nil.
  493. */
  494. static SplitCols* create(float duration, unsigned int cols);
  495. // Overrides
  496. virtual SplitCols* clone() const override;
  497. /**
  498. * @param time in seconds
  499. */
  500. virtual void update(float time) override;
  501. virtual void startWithTarget(Node *target) override;
  502. CC_CONSTRUCTOR_ACCESS:
  503. SplitCols() {}
  504. virtual ~SplitCols() {}
  505. /**
  506. * @brief Initializes the action with the number columns and the duration.
  507. * @param duration Specify the duration of the SplitCols action. It's a value in seconds.
  508. * @param cols Specify the columns count should be split.
  509. * @return If the creation success, return true; otherwise, return false.
  510. */
  511. bool initWithDuration(float duration, unsigned int cols);
  512. protected:
  513. unsigned int _cols;
  514. Size _winSize;
  515. private:
  516. CC_DISALLOW_COPY_AND_ASSIGN(SplitCols);
  517. };
  518. // end of actions group
  519. /// @}
  520. NS_CC_END
  521. #endif // __ACTION_CCTILEDGRID_ACTION_H__