react-native-games 1.1.0 → 1.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 (419) hide show
  1. package/README.md +101 -30
  2. package/lib/module/games/balloon-blaster/BalloonBlaster.js +1 -167
  3. package/lib/module/games/balloon-blaster/BalloonBlaster.js.map +1 -1
  4. package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +1 -182
  5. package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js.map +1 -1
  6. package/lib/module/games/balloon-blaster/BalloonBlasterService.js +1 -318
  7. package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +1 -183
  8. package/lib/module/games/balloon-blaster/components/BalloonComponent.js +1 -237
  9. package/lib/module/games/balloon-blaster/components/GameArea.js +1 -156
  10. package/lib/module/games/balloon-blaster/components/GameBackground.js +1 -476
  11. package/lib/module/games/balloon-blaster/components/ScoreBoard.js +1 -112
  12. package/lib/module/games/balloon-blaster/components/ScoreBoard.js.map +1 -1
  13. package/lib/module/games/balloon-blaster/components/index.js +1 -7
  14. package/lib/module/games/bike-racing/BikeRacing.js +1 -0
  15. package/lib/module/games/bike-racing/BikeRacing.js.map +1 -0
  16. package/lib/module/games/bike-racing/BikeRacingConstants.js +1 -0
  17. package/lib/module/games/bike-racing/BikeRacingConstants.js.map +1 -0
  18. package/lib/module/games/bike-racing/BikeRacingService.js +1 -0
  19. package/lib/module/games/bike-racing/BikeRacingService.js.map +1 -0
  20. package/lib/module/games/bike-racing/BikeRacingStore.js +1 -0
  21. package/lib/module/games/bike-racing/BikeRacingStore.js.map +1 -0
  22. package/lib/module/games/bike-racing/components/BikeComponent.js +1 -0
  23. package/lib/module/games/bike-racing/components/BikeComponent.js.map +1 -0
  24. package/lib/module/games/bike-racing/components/GameBackground.js +1 -0
  25. package/lib/module/games/bike-racing/components/GameBackground.js.map +1 -0
  26. package/lib/module/games/bike-racing/components/ScoreBoard.js +1 -0
  27. package/lib/module/games/bike-racing/components/ScoreBoard.js.map +1 -0
  28. package/lib/module/games/bike-racing/components/index.js +1 -0
  29. package/lib/module/games/bike-racing/components/index.js.map +1 -0
  30. package/lib/module/games/bike-racing/index.js +1 -0
  31. package/lib/module/games/bike-racing/index.js.map +1 -0
  32. package/lib/module/games/block-blast/BlockBlast.js +1 -0
  33. package/lib/module/games/block-blast/BlockBlast.js.map +1 -0
  34. package/lib/module/games/block-blast/BlockBlastConstants.js +1 -0
  35. package/lib/module/games/block-blast/BlockBlastConstants.js.map +1 -0
  36. package/lib/module/games/block-blast/BlockBlastService.js +1 -0
  37. package/lib/module/games/block-blast/BlockBlastService.js.map +1 -0
  38. package/lib/module/games/block-blast/BlockBlastStore.js +1 -0
  39. package/lib/module/games/block-blast/BlockBlastStore.js.map +1 -0
  40. package/lib/module/games/block-blast/components/BlockPieceComponent.js +1 -0
  41. package/lib/module/games/block-blast/components/BlockPieceComponent.js.map +1 -0
  42. package/lib/module/games/block-blast/components/GameArea.js +1 -0
  43. package/lib/module/games/block-blast/components/GameArea.js.map +1 -0
  44. package/lib/module/games/block-blast/components/GameBackground.js +1 -0
  45. package/lib/module/games/block-blast/components/GameBackground.js.map +1 -0
  46. package/lib/module/games/block-blast/components/GridComponent.js +1 -0
  47. package/lib/module/games/block-blast/components/GridComponent.js.map +1 -0
  48. package/lib/module/games/block-blast/components/ScoreBoard.js +1 -0
  49. package/lib/module/games/block-blast/components/ScoreBoard.js.map +1 -0
  50. package/lib/module/games/block-blast/components/index.js +1 -0
  51. package/lib/module/games/block-blast/components/index.js.map +1 -0
  52. package/lib/module/games/block-blast/index.js +1 -0
  53. package/lib/module/games/block-blast/index.js.map +1 -0
  54. package/lib/module/games/bubble-shooter/BubbleShooter.js +1 -0
  55. package/lib/module/games/bubble-shooter/BubbleShooter.js.map +1 -0
  56. package/lib/module/games/bubble-shooter/BubbleShooterConstants.js +1 -0
  57. package/lib/module/games/bubble-shooter/BubbleShooterConstants.js.map +1 -0
  58. package/lib/module/games/bubble-shooter/BubbleShooterService.js +1 -0
  59. package/lib/module/games/bubble-shooter/BubbleShooterService.js.map +1 -0
  60. package/lib/module/games/bubble-shooter/BubbleShooterStore.js +1 -0
  61. package/lib/module/games/bubble-shooter/BubbleShooterStore.js.map +1 -0
  62. package/lib/module/games/bubble-shooter/components/GameArea.js +1 -0
  63. package/lib/module/games/bubble-shooter/components/GameArea.js.map +1 -0
  64. package/lib/module/games/bubble-shooter/components/GameBackground.js +1 -0
  65. package/lib/module/games/bubble-shooter/components/GameBackground.js.map +1 -0
  66. package/lib/module/games/bubble-shooter/components/ScoreBoard.js +1 -0
  67. package/lib/module/games/bubble-shooter/components/ScoreBoard.js.map +1 -0
  68. package/lib/module/games/bubble-shooter/components/index.js +1 -0
  69. package/lib/module/games/bubble-shooter/components/index.js.map +1 -0
  70. package/lib/module/games/bubble-shooter/index.js +1 -0
  71. package/lib/module/games/bubble-shooter/index.js.map +1 -0
  72. package/lib/module/games/candy-crush/CandyCrush.js +1 -131
  73. package/lib/module/games/candy-crush/CandyCrush.js.map +1 -1
  74. package/lib/module/games/candy-crush/CandyCrushConstants.js +1 -125
  75. package/lib/module/games/candy-crush/CandyCrushConstants.js.map +1 -1
  76. package/lib/module/games/candy-crush/CandyCrushService.js +1 -370
  77. package/lib/module/games/candy-crush/CandyCrushStore.js +1 -303
  78. package/lib/module/games/candy-crush/components/CandyItem.js +1 -191
  79. package/lib/module/games/candy-crush/components/GameBackground.js +1 -85
  80. package/lib/module/games/candy-crush/components/GameGrid.js +1 -314
  81. package/lib/module/games/candy-crush/components/ScoreBoard.js +1 -79
  82. package/lib/module/games/candy-crush/components/index.js +1 -7
  83. package/lib/module/games/candy-crush/index.js +1 -6
  84. package/lib/module/games/car-racing/CarRacing.js +1 -0
  85. package/lib/module/games/car-racing/CarRacing.js.map +1 -0
  86. package/lib/module/games/car-racing/CarRacingConstants.js +1 -0
  87. package/lib/module/games/car-racing/CarRacingConstants.js.map +1 -0
  88. package/lib/module/games/car-racing/CarRacingService.js +1 -0
  89. package/lib/module/games/car-racing/CarRacingService.js.map +1 -0
  90. package/lib/module/games/car-racing/CarRacingStore.js +1 -0
  91. package/lib/module/games/car-racing/CarRacingStore.js.map +1 -0
  92. package/lib/module/games/car-racing/components/CarComponent.js +1 -0
  93. package/lib/module/games/car-racing/components/CarComponent.js.map +1 -0
  94. package/lib/module/games/car-racing/components/GameBackground.js +1 -0
  95. package/lib/module/games/car-racing/components/GameBackground.js.map +1 -0
  96. package/lib/module/games/car-racing/components/ScoreBoard.js +1 -0
  97. package/lib/module/games/car-racing/components/ScoreBoard.js.map +1 -0
  98. package/lib/module/games/car-racing/components/index.js +1 -0
  99. package/lib/module/games/car-racing/components/index.js.map +1 -0
  100. package/lib/module/games/colors-sort/ColorsSort.js +1 -143
  101. package/lib/module/games/colors-sort/ColorsSort.js.map +1 -1
  102. package/lib/module/games/colors-sort/ColorsSortConstants.js +1 -72
  103. package/lib/module/games/colors-sort/ColorsSortConstants.js.map +1 -1
  104. package/lib/module/games/colors-sort/ColorsSortService.js +1 -255
  105. package/lib/module/games/colors-sort/ColorsSortStore.js +1 -257
  106. package/lib/module/games/colors-sort/ColorsSortStore.js.map +1 -1
  107. package/lib/module/games/colors-sort/components/ColorContainer.js +1 -140
  108. package/lib/module/games/colors-sort/components/GameBackground.js +1 -135
  109. package/lib/module/games/colors-sort/components/ScoreBoard.js +1 -70
  110. package/lib/module/games/colors-sort/components/index.js +1 -6
  111. package/lib/module/games/dino-jump/DinoJump.js +1 -209
  112. package/lib/module/games/dino-jump/DinoJump.js.map +1 -1
  113. package/lib/module/games/dino-jump/DinoJumpConstants.js +1 -189
  114. package/lib/module/games/dino-jump/DinoJumpConstants.js.map +1 -1
  115. package/lib/module/games/dino-jump/DinoJumpService.js +1 -270
  116. package/lib/module/games/dino-jump/DinoJumpStore.js +1 -381
  117. package/lib/module/games/dino-jump/components/DinoSprite.js +1 -418
  118. package/lib/module/games/dino-jump/components/DinoSprite.js.map +1 -1
  119. package/lib/module/games/dino-jump/components/GameArea.js +1 -68
  120. package/lib/module/games/dino-jump/components/GameBackground.js +1 -444
  121. package/lib/module/games/dino-jump/components/ObstacleSprite.js +1 -306
  122. package/lib/module/games/dino-jump/components/ScoreBoard.js +1 -105
  123. package/lib/module/games/dino-jump/components/ScoreBoard.js.map +1 -1
  124. package/lib/module/games/dino-jump/components/StarSprite.js +1 -45
  125. package/lib/module/games/dino-jump/components/index.js +1 -9
  126. package/lib/module/games/flappy-bird/FlappyBird.js +1 -126
  127. package/lib/module/games/flappy-bird/FlappyBird.js.map +1 -1
  128. package/lib/module/games/flappy-bird/FlappyBirdConstants.js +1 -90
  129. package/lib/module/games/flappy-bird/FlappyBirdConstants.js.map +1 -1
  130. package/lib/module/games/flappy-bird/FlappyBirdStore.js +1 -300
  131. package/lib/module/games/flappy-bird/components/Bird.js +1 -87
  132. package/lib/module/games/flappy-bird/components/GameArea.js +1 -87
  133. package/lib/module/games/flappy-bird/components/GameBackground.js +1 -79
  134. package/lib/module/games/flappy-bird/components/Pipes.js +1 -172
  135. package/lib/module/games/flappy-bird/components/ScoreBoard.js +1 -73
  136. package/lib/module/games/flappy-bird/components/index.js +1 -8
  137. package/lib/module/games/fruit-merger/FruitMerger.js +1 -120
  138. package/lib/module/games/fruit-merger/FruitMerger.js.map +1 -1
  139. package/lib/module/games/fruit-merger/FruitMergerConstants.js +1 -119
  140. package/lib/module/games/fruit-merger/FruitMergerConstants.js.map +1 -1
  141. package/lib/module/games/fruit-merger/FruitMergerService.js +1 -13
  142. package/lib/module/games/fruit-merger/FruitMergerStore.js +1 -315
  143. package/lib/module/games/fruit-merger/components/FruitItem.js +1 -102
  144. package/lib/module/games/fruit-merger/components/GameArea.js +1 -103
  145. package/lib/module/games/fruit-merger/components/GameBackground.js +1 -498
  146. package/lib/module/games/fruit-merger/components/ScoreBoard.js +1 -58
  147. package/lib/module/games/fruit-merger/components/index.js +1 -7
  148. package/lib/module/games/fruit-ninja/FruitNinja.js +1 -134
  149. package/lib/module/games/fruit-ninja/FruitNinja.js.map +1 -1
  150. package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +1 -148
  151. package/lib/module/games/fruit-ninja/FruitNinjaConstants.js.map +1 -1
  152. package/lib/module/games/fruit-ninja/FruitNinjaService.js +1 -311
  153. package/lib/module/games/fruit-ninja/FruitNinjaStore.js +1 -191
  154. package/lib/module/games/fruit-ninja/FruitNinjaStore.js.map +1 -1
  155. package/lib/module/games/fruit-ninja/components/FruitComponent.js +1 -99
  156. package/lib/module/games/fruit-ninja/components/GameArea.js +1 -215
  157. package/lib/module/games/fruit-ninja/components/GameBackground.js +1 -1267
  158. package/lib/module/games/fruit-ninja/components/ScoreBoard.js +1 -92
  159. package/lib/module/games/fruit-ninja/components/ScoreBoard.js.map +1 -1
  160. package/lib/module/games/fruit-ninja/components/index.js +1 -7
  161. package/lib/module/games/game-2048/Game2048.js +1 -149
  162. package/lib/module/games/game-2048/Game2048.js.map +1 -1
  163. package/lib/module/games/game-2048/Game2048Constants.js +1 -263
  164. package/lib/module/games/game-2048/Game2048Constants.js.map +1 -1
  165. package/lib/module/games/game-2048/Game2048Service.js +1 -457
  166. package/lib/module/games/game-2048/Game2048Store.js +1 -236
  167. package/lib/module/games/game-2048/components/GameBackground.js +1 -247
  168. package/lib/module/games/game-2048/components/GameGrid.js +1 -139
  169. package/lib/module/games/game-2048/components/GameTile.js +1 -72
  170. package/lib/module/games/game-2048/components/ScoreBoard.js +1 -52
  171. package/lib/module/games/game-2048/components/index.js +1 -7
  172. package/lib/module/games/maze-runner/MazeRunner.js +1 -267
  173. package/lib/module/games/maze-runner/MazeRunner.js.map +1 -1
  174. package/lib/module/games/maze-runner/MazeRunnerConstants.js +1 -100
  175. package/lib/module/games/maze-runner/MazeRunnerConstants.js.map +1 -1
  176. package/lib/module/games/maze-runner/MazeRunnerService.js +1 -586
  177. package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +1 -150
  178. package/lib/module/games/maze-runner/components/EnhancedGameArea.js +1 -370
  179. package/lib/module/games/maze-runner/components/GameBackground.js +1 -175
  180. package/lib/module/games/maze-runner/components/ScoreBoard.js +1 -61
  181. package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +1 -209
  182. package/lib/module/games/maze-runner/components/StaticGameBackground.js +1 -169
  183. package/lib/module/games/maze-runner/components/WallComponent.js +1 -91
  184. package/lib/module/games/maze-runner/components/index.js +1 -8
  185. package/lib/module/games/perfect-circle/PerfectCircle.js +1 -0
  186. package/lib/module/games/perfect-circle/PerfectCircle.js.map +1 -0
  187. package/lib/module/games/perfect-circle/PerfectCircleConstants.js +1 -0
  188. package/lib/module/games/perfect-circle/PerfectCircleConstants.js.map +1 -0
  189. package/lib/module/games/perfect-circle/PerfectCircleService.js +1 -0
  190. package/lib/module/games/perfect-circle/PerfectCircleService.js.map +1 -0
  191. package/lib/module/games/perfect-circle/PerfectCircleStore.js +1 -0
  192. package/lib/module/games/perfect-circle/PerfectCircleStore.js.map +1 -0
  193. package/lib/module/games/perfect-circle/components/DrawingCanvas.js +1 -0
  194. package/lib/module/games/perfect-circle/components/DrawingCanvas.js.map +1 -0
  195. package/lib/module/games/perfect-circle/components/GameBackground.js +1 -0
  196. package/lib/module/games/perfect-circle/components/GameBackground.js.map +1 -0
  197. package/lib/module/games/perfect-circle/components/ScoreBoard.js +1 -0
  198. package/lib/module/games/perfect-circle/components/ScoreBoard.js.map +1 -0
  199. package/lib/module/games/perfect-circle/index.js +1 -0
  200. package/lib/module/games/perfect-circle/index.js.map +1 -0
  201. package/lib/module/games/popit-fidget/PopitFidget.js +1 -285
  202. package/lib/module/games/popit-fidget/PopitFidget.js.map +1 -1
  203. package/lib/module/games/popit-fidget/PopitFidgetConstants.js +1 -113
  204. package/lib/module/games/popit-fidget/PopitFidgetConstants.js.map +1 -1
  205. package/lib/module/games/popit-fidget/PopitFidgetService.js +1 -132
  206. package/lib/module/games/popit-fidget/PopitFidgetStore.js +1 -125
  207. package/lib/module/games/popit-fidget/components/BubbleComponent.js +1 -198
  208. package/lib/module/games/popit-fidget/components/FidgetGrid.js +1 -165
  209. package/lib/module/games/popit-fidget/components/GameBackground.js +1 -177
  210. package/lib/module/games/popit-fidget/components/ScoreBoard.js +1 -61
  211. package/lib/module/games/popit-fidget/components/index.js +1 -7
  212. package/lib/module/games/sliding-numbers/SlidingNumbers.js +1 -159
  213. package/lib/module/games/sliding-numbers/SlidingNumbers.js.map +1 -1
  214. package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +1 -207
  215. package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js.map +1 -1
  216. package/lib/module/games/sliding-numbers/SlidingNumbersService.js +1 -248
  217. package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +1 -274
  218. package/lib/module/games/sliding-numbers/components/GameBackground.js +1 -259
  219. package/lib/module/games/sliding-numbers/components/NumbersGrid.js +1 -174
  220. package/lib/module/games/sliding-numbers/components/NumbersTile.js +1 -116
  221. package/lib/module/games/sliding-numbers/components/ScoreBoard.js +1 -64
  222. package/lib/module/games/sliding-numbers/components/index.js +1 -7
  223. package/lib/module/games/snake/Snake.js +1 -189
  224. package/lib/module/games/snake/Snake.js.map +1 -1
  225. package/lib/module/games/snake/SnakeConstants.js +1 -138
  226. package/lib/module/games/snake/SnakeConstants.js.map +1 -1
  227. package/lib/module/games/snake/SnakeService.js +1 -148
  228. package/lib/module/games/snake/SnakeStore.js +1 -182
  229. package/lib/module/games/snake/SnakeStore.js.map +1 -1
  230. package/lib/module/games/snake/components/GameBackground.js +1 -221
  231. package/lib/module/games/snake/components/GameGrid.js +1 -153
  232. package/lib/module/games/snake/components/ScoreBoard.js +1 -51
  233. package/lib/module/games/snake/components/ScoreBoard.js.map +1 -1
  234. package/lib/module/games/snake/components/index.js +1 -6
  235. package/lib/module/games/snake/index.js +1 -6
  236. package/lib/module/games/space-fighter/SpaceFighter.js +1 -165
  237. package/lib/module/games/space-fighter/SpaceFighter.js.map +1 -1
  238. package/lib/module/games/space-fighter/SpaceFighterConstants.js +1 -108
  239. package/lib/module/games/space-fighter/SpaceFighterConstants.js.map +1 -1
  240. package/lib/module/games/space-fighter/SpaceFighterService.js +1 -326
  241. package/lib/module/games/space-fighter/SpaceFighterStore.js +1 -209
  242. package/lib/module/games/space-fighter/components/AsteroidComponent.js +1 -113
  243. package/lib/module/games/space-fighter/components/GameArea.js +1 -289
  244. package/lib/module/games/space-fighter/components/GameBackground.js +1 -239
  245. package/lib/module/games/space-fighter/components/ScoreBoard.js +1 -136
  246. package/lib/module/games/space-fighter/components/Spacecraft3D.js +1 -202
  247. package/lib/module/games/space-fighter/components/SpacecraftPath.js +1 -52
  248. package/lib/module/games/space-fighter/components/index.js +1 -9
  249. package/lib/module/games/whack-a-mole/WhackAMole.js +1 -270
  250. package/lib/module/games/whack-a-mole/WhackAMole.js.map +1 -1
  251. package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +1 -115
  252. package/lib/module/games/whack-a-mole/WhackAMoleConstants.js.map +1 -1
  253. package/lib/module/games/whack-a-mole/WhackAMoleService.js +1 -120
  254. package/lib/module/games/whack-a-mole/WhackAMoleStore.js +1 -172
  255. package/lib/module/games/whack-a-mole/components/GameBackground.js +1 -477
  256. package/lib/module/games/whack-a-mole/components/GameGrid.js +1 -97
  257. package/lib/module/games/whack-a-mole/components/GameHole.js +1 -196
  258. package/lib/module/games/whack-a-mole/components/MoleCharacter.js +1 -241
  259. package/lib/module/games/whack-a-mole/components/ScoreBoard.js +1 -67
  260. package/lib/module/games/whack-a-mole/components/ScoreBoard.js.map +1 -1
  261. package/lib/module/games/whack-a-mole/components/index.js +1 -8
  262. package/lib/module/helpers/AnimationFrame.js +1 -120
  263. package/lib/module/helpers/AnimationTracker.js +1 -89
  264. package/lib/module/helpers/ErrorHandler.js +1 -269
  265. package/lib/module/helpers/GameControlButton.js +1 -219
  266. package/lib/module/helpers/GameOverModal.js +1 -144
  267. package/lib/module/helpers/GameOverModal.js.map +1 -1
  268. package/lib/module/helpers/GameSettingsModal.js +1 -287
  269. package/lib/module/helpers/GameSettingsModal.js.map +1 -1
  270. package/lib/module/helpers/ParticleBlast.js +1 -134
  271. package/lib/module/helpers/ScoreBoardContainer.js +1 -34
  272. package/lib/module/helpers/ScoreBoardContainer.js.map +1 -1
  273. package/lib/module/helpers/index.js +1 -12
  274. package/lib/module/index.js +1 -22
  275. package/lib/module/index.js.map +1 -1
  276. package/lib/module/services/GamesConstants.js +1 -178
  277. package/lib/module/services/GamesConstants.js.map +1 -1
  278. package/lib/module/services/GamesService.js +1 -112
  279. package/lib/module/services/GamesService.js.map +1 -1
  280. package/lib/module/services/HapticsService.js +1 -77
  281. package/lib/module/services/ScoringService.js +1 -0
  282. package/lib/module/services/ScoringService.js.map +1 -0
  283. package/lib/module/services/SoundsService.js +1 -302
  284. package/lib/module/services/SoundsService.js.map +1 -1
  285. package/lib/module/services/UtilsService.js +1 -32
  286. package/lib/module/services/UtilsService.js.map +1 -1
  287. package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts.map +1 -1
  288. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +1 -1
  289. package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts.map +1 -1
  290. package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts +4 -0
  291. package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts.map +1 -0
  292. package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts +76 -0
  293. package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts.map +1 -0
  294. package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts +22 -0
  295. package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts.map +1 -0
  296. package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts +72 -0
  297. package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts.map +1 -0
  298. package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts +12 -0
  299. package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts.map +1 -0
  300. package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts +9 -0
  301. package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts.map +1 -0
  302. package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts +7 -0
  303. package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts.map +1 -0
  304. package/lib/typescript/src/games/bike-racing/components/index.d.ts +4 -0
  305. package/lib/typescript/src/games/bike-racing/components/index.d.ts.map +1 -0
  306. package/lib/typescript/src/games/bike-racing/index.d.ts +5 -0
  307. package/lib/typescript/src/games/bike-racing/index.d.ts.map +1 -0
  308. package/lib/typescript/src/games/block-blast/BlockBlast.d.ts +4 -0
  309. package/lib/typescript/src/games/block-blast/BlockBlast.d.ts.map +1 -0
  310. package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts +82 -0
  311. package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts.map +1 -0
  312. package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts +17 -0
  313. package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts.map +1 -0
  314. package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts +62 -0
  315. package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts.map +1 -0
  316. package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts +14 -0
  317. package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts.map +1 -0
  318. package/lib/typescript/src/games/block-blast/components/GameArea.d.ts +12 -0
  319. package/lib/typescript/src/games/block-blast/components/GameArea.d.ts.map +1 -0
  320. package/lib/typescript/src/games/block-blast/components/GameBackground.d.ts +7 -0
  321. package/lib/typescript/src/games/block-blast/components/GameBackground.d.ts.map +1 -0
  322. package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts +17 -0
  323. package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts.map +1 -0
  324. package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts +7 -0
  325. package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts.map +1 -0
  326. package/lib/typescript/src/games/block-blast/components/index.d.ts +6 -0
  327. package/lib/typescript/src/games/block-blast/components/index.d.ts.map +1 -0
  328. package/lib/typescript/src/games/block-blast/index.d.ts +5 -0
  329. package/lib/typescript/src/games/block-blast/index.d.ts.map +1 -0
  330. package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts +4 -0
  331. package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts.map +1 -0
  332. package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts +61 -0
  333. package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts.map +1 -0
  334. package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts +26 -0
  335. package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts.map +1 -0
  336. package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts +62 -0
  337. package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts.map +1 -0
  338. package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts +9 -0
  339. package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts.map +1 -0
  340. package/lib/typescript/src/games/bubble-shooter/components/GameBackground.d.ts +8 -0
  341. package/lib/typescript/src/games/bubble-shooter/components/GameBackground.d.ts.map +1 -0
  342. package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts +7 -0
  343. package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts.map +1 -0
  344. package/lib/typescript/src/games/bubble-shooter/components/index.d.ts +4 -0
  345. package/lib/typescript/src/games/bubble-shooter/components/index.d.ts.map +1 -0
  346. package/lib/typescript/src/games/bubble-shooter/index.d.ts +3 -0
  347. package/lib/typescript/src/games/bubble-shooter/index.d.ts.map +1 -0
  348. package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts.map +1 -1
  349. package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +7 -7
  350. package/lib/typescript/src/games/car-racing/CarRacing.d.ts +4 -0
  351. package/lib/typescript/src/games/car-racing/CarRacing.d.ts.map +1 -0
  352. package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts +76 -0
  353. package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts.map +1 -0
  354. package/lib/typescript/src/games/car-racing/CarRacingService.d.ts +22 -0
  355. package/lib/typescript/src/games/car-racing/CarRacingService.d.ts.map +1 -0
  356. package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts +72 -0
  357. package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts.map +1 -0
  358. package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts +13 -0
  359. package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts.map +1 -0
  360. package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts +9 -0
  361. package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts.map +1 -0
  362. package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts +7 -0
  363. package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts.map +1 -0
  364. package/lib/typescript/src/games/car-racing/components/index.d.ts +4 -0
  365. package/lib/typescript/src/games/car-racing/components/index.d.ts.map +1 -0
  366. package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts.map +1 -1
  367. package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts.map +1 -1
  368. package/lib/typescript/src/games/dino-jump/DinoJump.d.ts.map +1 -1
  369. package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts.map +1 -1
  370. package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts.map +1 -1
  371. package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts.map +1 -1
  372. package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts.map +1 -1
  373. package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts.map +1 -1
  374. package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts.map +1 -1
  375. package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts.map +1 -1
  376. package/lib/typescript/src/games/game-2048/Game2048.d.ts.map +1 -1
  377. package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts.map +1 -1
  378. package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts +4 -0
  379. package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts.map +1 -0
  380. package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts +81 -0
  381. package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts.map +1 -0
  382. package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts +14 -0
  383. package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts.map +1 -0
  384. package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts +40 -0
  385. package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts.map +1 -0
  386. package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts +9 -0
  387. package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts.map +1 -0
  388. package/lib/typescript/src/games/perfect-circle/components/GameBackground.d.ts +8 -0
  389. package/lib/typescript/src/games/perfect-circle/components/GameBackground.d.ts.map +1 -0
  390. package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts +7 -0
  391. package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts.map +1 -0
  392. package/lib/typescript/src/games/perfect-circle/index.d.ts +3 -0
  393. package/lib/typescript/src/games/perfect-circle/index.d.ts.map +1 -0
  394. package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts.map +1 -1
  395. package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts.map +1 -1
  396. package/lib/typescript/src/games/snake/Snake.d.ts.map +1 -1
  397. package/lib/typescript/src/games/snake/SnakeStore.d.ts +4 -0
  398. package/lib/typescript/src/games/snake/SnakeStore.d.ts.map +1 -1
  399. package/lib/typescript/src/games/snake/components/ScoreBoard.d.ts.map +1 -1
  400. package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts.map +1 -1
  401. package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts.map +1 -1
  402. package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +1 -1
  403. package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts.map +1 -1
  404. package/lib/typescript/src/helpers/GameOverModal.d.ts +3 -0
  405. package/lib/typescript/src/helpers/GameOverModal.d.ts.map +1 -1
  406. package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts.map +1 -1
  407. package/lib/typescript/src/index.d.ts +6 -1
  408. package/lib/typescript/src/index.d.ts.map +1 -1
  409. package/lib/typescript/src/services/GamesConstants.d.ts +57 -7
  410. package/lib/typescript/src/services/GamesConstants.d.ts.map +1 -1
  411. package/lib/typescript/src/services/GamesService.d.ts +2 -1
  412. package/lib/typescript/src/services/GamesService.d.ts.map +1 -1
  413. package/lib/typescript/src/services/ScoringService.d.ts +2 -0
  414. package/lib/typescript/src/services/ScoringService.d.ts.map +1 -0
  415. package/lib/typescript/src/services/SoundsService.d.ts +88 -0
  416. package/lib/typescript/src/services/SoundsService.d.ts.map +1 -1
  417. package/lib/typescript/src/services/UtilsService.d.ts +12 -1
  418. package/lib/typescript/src/services/UtilsService.d.ts.map +1 -1
  419. package/package.json +2 -2
@@ -1,219 +1 @@
1
- "use strict";
2
-
3
- import React, { useRef, useEffect, useMemo } 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 GameControlButton = /*#__PURE__*/React.memo(({
7
- isPlaying,
8
- gameOver,
9
- onStartGame,
10
- onStopGame,
11
- startButtonText = 'START GAME',
12
- stopButtonText = 'STOP GAME',
13
- startButtonSubtext = 'Begin playing!',
14
- stopButtonSubtext = 'End current game',
15
- startButtonColor = '#10b981',
16
- stopButtonColor = '#dc2626',
17
- startButtonBorderColor = '#34d399',
18
- stopButtonBorderColor = '#f87171'
19
- }) => {
20
- const scaleAnim = useRef(new Animated.Value(1)).current;
21
- const pulseAnim = useRef(new Animated.Value(1)).current;
22
- const glowAnim = useRef(new Animated.Value(0)).current;
23
- useEffect(() => {
24
- if (!isPlaying) {
25
- const pulseAnimation = Animated.loop(Animated.sequence([Animated.timing(pulseAnim, {
26
- toValue: 1.05,
27
- duration: 1000,
28
- useNativeDriver: true
29
- }), Animated.timing(pulseAnim, {
30
- toValue: 1,
31
- duration: 1000,
32
- useNativeDriver: true
33
- })]));
34
- pulseAnimation.start();
35
- return () => pulseAnimation.stop();
36
- }
37
- return () => {};
38
- }, [isPlaying, gameOver, pulseAnim]);
39
-
40
- // Glow animation for stop button
41
- useEffect(() => {
42
- if (isPlaying) {
43
- const glowAnimation = Animated.loop(Animated.sequence([Animated.timing(glowAnim, {
44
- toValue: 1,
45
- duration: 800,
46
- useNativeDriver: false
47
- }), Animated.timing(glowAnim, {
48
- toValue: 0,
49
- duration: 800,
50
- useNativeDriver: false
51
- })]));
52
- glowAnimation.start();
53
- return () => glowAnimation.stop();
54
- }
55
- return () => {};
56
- }, [isPlaying, glowAnim]);
57
- const handlePressIn = () => {
58
- Animated.spring(scaleAnim, {
59
- toValue: 0.95,
60
- useNativeDriver: true
61
- }).start();
62
- };
63
- const handlePressOut = () => {
64
- Animated.spring(scaleAnim, {
65
- toValue: 1,
66
- friction: 3,
67
- tension: 40,
68
- useNativeDriver: true
69
- }).start();
70
- };
71
-
72
- // Memoize glow color interpolation to prevent continuous re-renders
73
- const glowColor = useMemo(() => glowAnim.interpolate({
74
- inputRange: [0, 1],
75
- outputRange: [`${stopButtonColor}30`, `${stopButtonColor}CC`]
76
- }), [glowAnim, stopButtonColor]);
77
- return /*#__PURE__*/_jsx(View, {
78
- style: styles.controlButtonContainer,
79
- children: /*#__PURE__*/_jsxs(View, {
80
- style: styles.gameControls,
81
- children: [!isPlaying && /*#__PURE__*/_jsx(Animated.View, {
82
- style: [{
83
- transform: [{
84
- scale: pulseAnim
85
- }]
86
- }],
87
- children: /*#__PURE__*/_jsx(TouchableOpacity, {
88
- style: [styles.button, styles.startButton, {
89
- backgroundColor: startButtonColor,
90
- borderColor: startButtonBorderColor
91
- }],
92
- onPress: onStartGame,
93
- onPressIn: handlePressIn,
94
- onPressOut: handlePressOut,
95
- activeOpacity: 0.8,
96
- children: /*#__PURE__*/_jsxs(Animated.View, {
97
- style: [styles.buttonContent, {
98
- transform: [{
99
- scale: scaleAnim
100
- }]
101
- }],
102
- children: [/*#__PURE__*/_jsx(Text, {
103
- style: styles.buttonText,
104
- children: startButtonText
105
- }), /*#__PURE__*/_jsx(Text, {
106
- style: styles.buttonSubtext,
107
- children: startButtonSubtext
108
- })]
109
- })
110
- })
111
- }), isPlaying && /*#__PURE__*/_jsx(Animated.View, {
112
- style: [styles.stopButtonContainer, {
113
- shadowColor: glowColor
114
- }],
115
- children: /*#__PURE__*/_jsx(TouchableOpacity, {
116
- style: [styles.button, styles.stopButton, {
117
- backgroundColor: stopButtonColor,
118
- borderColor: stopButtonBorderColor
119
- }],
120
- onPress: onStopGame,
121
- onPressIn: handlePressIn,
122
- onPressOut: handlePressOut,
123
- activeOpacity: 0.8,
124
- children: /*#__PURE__*/_jsxs(Animated.View, {
125
- style: [styles.buttonContent, {
126
- transform: [{
127
- scale: scaleAnim
128
- }]
129
- }],
130
- children: [/*#__PURE__*/_jsx(Text, {
131
- style: styles.buttonText,
132
- children: stopButtonText
133
- }), /*#__PURE__*/_jsx(Text, {
134
- style: styles.buttonSubtext,
135
- children: stopButtonSubtext
136
- })]
137
- })
138
- })
139
- })]
140
- })
141
- });
142
- });
143
- const styles = StyleSheet.create({
144
- controlButtonContainer: {
145
- position: 'absolute',
146
- bottom: 0,
147
- left: 20,
148
- right: 20,
149
- zIndex: 100,
150
- pointerEvents: 'box-none' // Allow touches on button but pass through elsewhere
151
- },
152
- gameControls: {
153
- justifyContent: 'center',
154
- alignItems: 'center',
155
- paddingVertical: 20,
156
- paddingHorizontal: 20
157
- },
158
- button: {
159
- paddingHorizontal: 32,
160
- paddingVertical: 20,
161
- borderRadius: 30,
162
- shadowColor: '#000',
163
- shadowOffset: {
164
- width: 0,
165
- height: 8
166
- },
167
- shadowOpacity: 0.4,
168
- shadowRadius: 12,
169
- elevation: 8,
170
- justifyContent: 'center',
171
- alignItems: 'center',
172
- minHeight: 70,
173
- minWidth: 200,
174
- borderWidth: 3,
175
- position: 'relative',
176
- overflow: 'hidden'
177
- },
178
- startButton: {
179
- // Colors will be applied via props
180
- },
181
- stopButton: {
182
- // Colors will be applied via props
183
- },
184
- stopButtonContainer: {
185
- shadowOffset: {
186
- width: 0,
187
- height: 0
188
- },
189
- shadowOpacity: 0.6,
190
- shadowRadius: 20,
191
- elevation: 10
192
- },
193
- buttonContent: {
194
- alignItems: 'center',
195
- justifyContent: 'center'
196
- },
197
- buttonText: {
198
- fontSize: 20,
199
- fontWeight: '800',
200
- color: '#ffffff',
201
- textAlign: 'center',
202
- textShadowColor: 'rgba(0, 0, 0, 0.3)',
203
- textShadowOffset: {
204
- width: 1,
205
- height: 1
206
- },
207
- textShadowRadius: 2,
208
- letterSpacing: 1
209
- },
210
- buttonSubtext: {
211
- fontSize: 12,
212
- fontWeight: '600',
213
- color: 'rgba(255, 255, 255, 0.8)',
214
- textAlign: 'center',
215
- marginTop: 4,
216
- letterSpacing: 0.5
217
- }
218
- });
219
- //# sourceMappingURL=GameControlButton.js.map
1
+ "use strict";import React,{useRef,useEffect,useMemo}from 'react';import{View,TouchableOpacity,Text,StyleSheet,Animated}from 'react-native';import{jsx as _jsx,jsxs as _jsxs}from "react/jsx-runtime";export const GameControlButton = React.memo(({isPlaying,gameOver,onStartGame,onStopGame,startButtonText = 'START GAME',stopButtonText = 'STOP GAME',startButtonSubtext = 'Begin playing!',stopButtonSubtext = 'End current game',startButtonColor = '#10b981',stopButtonColor = '#dc2626',startButtonBorderColor = '#34d399',stopButtonBorderColor = '#f87171'})=>{const scaleAnim = useRef(new Animated.Value(1)).current;const pulseAnim = useRef(new Animated.Value(1)).current;const glowAnim = useRef(new Animated.Value(0)).current;useEffect(()=>{if(!isPlaying){const pulseAnimation = Animated.loop(Animated.sequence([Animated.timing(pulseAnim,{toValue:1.05,duration:1000,useNativeDriver:true}),Animated.timing(pulseAnim,{toValue:1,duration:1000,useNativeDriver:true})]));pulseAnimation.start();return()=> pulseAnimation.stop();}return()=>{};},[isPlaying,gameOver,pulseAnim]);useEffect(()=>{if(isPlaying){const glowAnimation = Animated.loop(Animated.sequence([Animated.timing(glowAnim,{toValue:1,duration:800,useNativeDriver:false}),Animated.timing(glowAnim,{toValue:0,duration:800,useNativeDriver:false})]));glowAnimation.start();return()=> glowAnimation.stop();}return()=>{};},[isPlaying,glowAnim]);const handlePressIn =()=>{Animated.spring(scaleAnim,{toValue:0.95,useNativeDriver:true}).start();};const handlePressOut =()=>{Animated.spring(scaleAnim,{toValue:1,friction:3,tension:40,useNativeDriver:true}).start();};const glowColor = useMemo(()=> glowAnim.interpolate({inputRange:[0,1],outputRange:[`${stopButtonColor}30`,`${stopButtonColor}CC`]}),[glowAnim,stopButtonColor]);return _jsx(View,{style:styles.controlButtonContainer,children:_jsxs(View,{style:styles.gameControls,children:[!isPlaying && _jsx(Animated.View,{style:[{transform:[{scale:pulseAnim}]}],children:_jsx(TouchableOpacity,{style:[styles.button,styles.startButton,{backgroundColor:startButtonColor,borderColor:startButtonBorderColor}],onPress:onStartGame,onPressIn:handlePressIn,onPressOut:handlePressOut,activeOpacity:0.8,children:_jsxs(Animated.View,{style:[styles.buttonContent,{transform:[{scale:scaleAnim}]}],children:[_jsx(Text,{style:styles.buttonText,children:startButtonText}),_jsx(Text,{style:styles.buttonSubtext,children:startButtonSubtext})]})})}),isPlaying && _jsx(Animated.View,{style:[styles.stopButtonContainer,{shadowColor:glowColor}],children:_jsx(TouchableOpacity,{style:[styles.button,styles.stopButton,{backgroundColor:stopButtonColor,borderColor:stopButtonBorderColor}],onPress:onStopGame,onPressIn:handlePressIn,onPressOut:handlePressOut,activeOpacity:0.8,children:_jsxs(Animated.View,{style:[styles.buttonContent,{transform:[{scale:scaleAnim}]}],children:[_jsx(Text,{style:styles.buttonText,children:stopButtonText}),_jsx(Text,{style:styles.buttonSubtext,children:stopButtonSubtext})]})})})]})});});const styles = StyleSheet.create({controlButtonContainer:{position:'absolute',bottom:0,left:20,right:20,zIndex:100,pointerEvents:'box-none'},gameControls:{justifyContent:'center',alignItems:'center',paddingVertical:20,paddingHorizontal:20},button:{paddingHorizontal:32,paddingVertical:20,borderRadius:30,shadowColor:'#000',shadowOffset:{width:0,height:8},shadowOpacity:0.4,shadowRadius:12,elevation:8,justifyContent:'center',alignItems:'center',minHeight:70,minWidth:200,borderWidth:3,position:'relative',overflow:'hidden'},startButton:{},stopButton:{},stopButtonContainer:{shadowOffset:{width:0,height:0},shadowOpacity:0.6,shadowRadius:20,elevation:10},buttonContent:{alignItems:'center',justifyContent:'center'},buttonText:{fontSize:20,fontWeight:'800',color:'#ffffff',textAlign:'center',textShadowColor:'rgba(0,0,0,0.3)',textShadowOffset:{width:1,height:1},textShadowRadius:2,letterSpacing:1},buttonSubtext:{fontSize:12,fontWeight:'600',color:'rgba(255,255,255,0.8)',textAlign:'center',marginTop:4,letterSpacing:0.5}});
@@ -1,144 +1 @@
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 = /*#__PURE__*/React.memo(({
7
- isVisible,
8
- score,
9
- onPlayAgain,
10
- buttonText = "Play Again",
11
- primaryColor = "rgba(59, 130, 246, 0.8)",
12
- // Default blue
13
- borderColor = "rgba(59, 130, 246, 0.9)",
14
- buttonColor = "#10b981",
15
- // Default green
16
- buttonBorderColor = "#34d399",
17
- scoreLabel = "Final Score",
18
- scoreFormatter
19
- }) => {
20
- const displayScore = scoreFormatter ? scoreFormatter(score) : score.toString();
21
- return /*#__PURE__*/_jsx(Modal, {
22
- visible: isVisible,
23
- animationType: "fade",
24
- transparent: true,
25
- onRequestClose: onPlayAgain,
26
- children: /*#__PURE__*/_jsx(View, {
27
- style: styles.gameOverOverlay,
28
- children: /*#__PURE__*/_jsx(View, {
29
- style: [styles.gameOverModal, {
30
- backgroundColor: primaryColor,
31
- borderColor: borderColor
32
- }],
33
- children: /*#__PURE__*/_jsxs(View, {
34
- style: styles.modalContent,
35
- children: [/*#__PURE__*/_jsx(Text, {
36
- style: styles.gameOverTitle,
37
- children: "Game Over!"
38
- }), /*#__PURE__*/_jsxs(View, {
39
- style: [styles.finalScoreContainer, {
40
- backgroundColor: borderColor // Use border color for inner panel
41
- }],
42
- children: [/*#__PURE__*/_jsx(Text, {
43
- style: styles.finalScoreLabel,
44
- children: scoreLabel
45
- }), /*#__PURE__*/_jsx(Text, {
46
- style: styles.finalScoreValue,
47
- children: displayScore
48
- })]
49
- }), /*#__PURE__*/_jsx(View, {
50
- style: styles.playAgainContainer,
51
- children: /*#__PURE__*/_jsx(TouchableOpacity, {
52
- style: [styles.playAgainButton, {
53
- backgroundColor: buttonColor,
54
- borderColor: buttonBorderColor
55
- }],
56
- onPress: onPlayAgain,
57
- children: /*#__PURE__*/_jsx(Text, {
58
- style: styles.buttonText,
59
- children: buttonText
60
- })
61
- })
62
- })]
63
- })
64
- })
65
- })
66
- });
67
- });
68
- const styles = StyleSheet.create({
69
- gameOverOverlay: {
70
- flex: 1,
71
- justifyContent: 'center',
72
- alignItems: 'center',
73
- backgroundColor: 'rgba(0, 0, 0, 0.5)' // Semi-transparent overlay
74
- },
75
- gameOverModal: {
76
- borderRadius: 24,
77
- minWidth: '80%',
78
- shadowColor: '#000',
79
- shadowOffset: {
80
- width: 0,
81
- height: 8
82
- },
83
- shadowOpacity: 0.4,
84
- shadowRadius: 12,
85
- elevation: 12,
86
- borderWidth: 3
87
- },
88
- modalContent: {
89
- padding: 40,
90
- alignItems: 'center'
91
- },
92
- gameOverTitle: {
93
- fontSize: 30,
94
- fontWeight: 'bold',
95
- color: '#ffffff',
96
- marginBottom: 32,
97
- textAlign: 'center'
98
- },
99
- finalScoreContainer: {
100
- alignItems: 'center',
101
- marginBottom: 32,
102
- borderRadius: 16,
103
- padding: 20,
104
- minWidth: 150
105
- },
106
- finalScoreLabel: {
107
- fontSize: 18,
108
- color: '#ffffff',
109
- fontWeight: 'bold',
110
- marginBottom: 8
111
- },
112
- finalScoreValue: {
113
- fontSize: 48,
114
- color: '#facc15',
115
- // Golden yellow for score
116
- fontWeight: 'bold',
117
- textAlign: 'center'
118
- },
119
- playAgainContainer: {
120
- alignItems: 'center'
121
- },
122
- playAgainButton: {
123
- paddingHorizontal: 40,
124
- paddingVertical: 20,
125
- borderRadius: 24,
126
- shadowColor: '#000',
127
- shadowOffset: {
128
- width: 0,
129
- height: 2
130
- },
131
- shadowOpacity: 0.25,
132
- shadowRadius: 3.84,
133
- elevation: 5,
134
- borderWidth: 2
135
- },
136
- buttonText: {
137
- fontSize: 18,
138
- fontWeight: 'bold',
139
- color: '#ffffff',
140
- textAlign: 'center',
141
- lineHeight: 24
142
- }
143
- });
144
- //# sourceMappingURL=GameOverModal.js.map
1
+ "use strict";import React from 'react';import{View,TouchableOpacity,Text,StyleSheet,Modal}from 'react-native';import{jsx as _jsx,jsxs as _jsxs}from "react/jsx-runtime";export const GameOverModal = React.memo(({isVisible,score,onPlayAgain,buttonText = "Play Again",primaryColor = "rgba(59,130,246,0.8)",borderColor = "rgba(59,130,246,0.9)",buttonColor = "#10b981",buttonBorderColor = "#34d399",buttonTextColor = "#ffffff",scoreLabel = "Final Score",scoreFormatter})=>{const displayScore = scoreFormatter ? scoreFormatter(score):score.toString();return _jsx(Modal,{visible:isVisible,animationType:"fade",transparent:true,onRequestClose:onPlayAgain,children:_jsx(View,{style:styles.gameOverOverlay,children:_jsx(View,{style:[styles.gameOverModal,{backgroundColor:primaryColor,borderColor:borderColor}],children:_jsxs(View,{style:styles.modalContent,children:[_jsx(Text,{style:styles.gameOverTitle,children:"Game Over!"}),_jsxs(View,{style:[styles.finalScoreContainer,{backgroundColor:'rgba(255,255,255,0.2)'}],children:[_jsx(Text,{style:styles.finalScoreLabel,children:scoreLabel}),_jsx(Text,{style:styles.finalScoreValue,children:displayScore})]}),_jsx(View,{style:styles.playAgainContainer,children:_jsx(TouchableOpacity,{style:[styles.playAgainButton,{backgroundColor:buttonColor,borderColor:buttonBorderColor}],onPress:onPlayAgain,activeOpacity:0.8,children:_jsx(Text,{style:[styles.buttonText,{color:buttonTextColor}],children:buttonText})})})]})})})});});const styles = StyleSheet.create({gameOverOverlay:{flex:1,justifyContent:'center',alignItems:'center',backgroundColor:'rgba(0,0,0,0.8)'},gameOverModal:{borderRadius:24,minWidth:'80%',elevation:12},modalContent:{padding:40,alignItems:'center'},gameOverTitle:{fontSize:30,fontWeight:'bold',color:'#ffffff',marginBottom:32,textAlign:'center'},finalScoreContainer:{alignItems:'center',marginBottom:32,borderRadius:16,padding:20,minWidth:150},finalScoreLabel:{fontSize:18,color:'#ffffff',fontWeight:'bold',marginBottom:8},finalScoreValue:{fontSize:48,color:'#facc15',fontWeight:'bold',textAlign:'center'},playAgainContainer:{alignItems:'center'},playAgainButton:{paddingHorizontal:40,paddingVertical:20,borderRadius:24,shadowColor:'#000',shadowOffset:{width:0,height:2},shadowOpacity:0.25,shadowRadius:3.84,elevation:5,borderWidth:2},buttonText:{fontSize:18,fontWeight:'bold',color:'#ffffff',textAlign:'center',lineHeight:24}});
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","TouchableOpacity","Text","StyleSheet","Modal","jsx","_jsx","jsxs","_jsxs","GameOverModal","memo","isVisible","score","onPlayAgain","buttonText","primaryColor","borderColor","buttonColor","buttonBorderColor","scoreLabel","scoreFormatter","displayScore","toString","visible","animationType","transparent","onRequestClose","children","style","styles","gameOverOverlay","gameOverModal","backgroundColor","modalContent","gameOverTitle","finalScoreContainer","finalScoreLabel","finalScoreValue","playAgainContainer","playAgainButton","onPress","create","flex","justifyContent","alignItems","borderRadius","minWidth","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","borderWidth","padding","fontSize","fontWeight","color","marginBottom","textAlign","paddingHorizontal","paddingVertical","lineHeight"],"sourceRoot":"../../../src","sources":["helpers/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;AAe/E,OAAO,MAAMC,aAA2C,gBAAGV,KAAK,CAACW,IAAI,CAAC,CAAC;EACrEC,SAAS;EACTC,KAAK;EACLC,WAAW;EACXC,UAAU,GAAG,YAAY;EACzBC,YAAY,GAAG,yBAAyB;EAAE;EAC1CC,WAAW,GAAG,yBAAyB;EACvCC,WAAW,GAAG,SAAS;EAAE;EACzBC,iBAAiB,GAAG,SAAS;EAC7BC,UAAU,GAAG,aAAa;EAC1BC;AACF,CAAC,KAAK;EACJ,MAAMC,YAAY,GAAGD,cAAc,GAAGA,cAAc,CAACR,KAAK,CAAC,GAAGA,KAAK,CAACU,QAAQ,CAAC,CAAC;EAC9E,oBACEhB,IAAA,CAACF,KAAK;IACJmB,OAAO,EAAEZ,SAAU;IACnBa,aAAa,EAAC,MAAM;IACpBC,WAAW,EAAE,IAAK;IAClBC,cAAc,EAAEb,WAAY;IAAAc,QAAA,eAE5BrB,IAAA,CAACN,IAAI;MAAC4B,KAAK,EAAEC,MAAM,CAACC,eAAgB;MAAAH,QAAA,eAClCrB,IAAA,CAACN,IAAI;QAAC4B,KAAK,EAAE,CAACC,MAAM,CAACE,aAAa,EAAE;UAClCC,eAAe,EAAEjB,YAAY;UAC7BC,WAAW,EAAEA;QACf,CAAC,CAAE;QAAAW,QAAA,eACDnB,KAAA,CAACR,IAAI;UAAC4B,KAAK,EAAEC,MAAM,CAACI,YAAa;UAAAN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IACZC,UAAU,EAAE,MAAM;IAClBC,KAAK,EAAE,SAAS;IAChBE,SAAS,EAAE,QAAQ;IACnBG,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","View","TouchableOpacity","Text","StyleSheet","Modal","jsx","_jsx","jsxs","_jsxs","GameOverModal","memo","isVisible","score","onPlayAgain","buttonText","primaryColor","borderColor","buttonColor","buttonBorderColor","buttonTextColor","scoreLabel","scoreFormatter","displayScore","toString","visible","animationType","transparent","onRequestClose","children","style","styles","gameOverOverlay","gameOverModal","backgroundColor","modalContent","gameOverTitle","finalScoreContainer","finalScoreLabel","finalScoreValue","playAgainContainer","playAgainButton","onPress","activeOpacity","color","create","flex","justifyContent","alignItems","borderRadius","minWidth","elevation","padding","fontSize","fontWeight","marginBottom","textAlign","paddingHorizontal","paddingVertical","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","borderWidth","lineHeight"],"sourceRoot":"../../../src","sources":["helpers/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;AAkB/E,OAAO,MAAMC,aAA2C,gBAAGV,KAAK,CAACW,IAAI,CAAC,CAAC;EACrEC,SAAS;EACTC,KAAK;EACLC,WAAW;EACXC,UAAU,GAAG,YAAY;EACzBC,YAAY,GAAG,yBAAyB;EAAE;EAC1CC,WAAW,GAAG,yBAAyB;EACvCC,WAAW,GAAG,SAAS;EAAE;EACzBC,iBAAiB,GAAG,SAAS;EAC7BC,eAAe,GAAG,SAAS;EAAE;EAC7BC,UAAU,GAAG,aAAa;EAC1BC;AACF,CAAC,KAAK;EACJ,MAAMC,YAAY,GAAGD,cAAc,GAAGA,cAAc,CAACT,KAAK,CAAC,GAAGA,KAAK,CAACW,QA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