react-native-games 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/LICENSE +66 -0
  2. package/README.md +269 -0
  3. package/lib/module/games/balloon-blaster/BalloonBlaster.js +391 -0
  4. package/lib/module/games/balloon-blaster/BalloonBlaster.js.map +1 -0
  5. package/lib/module/games/balloon-blaster/BalloonBlasterService.js +293 -0
  6. package/lib/module/games/balloon-blaster/BalloonBlasterService.js.map +1 -0
  7. package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +156 -0
  8. package/lib/module/games/balloon-blaster/BalloonBlasterStore.js.map +1 -0
  9. package/lib/module/games/balloon-blaster/components/BalloonComponent.js +227 -0
  10. package/lib/module/games/balloon-blaster/components/BalloonComponent.js.map +1 -0
  11. package/lib/module/games/balloon-blaster/components/GameArea.js +42 -0
  12. package/lib/module/games/balloon-blaster/components/GameArea.js.map +1 -0
  13. package/lib/module/games/balloon-blaster/components/GameBackground.js +544 -0
  14. package/lib/module/games/balloon-blaster/components/GameBackground.js.map +1 -0
  15. package/lib/module/games/balloon-blaster/components/GameControls.js +229 -0
  16. package/lib/module/games/balloon-blaster/components/GameControls.js.map +1 -0
  17. package/lib/module/games/balloon-blaster/components/GameOverModal.js +133 -0
  18. package/lib/module/games/balloon-blaster/components/GameOverModal.js.map +1 -0
  19. package/lib/module/games/balloon-blaster/components/ParticleSystem.js +52 -0
  20. package/lib/module/games/balloon-blaster/components/ParticleSystem.js.map +1 -0
  21. package/lib/module/games/balloon-blaster/components/ScoreBoard.js +119 -0
  22. package/lib/module/games/balloon-blaster/components/ScoreBoard.js.map +1 -0
  23. package/lib/module/games/balloon-blaster/components/SliceTrail.js +58 -0
  24. package/lib/module/games/balloon-blaster/components/SliceTrail.js.map +1 -0
  25. package/lib/module/games/balloon-blaster/components/index.js +11 -0
  26. package/lib/module/games/balloon-blaster/components/index.js.map +1 -0
  27. package/lib/module/games/cat-popper/CatPopper.js +230 -0
  28. package/lib/module/games/cat-popper/CatPopper.js.map +1 -0
  29. package/lib/module/games/cat-popper/CatPopperService.js +100 -0
  30. package/lib/module/games/cat-popper/CatPopperService.js.map +1 -0
  31. package/lib/module/games/cat-popper/CatPopperStore.js +113 -0
  32. package/lib/module/games/cat-popper/CatPopperStore.js.map +1 -0
  33. package/lib/module/games/cat-popper/components/CatCharacter.js +281 -0
  34. package/lib/module/games/cat-popper/components/CatCharacter.js.map +1 -0
  35. package/lib/module/games/cat-popper/components/GameBackground.js +531 -0
  36. package/lib/module/games/cat-popper/components/GameBackground.js.map +1 -0
  37. package/lib/module/games/cat-popper/components/GameControls.js +230 -0
  38. package/lib/module/games/cat-popper/components/GameControls.js.map +1 -0
  39. package/lib/module/games/cat-popper/components/GameGrid.js +66 -0
  40. package/lib/module/games/cat-popper/components/GameGrid.js.map +1 -0
  41. package/lib/module/games/cat-popper/components/GameHole.js +183 -0
  42. package/lib/module/games/cat-popper/components/GameHole.js.map +1 -0
  43. package/lib/module/games/cat-popper/components/GameOverModal.js +131 -0
  44. package/lib/module/games/cat-popper/components/GameOverModal.js.map +1 -0
  45. package/lib/module/games/cat-popper/components/ScoreBoard.js +77 -0
  46. package/lib/module/games/cat-popper/components/ScoreBoard.js.map +1 -0
  47. package/lib/module/games/cat-popper/components/index.js +10 -0
  48. package/lib/module/games/cat-popper/components/index.js.map +1 -0
  49. package/lib/module/games/fruit-slicer/FruitSlicer.js +411 -0
  50. package/lib/module/games/fruit-slicer/FruitSlicer.js.map +1 -0
  51. package/lib/module/games/fruit-slicer/FruitSlicerService.js +293 -0
  52. package/lib/module/games/fruit-slicer/FruitSlicerService.js.map +1 -0
  53. package/lib/module/games/fruit-slicer/FruitSlicerStore.js +156 -0
  54. package/lib/module/games/fruit-slicer/FruitSlicerStore.js.map +1 -0
  55. package/lib/module/games/fruit-slicer/components/FruitComponent.js +99 -0
  56. package/lib/module/games/fruit-slicer/components/FruitComponent.js.map +1 -0
  57. package/lib/module/games/fruit-slicer/components/GameArea.js +50 -0
  58. package/lib/module/games/fruit-slicer/components/GameArea.js.map +1 -0
  59. package/lib/module/games/fruit-slicer/components/GameBackground.js +1296 -0
  60. package/lib/module/games/fruit-slicer/components/GameBackground.js.map +1 -0
  61. package/lib/module/games/fruit-slicer/components/GameControls.js +230 -0
  62. package/lib/module/games/fruit-slicer/components/GameControls.js.map +1 -0
  63. package/lib/module/games/fruit-slicer/components/GameOverModal.js +189 -0
  64. package/lib/module/games/fruit-slicer/components/GameOverModal.js.map +1 -0
  65. package/lib/module/games/fruit-slicer/components/ParticleSystem.js +52 -0
  66. package/lib/module/games/fruit-slicer/components/ParticleSystem.js.map +1 -0
  67. package/lib/module/games/fruit-slicer/components/ScoreBoard.js +121 -0
  68. package/lib/module/games/fruit-slicer/components/ScoreBoard.js.map +1 -0
  69. package/lib/module/games/fruit-slicer/components/SliceTrail.js +58 -0
  70. package/lib/module/games/fruit-slicer/components/SliceTrail.js.map +1 -0
  71. package/lib/module/games/fruit-slicer/components/index.js +11 -0
  72. package/lib/module/games/fruit-slicer/components/index.js.map +1 -0
  73. package/lib/module/games/maze-runner/MazeRunner.js +242 -0
  74. package/lib/module/games/maze-runner/MazeRunner.js.map +1 -0
  75. package/lib/module/games/maze-runner/MazeRunnerService.js +560 -0
  76. package/lib/module/games/maze-runner/MazeRunnerService.js.map +1 -0
  77. package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +149 -0
  78. package/lib/module/games/maze-runner/components/EnhancedBallComponent.js.map +1 -0
  79. package/lib/module/games/maze-runner/components/EnhancedGameArea.js +357 -0
  80. package/lib/module/games/maze-runner/components/EnhancedGameArea.js.map +1 -0
  81. package/lib/module/games/maze-runner/components/GameBackground.js +216 -0
  82. package/lib/module/games/maze-runner/components/GameBackground.js.map +1 -0
  83. package/lib/module/games/maze-runner/components/GameControls.js +129 -0
  84. package/lib/module/games/maze-runner/components/GameControls.js.map +1 -0
  85. package/lib/module/games/maze-runner/components/GameOverModal.js +134 -0
  86. package/lib/module/games/maze-runner/components/GameOverModal.js.map +1 -0
  87. package/lib/module/games/maze-runner/components/ScoreBoard.js +81 -0
  88. package/lib/module/games/maze-runner/components/ScoreBoard.js.map +1 -0
  89. package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +209 -0
  90. package/lib/module/games/maze-runner/components/SkiaPipeComponent.js.map +1 -0
  91. package/lib/module/games/maze-runner/components/StaticGameBackground.js +169 -0
  92. package/lib/module/games/maze-runner/components/StaticGameBackground.js.map +1 -0
  93. package/lib/module/games/maze-runner/components/WallComponent.js +90 -0
  94. package/lib/module/games/maze-runner/components/WallComponent.js.map +1 -0
  95. package/lib/module/games/maze-runner/components/index.js +10 -0
  96. package/lib/module/games/maze-runner/components/index.js.map +1 -0
  97. package/lib/module/games/space-traveller/SpaceTraveller.js +393 -0
  98. package/lib/module/games/space-traveller/SpaceTraveller.js.map +1 -0
  99. package/lib/module/games/space-traveller/SpaceTravellerService.js +298 -0
  100. package/lib/module/games/space-traveller/SpaceTravellerService.js.map +1 -0
  101. package/lib/module/games/space-traveller/SpaceTravellerStore.js +139 -0
  102. package/lib/module/games/space-traveller/SpaceTravellerStore.js.map +1 -0
  103. package/lib/module/games/space-traveller/components/AsteroidComponent.js +111 -0
  104. package/lib/module/games/space-traveller/components/AsteroidComponent.js.map +1 -0
  105. package/lib/module/games/space-traveller/components/GameArea.js +75 -0
  106. package/lib/module/games/space-traveller/components/GameArea.js.map +1 -0
  107. package/lib/module/games/space-traveller/components/GameBackground.js +294 -0
  108. package/lib/module/games/space-traveller/components/GameBackground.js.map +1 -0
  109. package/lib/module/games/space-traveller/components/GameControls.js +177 -0
  110. package/lib/module/games/space-traveller/components/GameControls.js.map +1 -0
  111. package/lib/module/games/space-traveller/components/GameOverModal.js +182 -0
  112. package/lib/module/games/space-traveller/components/GameOverModal.js.map +1 -0
  113. package/lib/module/games/space-traveller/components/ParticleComponent.js +34 -0
  114. package/lib/module/games/space-traveller/components/ParticleComponent.js.map +1 -0
  115. package/lib/module/games/space-traveller/components/ScoreBoard.js +143 -0
  116. package/lib/module/games/space-traveller/components/ScoreBoard.js.map +1 -0
  117. package/lib/module/games/space-traveller/components/SettingsModal.js +222 -0
  118. package/lib/module/games/space-traveller/components/SettingsModal.js.map +1 -0
  119. package/lib/module/games/space-traveller/components/Spacecraft3D.js +362 -0
  120. package/lib/module/games/space-traveller/components/Spacecraft3D.js.map +1 -0
  121. package/lib/module/games/space-traveller/components/SpacecraftPath.js +37 -0
  122. package/lib/module/games/space-traveller/components/SpacecraftPath.js.map +1 -0
  123. package/lib/module/games/space-traveller/components/index.js +13 -0
  124. package/lib/module/games/space-traveller/components/index.js.map +1 -0
  125. package/lib/module/index.js +12 -0
  126. package/lib/module/index.js.map +1 -0
  127. package/lib/module/package.json +1 -0
  128. package/lib/module/services/GamesConstants.js +561 -0
  129. package/lib/module/services/GamesConstants.js.map +1 -0
  130. package/lib/module/services/GamesService.js +34 -0
  131. package/lib/module/services/GamesService.js.map +1 -0
  132. package/lib/module/shared/settings/GameSettings.js +295 -0
  133. package/lib/module/shared/settings/GameSettings.js.map +1 -0
  134. package/lib/module/shared/settings/SettingsService.js +119 -0
  135. package/lib/module/shared/settings/SettingsService.js.map +1 -0
  136. package/lib/typescript/package.json +1 -0
  137. package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts +16 -0
  138. package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts.map +1 -0
  139. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts +66 -0
  140. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts.map +1 -0
  141. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts +37 -0
  142. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts.map +1 -0
  143. package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts +10 -0
  144. package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts.map +1 -0
  145. package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts +17 -0
  146. package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts.map +1 -0
  147. package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts +7 -0
  148. package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts.map +1 -0
  149. package/lib/typescript/src/games/balloon-blaster/components/GameControls.d.ts +10 -0
  150. package/lib/typescript/src/games/balloon-blaster/components/GameControls.d.ts.map +1 -0
  151. package/lib/typescript/src/games/balloon-blaster/components/GameOverModal.d.ts +9 -0
  152. package/lib/typescript/src/games/balloon-blaster/components/GameOverModal.d.ts.map +1 -0
  153. package/lib/typescript/src/games/balloon-blaster/components/ParticleSystem.d.ts +8 -0
  154. package/lib/typescript/src/games/balloon-blaster/components/ParticleSystem.d.ts.map +1 -0
  155. package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +9 -0
  156. package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts.map +1 -0
  157. package/lib/typescript/src/games/balloon-blaster/components/SliceTrail.d.ts +11 -0
  158. package/lib/typescript/src/games/balloon-blaster/components/SliceTrail.d.ts.map +1 -0
  159. package/lib/typescript/src/games/balloon-blaster/components/index.d.ts +9 -0
  160. package/lib/typescript/src/games/balloon-blaster/components/index.d.ts.map +1 -0
  161. package/lib/typescript/src/games/cat-popper/CatPopper.d.ts +13 -0
  162. package/lib/typescript/src/games/cat-popper/CatPopper.d.ts.map +1 -0
  163. package/lib/typescript/src/games/cat-popper/CatPopperService.d.ts +32 -0
  164. package/lib/typescript/src/games/cat-popper/CatPopperService.d.ts.map +1 -0
  165. package/lib/typescript/src/games/cat-popper/CatPopperStore.d.ts +21 -0
  166. package/lib/typescript/src/games/cat-popper/CatPopperStore.d.ts.map +1 -0
  167. package/lib/typescript/src/games/cat-popper/components/CatCharacter.d.ts +7 -0
  168. package/lib/typescript/src/games/cat-popper/components/CatCharacter.d.ts.map +1 -0
  169. package/lib/typescript/src/games/cat-popper/components/GameBackground.d.ts +7 -0
  170. package/lib/typescript/src/games/cat-popper/components/GameBackground.d.ts.map +1 -0
  171. package/lib/typescript/src/games/cat-popper/components/GameControls.d.ts +10 -0
  172. package/lib/typescript/src/games/cat-popper/components/GameControls.d.ts.map +1 -0
  173. package/lib/typescript/src/games/cat-popper/components/GameGrid.d.ts +13 -0
  174. package/lib/typescript/src/games/cat-popper/components/GameGrid.d.ts.map +1 -0
  175. package/lib/typescript/src/games/cat-popper/components/GameHole.d.ts +12 -0
  176. package/lib/typescript/src/games/cat-popper/components/GameHole.d.ts.map +1 -0
  177. package/lib/typescript/src/games/cat-popper/components/GameOverModal.d.ts +9 -0
  178. package/lib/typescript/src/games/cat-popper/components/GameOverModal.d.ts.map +1 -0
  179. package/lib/typescript/src/games/cat-popper/components/ScoreBoard.d.ts +8 -0
  180. package/lib/typescript/src/games/cat-popper/components/ScoreBoard.d.ts.map +1 -0
  181. package/lib/typescript/src/games/cat-popper/components/index.d.ts +8 -0
  182. package/lib/typescript/src/games/cat-popper/components/index.d.ts.map +1 -0
  183. package/lib/typescript/src/games/fruit-slicer/FruitSlicer.d.ts +16 -0
  184. package/lib/typescript/src/games/fruit-slicer/FruitSlicer.d.ts.map +1 -0
  185. package/lib/typescript/src/games/fruit-slicer/FruitSlicerService.d.ts +67 -0
  186. package/lib/typescript/src/games/fruit-slicer/FruitSlicerService.d.ts.map +1 -0
  187. package/lib/typescript/src/games/fruit-slicer/FruitSlicerStore.d.ts +37 -0
  188. package/lib/typescript/src/games/fruit-slicer/FruitSlicerStore.d.ts.map +1 -0
  189. package/lib/typescript/src/games/fruit-slicer/components/FruitComponent.d.ts +10 -0
  190. package/lib/typescript/src/games/fruit-slicer/components/FruitComponent.d.ts.map +1 -0
  191. package/lib/typescript/src/games/fruit-slicer/components/GameArea.d.ts +17 -0
  192. package/lib/typescript/src/games/fruit-slicer/components/GameArea.d.ts.map +1 -0
  193. package/lib/typescript/src/games/fruit-slicer/components/GameBackground.d.ts +7 -0
  194. package/lib/typescript/src/games/fruit-slicer/components/GameBackground.d.ts.map +1 -0
  195. package/lib/typescript/src/games/fruit-slicer/components/GameControls.d.ts +10 -0
  196. package/lib/typescript/src/games/fruit-slicer/components/GameControls.d.ts.map +1 -0
  197. package/lib/typescript/src/games/fruit-slicer/components/GameOverModal.d.ts +9 -0
  198. package/lib/typescript/src/games/fruit-slicer/components/GameOverModal.d.ts.map +1 -0
  199. package/lib/typescript/src/games/fruit-slicer/components/ParticleSystem.d.ts +8 -0
  200. package/lib/typescript/src/games/fruit-slicer/components/ParticleSystem.d.ts.map +1 -0
  201. package/lib/typescript/src/games/fruit-slicer/components/ScoreBoard.d.ts +9 -0
  202. package/lib/typescript/src/games/fruit-slicer/components/ScoreBoard.d.ts.map +1 -0
  203. package/lib/typescript/src/games/fruit-slicer/components/SliceTrail.d.ts +11 -0
  204. package/lib/typescript/src/games/fruit-slicer/components/SliceTrail.d.ts.map +1 -0
  205. package/lib/typescript/src/games/fruit-slicer/components/index.d.ts +9 -0
  206. package/lib/typescript/src/games/fruit-slicer/components/index.d.ts.map +1 -0
  207. package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts +18 -0
  208. package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts.map +1 -0
  209. package/lib/typescript/src/games/maze-runner/MazeRunnerService.d.ts +82 -0
  210. package/lib/typescript/src/games/maze-runner/MazeRunnerService.d.ts.map +1 -0
  211. package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts +11 -0
  212. package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts.map +1 -0
  213. package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts +12 -0
  214. package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts.map +1 -0
  215. package/lib/typescript/src/games/maze-runner/components/GameBackground.d.ts +7 -0
  216. package/lib/typescript/src/games/maze-runner/components/GameBackground.d.ts.map +1 -0
  217. package/lib/typescript/src/games/maze-runner/components/GameControls.d.ts +10 -0
  218. package/lib/typescript/src/games/maze-runner/components/GameControls.d.ts.map +1 -0
  219. package/lib/typescript/src/games/maze-runner/components/GameOverModal.d.ts +11 -0
  220. package/lib/typescript/src/games/maze-runner/components/GameOverModal.d.ts.map +1 -0
  221. package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts +8 -0
  222. package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts.map +1 -0
  223. package/lib/typescript/src/games/maze-runner/components/SkiaPipeComponent.d.ts +25 -0
  224. package/lib/typescript/src/games/maze-runner/components/SkiaPipeComponent.d.ts.map +1 -0
  225. package/lib/typescript/src/games/maze-runner/components/StaticGameBackground.d.ts +7 -0
  226. package/lib/typescript/src/games/maze-runner/components/StaticGameBackground.d.ts.map +1 -0
  227. package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts +10 -0
  228. package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts.map +1 -0
  229. package/lib/typescript/src/games/maze-runner/components/index.d.ts +8 -0
  230. package/lib/typescript/src/games/maze-runner/components/index.d.ts.map +1 -0
  231. package/lib/typescript/src/games/space-traveller/SpaceTraveller.d.ts +17 -0
  232. package/lib/typescript/src/games/space-traveller/SpaceTraveller.d.ts.map +1 -0
  233. package/lib/typescript/src/games/space-traveller/SpaceTravellerService.d.ts +65 -0
  234. package/lib/typescript/src/games/space-traveller/SpaceTravellerService.d.ts.map +1 -0
  235. package/lib/typescript/src/games/space-traveller/SpaceTravellerStore.d.ts +35 -0
  236. package/lib/typescript/src/games/space-traveller/SpaceTravellerStore.d.ts.map +1 -0
  237. package/lib/typescript/src/games/space-traveller/components/AsteroidComponent.d.ts +9 -0
  238. package/lib/typescript/src/games/space-traveller/components/AsteroidComponent.d.ts.map +1 -0
  239. package/lib/typescript/src/games/space-traveller/components/GameArea.d.ts +17 -0
  240. package/lib/typescript/src/games/space-traveller/components/GameArea.d.ts.map +1 -0
  241. package/lib/typescript/src/games/space-traveller/components/GameBackground.d.ts +7 -0
  242. package/lib/typescript/src/games/space-traveller/components/GameBackground.d.ts.map +1 -0
  243. package/lib/typescript/src/games/space-traveller/components/GameControls.d.ts +10 -0
  244. package/lib/typescript/src/games/space-traveller/components/GameControls.d.ts.map +1 -0
  245. package/lib/typescript/src/games/space-traveller/components/GameOverModal.d.ts +9 -0
  246. package/lib/typescript/src/games/space-traveller/components/GameOverModal.d.ts.map +1 -0
  247. package/lib/typescript/src/games/space-traveller/components/ParticleComponent.d.ts +8 -0
  248. package/lib/typescript/src/games/space-traveller/components/ParticleComponent.d.ts.map +1 -0
  249. package/lib/typescript/src/games/space-traveller/components/ScoreBoard.d.ts +8 -0
  250. package/lib/typescript/src/games/space-traveller/components/ScoreBoard.d.ts.map +1 -0
  251. package/lib/typescript/src/games/space-traveller/components/SettingsModal.d.ts +9 -0
  252. package/lib/typescript/src/games/space-traveller/components/SettingsModal.d.ts.map +1 -0
  253. package/lib/typescript/src/games/space-traveller/components/Spacecraft3D.d.ts +9 -0
  254. package/lib/typescript/src/games/space-traveller/components/Spacecraft3D.d.ts.map +1 -0
  255. package/lib/typescript/src/games/space-traveller/components/SpacecraftPath.d.ts +10 -0
  256. package/lib/typescript/src/games/space-traveller/components/SpacecraftPath.d.ts.map +1 -0
  257. package/lib/typescript/src/games/space-traveller/components/index.d.ts +11 -0
  258. package/lib/typescript/src/games/space-traveller/components/index.d.ts.map +1 -0
  259. package/lib/typescript/src/index.d.ts +7 -0
  260. package/lib/typescript/src/index.d.ts.map +1 -0
  261. package/lib/typescript/src/services/GamesConstants.d.ts +372 -0
  262. package/lib/typescript/src/services/GamesConstants.d.ts.map +1 -0
  263. package/lib/typescript/src/services/GamesService.d.ts +8 -0
  264. package/lib/typescript/src/services/GamesService.d.ts.map +1 -0
  265. package/lib/typescript/src/shared/settings/GameSettings.d.ts +36 -0
  266. package/lib/typescript/src/shared/settings/GameSettings.d.ts.map +1 -0
  267. package/lib/typescript/src/shared/settings/SettingsService.d.ts +32 -0
  268. package/lib/typescript/src/shared/settings/SettingsService.d.ts.map +1 -0
  269. package/package.json +125 -0
@@ -0,0 +1,230 @@
1
+ "use strict";
2
+
3
+ import React, { useRef, useEffect } from 'react';
4
+ import { View, TouchableOpacity, Text, StyleSheet, Animated } from 'react-native';
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ export const GameControls = ({
7
+ isPlaying,
8
+ gameOver,
9
+ onStartGame,
10
+ onStopGame
11
+ }) => {
12
+ const scaleAnim = useRef(new Animated.Value(1)).current;
13
+ const pulseAnim = useRef(new Animated.Value(1)).current;
14
+ const glowAnim = useRef(new Animated.Value(0)).current;
15
+
16
+ // Pulse animation for start button
17
+ useEffect(() => {
18
+ if (!isPlaying && !gameOver) {
19
+ const pulseAnimation = Animated.loop(Animated.sequence([Animated.timing(pulseAnim, {
20
+ toValue: 1.05,
21
+ duration: 1000,
22
+ useNativeDriver: true
23
+ }), Animated.timing(pulseAnim, {
24
+ toValue: 1,
25
+ duration: 1000,
26
+ useNativeDriver: true
27
+ })]));
28
+ pulseAnimation.start();
29
+ return () => pulseAnimation.stop();
30
+ }
31
+ return () => {}; // Return empty cleanup function when condition is not met
32
+ }, [isPlaying, gameOver, pulseAnim]);
33
+
34
+ // Glow animation for stop button
35
+ useEffect(() => {
36
+ if (isPlaying) {
37
+ const glowAnimation = Animated.loop(Animated.sequence([Animated.timing(glowAnim, {
38
+ toValue: 1,
39
+ duration: 800,
40
+ useNativeDriver: false
41
+ }), Animated.timing(glowAnim, {
42
+ toValue: 0,
43
+ duration: 800,
44
+ useNativeDriver: false
45
+ })]));
46
+ glowAnimation.start();
47
+ return () => glowAnimation.stop();
48
+ }
49
+ return () => {}; // Return empty cleanup function when condition is not met
50
+ }, [isPlaying, glowAnim]);
51
+ const handlePressIn = () => {
52
+ Animated.spring(scaleAnim, {
53
+ toValue: 0.95,
54
+ useNativeDriver: true
55
+ }).start();
56
+ };
57
+ const handlePressOut = () => {
58
+ Animated.spring(scaleAnim, {
59
+ toValue: 1,
60
+ friction: 3,
61
+ tension: 40,
62
+ useNativeDriver: true
63
+ }).start();
64
+ };
65
+ const glowColor = glowAnim.interpolate({
66
+ inputRange: [0, 1],
67
+ outputRange: ['rgba(255, 87, 34, 0.3)', 'rgba(255, 87, 34, 0.8)']
68
+ });
69
+ return /*#__PURE__*/_jsxs(View, {
70
+ style: styles.gameControls,
71
+ children: [!isPlaying && !gameOver && /*#__PURE__*/_jsx(Animated.View, {
72
+ style: [{
73
+ transform: [{
74
+ scale: pulseAnim
75
+ }]
76
+ }],
77
+ children: /*#__PURE__*/_jsx(TouchableOpacity, {
78
+ style: [styles.startButton],
79
+ onPress: onStartGame,
80
+ onPressIn: handlePressIn,
81
+ onPressOut: handlePressOut,
82
+ activeOpacity: 0.8,
83
+ children: /*#__PURE__*/_jsxs(Animated.View, {
84
+ style: [styles.buttonContent, {
85
+ transform: [{
86
+ scale: scaleAnim
87
+ }]
88
+ }],
89
+ children: [/*#__PURE__*/_jsx(Text, {
90
+ style: styles.startButtonText,
91
+ children: "START GAME"
92
+ }), /*#__PURE__*/_jsx(Text, {
93
+ style: styles.buttonSubtext,
94
+ children: "Tap to begin!"
95
+ })]
96
+ })
97
+ })
98
+ }), isPlaying && /*#__PURE__*/_jsx(Animated.View, {
99
+ style: [styles.stopButtonContainer, {
100
+ shadowColor: glowColor
101
+ }],
102
+ children: /*#__PURE__*/_jsx(TouchableOpacity, {
103
+ style: [styles.stopButton],
104
+ onPress: onStopGame,
105
+ onPressIn: handlePressIn,
106
+ onPressOut: handlePressOut,
107
+ activeOpacity: 0.8,
108
+ children: /*#__PURE__*/_jsxs(Animated.View, {
109
+ style: [styles.buttonContent, {
110
+ transform: [{
111
+ scale: scaleAnim
112
+ }]
113
+ }],
114
+ children: [/*#__PURE__*/_jsx(Text, {
115
+ style: styles.stopButtonText,
116
+ children: "STOP GAME"
117
+ }), /*#__PURE__*/_jsx(Text, {
118
+ style: styles.buttonSubtext,
119
+ children: "End current game"
120
+ })]
121
+ })
122
+ })
123
+ })]
124
+ });
125
+ };
126
+ const styles = StyleSheet.create({
127
+ gameControls: {
128
+ height: 120,
129
+ justifyContent: 'center',
130
+ alignItems: 'center',
131
+ paddingVertical: 20,
132
+ paddingHorizontal: 20
133
+ },
134
+ startButton: {
135
+ backgroundColor: '#10b981',
136
+ // Emerald green
137
+ paddingHorizontal: 32,
138
+ paddingVertical: 20,
139
+ borderRadius: 30,
140
+ shadowColor: '#10b981',
141
+ shadowOffset: {
142
+ width: 0,
143
+ height: 8
144
+ },
145
+ shadowOpacity: 0.4,
146
+ shadowRadius: 12,
147
+ elevation: 8,
148
+ justifyContent: 'center',
149
+ alignItems: 'center',
150
+ minHeight: 70,
151
+ minWidth: 200,
152
+ borderWidth: 3,
153
+ borderColor: '#34d399',
154
+ // Light green border
155
+ position: 'relative',
156
+ overflow: 'hidden'
157
+ },
158
+ stopButton: {
159
+ backgroundColor: '#dc2626',
160
+ // Red
161
+ paddingHorizontal: 32,
162
+ paddingVertical: 20,
163
+ borderRadius: 30,
164
+ shadowColor: '#dc2626',
165
+ shadowOffset: {
166
+ width: 0,
167
+ height: 8
168
+ },
169
+ shadowOpacity: 0.4,
170
+ shadowRadius: 12,
171
+ elevation: 8,
172
+ justifyContent: 'center',
173
+ alignItems: 'center',
174
+ minHeight: 70,
175
+ minWidth: 200,
176
+ borderWidth: 3,
177
+ borderColor: '#f87171',
178
+ // Light red border
179
+ position: 'relative',
180
+ overflow: 'hidden'
181
+ },
182
+ stopButtonContainer: {
183
+ shadowOffset: {
184
+ width: 0,
185
+ height: 0
186
+ },
187
+ shadowOpacity: 0.6,
188
+ shadowRadius: 20,
189
+ elevation: 10
190
+ },
191
+ buttonContent: {
192
+ alignItems: 'center',
193
+ justifyContent: 'center'
194
+ },
195
+ startButtonText: {
196
+ fontSize: 20,
197
+ fontWeight: '800',
198
+ color: '#ffffff',
199
+ textAlign: 'center',
200
+ textShadowColor: 'rgba(0, 0, 0, 0.3)',
201
+ textShadowOffset: {
202
+ width: 1,
203
+ height: 1
204
+ },
205
+ textShadowRadius: 2,
206
+ letterSpacing: 1
207
+ },
208
+ stopButtonText: {
209
+ fontSize: 20,
210
+ fontWeight: '800',
211
+ color: '#ffffff',
212
+ textAlign: 'center',
213
+ textShadowColor: 'rgba(0, 0, 0, 0.3)',
214
+ textShadowOffset: {
215
+ width: 1,
216
+ height: 1
217
+ },
218
+ textShadowRadius: 2,
219
+ letterSpacing: 1
220
+ },
221
+ buttonSubtext: {
222
+ fontSize: 12,
223
+ fontWeight: '600',
224
+ color: 'rgba(255, 255, 255, 0.8)',
225
+ textAlign: 'center',
226
+ marginTop: 4,
227
+ letterSpacing: 0.5
228
+ }
229
+ });
230
+ //# sourceMappingURL=GameControls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useRef","useEffect","View","TouchableOpacity","Text","StyleSheet","Animated","jsx","_jsx","jsxs","_jsxs","GameControls","isPlaying","gameOver","onStartGame","onStopGame","scaleAnim","Value","current","pulseAnim","glowAnim","pulseAnimation","loop","sequence","timing","toValue","duration","useNativeDriver","start","stop","glowAnimation","handlePressIn","spring","handlePressOut","friction","tension","glowColor","interpolate","inputRange","outputRange","style","styles","gameControls","children","transform","scale","startButton","onPress","onPressIn","onPressOut","activeOpacity","buttonContent","startButtonText","buttonSubtext","stopButtonContainer","shadowColor","stopButton","stopButtonText","create","height","justifyContent","alignItems","paddingVertical","paddingHorizontal","backgroundColor","borderRadius","shadowOffset","width","shadowOpacity","shadowRadius","elevation","minHeight","minWidth","borderWidth","borderColor","position","overflow","fontSize","fontWeight","color","textAlign","textShadowColor","textShadowOffset","textShadowRadius","letterSpacing","marginTop"],"sourceRoot":"../../../../../src","sources":["games/cat-popper/components/GameControls.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,SAAS,QAAQ,OAAO;AAChD,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,I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wB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,KAAK,EAAE,0BAA0B;IACjCC,SAAS,EAAE,QAAQ;IACnBK,SAAS,EAAE,CAAC;IACZD,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { View, StyleSheet } from 'react-native';
5
+ import { GAME_CONFIG } from "../CatPopperService.js";
6
+ import { GameHole } from "./GameHole.js";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ export const GameGrid = ({
9
+ holes,
10
+ catAnimations,
11
+ hitAnimations,
12
+ onHolePress,
13
+ gridSize = 3
14
+ }) => {
15
+ const gridStyle = {
16
+ width: gridSize * (GAME_CONFIG.HOLE_SIZE + 8) // Account for gaps
17
+ };
18
+ const containerPadding = gridSize === 4 ? 'px-2 py-3' : 'py-5';
19
+ const gridGap = gridSize === 4 ? 'gap-1' : 'gap-2';
20
+ return /*#__PURE__*/_jsx(View, {
21
+ style: [styles.gameArea, containerPadding === 'px-2 py-3' ? styles.smallPadding : styles.largePadding],
22
+ children: /*#__PURE__*/_jsx(View, {
23
+ style: [styles.gameGrid, gridGap === 'gap-1' ? styles.smallGap : styles.largeGap, gridStyle],
24
+ children: holes.map((hole, index) => {
25
+ const catAnimation = catAnimations[index];
26
+ const hitAnimation = hitAnimations[index];
27
+ if (!catAnimation || !hitAnimation) {
28
+ return null;
29
+ }
30
+ return /*#__PURE__*/_jsx(GameHole, {
31
+ hole: hole,
32
+ catAnimation: catAnimation,
33
+ hitAnimation: hitAnimation,
34
+ onPress: onHolePress
35
+ }, hole.id);
36
+ })
37
+ })
38
+ });
39
+ };
40
+ const styles = StyleSheet.create({
41
+ gameArea: {
42
+ flex: 1,
43
+ justifyContent: 'center',
44
+ alignItems: 'center'
45
+ },
46
+ smallPadding: {
47
+ paddingHorizontal: 16,
48
+ paddingVertical: 20
49
+ },
50
+ largePadding: {
51
+ paddingVertical: 20
52
+ },
53
+ gameGrid: {
54
+ flexDirection: 'row',
55
+ flexWrap: 'wrap',
56
+ justifyContent: 'center',
57
+ alignItems: 'center'
58
+ },
59
+ smallGap: {
60
+ gap: 4
61
+ },
62
+ largeGap: {
63
+ gap: 8
64
+ }
65
+ });
66
+ //# sourceMappingURL=GameGrid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","StyleSheet","GAME_CONFIG","GameHole","jsx","_jsx","GameGrid","holes","catAnimations","hitAnimations","onHolePress","gridSize","gridStyle","width","HOLE_SIZE","containerPadding","gridGap","style","styles","gameArea","smallPadding","largePadding","children","gameGrid","smallGap","largeGap","map","hole","index","catAnimation","hitAnimation","onPress","id","create","flex","justifyContent","alignItems","paddingHorizontal","paddingVertical","flexDirection","flexWrap","gap"],"sourceRoot":"../../../../../src","sources":["games/cat-popper/components/GameGrid.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAG/C,SAASC,WAAW,QAAQ,wBAAqB;AACjD,SAASC,QAAQ,QAAQ,eAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAUtC,OAAO,MAAMC,QAAiC,GAAGA,CAAC;EAAEC,KAAK;EAAEC,aAAa;EAAEC,aAAa;EAAEC,WAAW;EAAEC,QAAQ,GAAG;AAAE,CAAC,KAAK;EACvH,MAAMC,SAAS,GAAG;IAChBC,KAAK,EAAEF,QAAQ,IAAIT,WAAW,CAACY,SAAS,GAAG,CAAC,CAAC,CAAC;EAChD,CAAC;EAED,MAAMC,gBAAgB,GAAGJ,QAAQ,KAAK,CAAC,GAAG,WAAW,GAAG,MAAM;EAC9D,MAAMK,OAAO,GAAGL,QAAQ,KAAK,CAAC,GAAG,OAAO,GAAG,OAAO;EAElD,oBACEN,IAAA,CAACL,IAAI;IAACiB,KAAK,EAAE,CAACC,MAAM,CAACC,QAAQ,EAAEJ,gBAAgB,KAAK,WAAW,GAA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C,CAAC","ignoreList":[]}
@@ -0,0 +1,183 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { View, TouchableOpacity, StyleSheet } from 'react-native';
5
+ import { useSharedValue, useAnimatedStyle, withSpring, withSequence, withTiming, interpolate, Extrapolation } from 'react-native-reanimated';
6
+ import Animated from 'react-native-reanimated';
7
+ import { Canvas as SkiaCanvas, Circle, Group } from '@shopify/react-native-skia';
8
+ import { GAME_CONFIG, COLORS } from "../CatPopperService.js";
9
+ import { CatCharacter } from "./CatCharacter.js";
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ export const GameHole = ({
12
+ hole,
13
+ catAnimation,
14
+ hitAnimation,
15
+ onPress
16
+ }) => {
17
+ // Enhanced animation values for whack effect
18
+ const whackScale = useSharedValue(1);
19
+ const whackRotation = useSharedValue(0);
20
+ const whackBounce = useSharedValue(0);
21
+ const catStyle = useAnimatedStyle(() => {
22
+ // Cat emerges from deep inside the hole
23
+ const translateY = interpolate(catAnimation.value, [0, 0.3, 1], [GAME_CONFIG.HOLE_SIZE * 0.3, GAME_CONFIG.HOLE_SIZE * 0.1, -GAME_CONFIG.HOLE_SIZE * 0.05], Extrapolation.CLAMP);
24
+
25
+ // Cat grows as it emerges from the hole
26
+ const emergenceScale = interpolate(catAnimation.value, [0, 0.4, 1], [0.3, 0.8, 1], Extrapolation.CLAMP);
27
+
28
+ // Constrained bounce - keep cat within hole area
29
+ const bounceY = whackBounce.value * -8;
30
+ const finalTranslateY = Math.max(translateY + bounceY, -GAME_CONFIG.HOLE_SIZE * 0.1);
31
+ return {
32
+ transform: [{
33
+ translateY: finalTranslateY
34
+ }, {
35
+ scale: whackScale.value * emergenceScale
36
+ }, {
37
+ rotate: `${whackRotation.value}deg`
38
+ }],
39
+ opacity: catAnimation.value
40
+ };
41
+ });
42
+ const hitStyle = useAnimatedStyle(() => {
43
+ const scale = 1 + hitAnimation.value * 0.5;
44
+ return {
45
+ transform: [{
46
+ scale
47
+ }],
48
+ opacity: hitAnimation.value
49
+ };
50
+ });
51
+
52
+ // Enhanced hit handler with coordinated whack animation
53
+ const handlePress = () => {
54
+ // Only trigger whack animation if cat is active
55
+ if (hole.isActive || catAnimation.value > 0) {
56
+ // Whack animation sequence - constrained to hole area
57
+ whackScale.value = withSequence(withSpring(1.3, {
58
+ damping: 8,
59
+ stiffness: 400
60
+ }), withSpring(0.8, {
61
+ damping: 10,
62
+ stiffness: 300
63
+ }), withTiming(0, {
64
+ duration: 400
65
+ }));
66
+ whackRotation.value = withSequence(withSpring(15, {
67
+ damping: 10,
68
+ stiffness: 300
69
+ }), withSpring(-8, {
70
+ damping: 12,
71
+ stiffness: 250
72
+ }), withTiming(0, {
73
+ duration: 300
74
+ }));
75
+ whackBounce.value = withSequence(withSpring(1, {
76
+ damping: 8,
77
+ stiffness: 400
78
+ }), withSpring(0, {
79
+ damping: 12,
80
+ stiffness: 300
81
+ }));
82
+
83
+ // Delay hit effect to let cat animation show first
84
+ setTimeout(() => {
85
+ // Trigger hit effect after cat starts reacting
86
+ onPress(hole.id);
87
+ }, 150);
88
+
89
+ // Reset animations after whack sequence
90
+ setTimeout(() => {
91
+ whackScale.value = 1;
92
+ whackRotation.value = 0;
93
+ whackBounce.value = 0;
94
+ }, 800);
95
+ } else {
96
+ // No cat present, just trigger normal hit
97
+ onPress(hole.id);
98
+ }
99
+ };
100
+ return /*#__PURE__*/_jsxs(TouchableOpacity, {
101
+ style: [styles.holeContainer, {
102
+ width: GAME_CONFIG.HOLE_SIZE,
103
+ height: GAME_CONFIG.HOLE_SIZE
104
+ }],
105
+ onPress: handlePress,
106
+ activeOpacity: 0.8,
107
+ children: [/*#__PURE__*/_jsx(View, {
108
+ style: [styles.hole, {
109
+ width: GAME_CONFIG.HOLE_SIZE * 0.8,
110
+ height: GAME_CONFIG.HOLE_SIZE * 0.8
111
+ }]
112
+ }), /*#__PURE__*/_jsx(Animated.View, {
113
+ style: [styles.hitEffectContainer, {
114
+ width: GAME_CONFIG.HOLE_SIZE,
115
+ height: GAME_CONFIG.HOLE_SIZE
116
+ }, hitStyle],
117
+ children: /*#__PURE__*/_jsx(SkiaCanvas, {
118
+ style: {
119
+ width: GAME_CONFIG.HOLE_SIZE,
120
+ height: GAME_CONFIG.HOLE_SIZE
121
+ },
122
+ children: /*#__PURE__*/_jsxs(Group, {
123
+ children: [/*#__PURE__*/_jsx(Circle, {
124
+ cx: GAME_CONFIG.HOLE_SIZE / 2,
125
+ cy: GAME_CONFIG.HOLE_SIZE / 2,
126
+ r: 30,
127
+ color: COLORS.HIT_EFFECT_OUTER
128
+ }), /*#__PURE__*/_jsx(Circle, {
129
+ cx: GAME_CONFIG.HOLE_SIZE / 2,
130
+ cy: GAME_CONFIG.HOLE_SIZE / 2,
131
+ r: 20,
132
+ color: COLORS.HIT_EFFECT_INNER
133
+ })]
134
+ })
135
+ })
136
+ }), (hole.isActive || catAnimation.value > 0 || whackScale.value !== 1) && /*#__PURE__*/_jsx(Animated.View, {
137
+ style: [styles.catContainer, {
138
+ bottom: GAME_CONFIG.HOLE_SIZE * 0.1,
139
+ zIndex: 10
140
+ }, catStyle],
141
+ children: /*#__PURE__*/_jsx(CatCharacter, {
142
+ size: GAME_CONFIG.HOLE_SIZE * 0.6
143
+ })
144
+ })]
145
+ });
146
+ };
147
+ const styles = StyleSheet.create({
148
+ holeContainer: {
149
+ justifyContent: 'center',
150
+ alignItems: 'center',
151
+ position: 'relative'
152
+ },
153
+ hole: {
154
+ backgroundColor: '#92400e',
155
+ borderWidth: 4,
156
+ borderColor: '#a16207',
157
+ borderRadius: 9999,
158
+ shadowColor: '#000',
159
+ shadowOffset: {
160
+ width: 0,
161
+ height: 2
162
+ },
163
+ shadowOpacity: 0.25,
164
+ shadowRadius: 3.84,
165
+ elevation: 5
166
+ },
167
+ catContainer: {
168
+ position: 'absolute',
169
+ justifyContent: 'center',
170
+ alignItems: 'center',
171
+ zIndex: 10,
172
+ elevation: 10
173
+ },
174
+ hitEffectContainer: {
175
+ position: 'absolute',
176
+ justifyContent: 'center',
177
+ alignItems: 'center',
178
+ pointerEvents: 'none',
179
+ zIndex: 1,
180
+ elevation: 1
181
+ }
182
+ });
183
+ //# sourceMappingURL=GameHole.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","TouchableOpacity","StyleSheet","useSharedValue","useAnimatedStyle","withSpring","withSequence","withTiming","interpolate","Extrapolation","Animated","Canvas","SkiaCanvas","Circle","Group","GAME_CONFIG","COLORS","CatCharacter","jsx","_jsx","jsxs","_jsxs","GameHole","hole","catAnimation","hitAnimation","onPress","whackScale","whackRotation","whackBounce","catStyle","translateY","value","HOLE_SIZE","CLAMP","emergenceScale","bounceY","finalTranslateY","Math","max","transform","scale","rotate","opacity","hitStyle","handlePress","isActive","damping","stiffness","duration","setTimeout","id","style","styles","holeContainer","width","height","activeOpacity","children","hitEffectContainer","cx","cy","r","color","HIT_EFFECT_OUTER","HIT_EFFECT_INNER","catContainer","bottom","zIndex","size","create","justifyContent","alignItems","position","backgroundColor","borderWidth","borderColor","borderRadius","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","pointerEvents"],"sourceRoot":"../../../../../src","sources":["games/cat-popper/components/GameHole.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ,cAAc;AACjE,SACEC,cAAc,EACdC,gBAAgB,EAChBC,UAAU,EACVC,YAAY,EACZC,UAAU,EACVC,WAAW,EACXC,aAAa,QAER,yBAAyB;AAChC,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,MAAM,IAAIC,UAAU,EAAEC,MAAM,EAAEC,KAAK,QAAQ,4BAA4B;AAChF,SAAoBC,WAAW,EAAEC,MAAM,QAAQ,wBAAqB;AACpE,SAASC,YAAY,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAS9C,OAAO,MAAMC,QAAi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MAAM;IACnBC,YAAY,EAAE;MAAExB,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCwB,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,IAAI;IAClBC,SAAS,EAAE;EACb,CAAC;EACDhB,YAAY,EAAE;IACZO,QAAQ,EAAE,UAAU;IACpBF,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBJ,MAAM,EAAE,EAAE;IACVc,SAAS,EAAE;EACb,CAAC;EACDvB,kBAAkB,EAAE;IAClBc,QAAQ,EAAE,UAAU;IACpBF,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBW,aAAa,EAAE,MAAM;IACrBf,MAAM,EAAE,CAAC;IACTc,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { View, TouchableOpacity, Text, StyleSheet, Modal } from 'react-native';
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ export const GameOverModal = ({
7
+ isVisible,
8
+ score,
9
+ onPlayAgain
10
+ }) => {
11
+ return /*#__PURE__*/_jsx(Modal, {
12
+ visible: isVisible,
13
+ animationType: "fade",
14
+ transparent: true,
15
+ onRequestClose: onPlayAgain,
16
+ children: /*#__PURE__*/_jsx(View, {
17
+ style: styles.gameOverOverlay,
18
+ children: /*#__PURE__*/_jsx(View, {
19
+ style: styles.gameOverModal,
20
+ children: /*#__PURE__*/_jsxs(View, {
21
+ style: styles.modalContent,
22
+ children: [/*#__PURE__*/_jsx(Text, {
23
+ style: styles.gameOverTitle,
24
+ children: "Game Over!"
25
+ }), /*#__PURE__*/_jsxs(View, {
26
+ style: styles.finalScoreContainer,
27
+ children: [/*#__PURE__*/_jsx(Text, {
28
+ style: styles.finalScoreLabel,
29
+ children: "Final Score"
30
+ }), /*#__PURE__*/_jsx(Text, {
31
+ style: styles.finalScoreValue,
32
+ children: score
33
+ })]
34
+ }), /*#__PURE__*/_jsx(View, {
35
+ style: styles.playAgainContainer,
36
+ children: /*#__PURE__*/_jsx(TouchableOpacity, {
37
+ style: styles.playAgainButton,
38
+ onPress: onPlayAgain,
39
+ children: /*#__PURE__*/_jsx(Text, {
40
+ style: styles.buttonText,
41
+ children: "Play Again"
42
+ })
43
+ })
44
+ })]
45
+ })
46
+ })
47
+ })
48
+ });
49
+ };
50
+ const styles = StyleSheet.create({
51
+ gameOverOverlay: {
52
+ flex: 1,
53
+ justifyContent: 'center',
54
+ alignItems: 'center',
55
+ backgroundColor: 'rgba(0, 0, 0, 0.5)' // Semi-transparent overlay
56
+ },
57
+ gameOverModal: {
58
+ backgroundColor: '#87CEEB',
59
+ // Sky blue background
60
+ borderRadius: 24,
61
+ minWidth: '80%',
62
+ shadowColor: '#000',
63
+ shadowOffset: {
64
+ width: 0,
65
+ height: 8
66
+ },
67
+ shadowOpacity: 0.4,
68
+ shadowRadius: 12,
69
+ elevation: 12,
70
+ borderWidth: 3,
71
+ borderColor: 'rgba(250, 204, 21, 0.8)'
72
+ },
73
+ modalContent: {
74
+ padding: 40,
75
+ alignItems: 'center'
76
+ },
77
+ gameOverTitle: {
78
+ fontSize: 30,
79
+ fontWeight: 'bold',
80
+ color: '#ffffff',
81
+ marginBottom: 32,
82
+ textAlign: 'center'
83
+ },
84
+ finalScoreContainer: {
85
+ alignItems: 'center',
86
+ marginBottom: 32,
87
+ backgroundColor: '#15803d',
88
+ borderRadius: 16,
89
+ padding: 20,
90
+ minWidth: 150
91
+ },
92
+ finalScoreLabel: {
93
+ fontSize: 18,
94
+ color: '#ffffff',
95
+ fontWeight: 'bold',
96
+ marginBottom: 8
97
+ },
98
+ finalScoreValue: {
99
+ fontSize: 48,
100
+ color: '#facc15',
101
+ fontWeight: 'bold',
102
+ textAlign: 'center'
103
+ },
104
+ playAgainContainer: {
105
+ alignItems: 'center'
106
+ },
107
+ playAgainButton: {
108
+ backgroundColor: '#22c55e',
109
+ paddingHorizontal: 40,
110
+ paddingVertical: 20,
111
+ borderRadius: 24,
112
+ shadowColor: '#000',
113
+ shadowOffset: {
114
+ width: 0,
115
+ height: 2
116
+ },
117
+ shadowOpacity: 0.25,
118
+ shadowRadius: 3.84,
119
+ elevation: 5,
120
+ borderWidth: 2,
121
+ borderColor: '#4ade80'
122
+ },
123
+ buttonText: {
124
+ fontSize: 18,
125
+ fontWeight: 'bold',
126
+ color: '#ffffff',
127
+ textAlign: 'center',
128
+ lineHeight: 24
129
+ }
130
+ });
131
+ //# sourceMappingURL=GameOverModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","TouchableOpacity","Text","StyleSheet","Modal","jsx","_jsx","jsxs","_jsxs","GameOverModal","isVisible","score","onPlayAgain","visible","animationType","transparent","onRequestClose","children","style","styles","gameOverOverlay","gameOverModal","modalContent","gameOverTitle","finalScoreContainer","finalScoreLabel","finalScoreValue","playAgainContainer","playAgainButton","onPress","buttonText","create","flex","justifyContent","alignItems","backgroundColor","borderRadius","minWidth","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","borderWidth","borderColor","padding","fontSize","fontWeight","color","marginBottom","textAlign","paddingHorizontal","paddingVertical","lineHeight"],"sourceRoot":"../../../../../src","sources":["games/cat-popper/components/GameOverModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,EAAEC,UAAU,EAAEC,KAAK,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQ/E,OAAO,MAAMC,aAA2C,GAAGA,CAAC;EAAEC,SAAS;EAAEC,KAAK;EAAEC;AAAY,CAAC,KAAK;EAChG,oBACEN,IAAA,CAACF,KAAK;IACJS,OAAO,EAAEH,SAAU;IACnBI,aAAa,EAAC,MAAM;IACpBC,WAAW,EAAE,IAAK;IAClBC,cAAc,EAAEJ,WAAY;IAA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