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.
- package/README.md +101 -30
- package/lib/module/games/balloon-blaster/BalloonBlaster.js +1 -167
- package/lib/module/games/balloon-blaster/BalloonBlaster.js.map +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +1 -182
- package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js.map +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterService.js +1 -318
- package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +1 -183
- package/lib/module/games/balloon-blaster/components/BalloonComponent.js +1 -237
- package/lib/module/games/balloon-blaster/components/GameArea.js +1 -156
- package/lib/module/games/balloon-blaster/components/GameBackground.js +1 -476
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js +1 -112
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/balloon-blaster/components/index.js +1 -7
- package/lib/module/games/bike-racing/BikeRacing.js +1 -0
- package/lib/module/games/bike-racing/BikeRacing.js.map +1 -0
- package/lib/module/games/bike-racing/BikeRacingConstants.js +1 -0
- package/lib/module/games/bike-racing/BikeRacingConstants.js.map +1 -0
- package/lib/module/games/bike-racing/BikeRacingService.js +1 -0
- package/lib/module/games/bike-racing/BikeRacingService.js.map +1 -0
- package/lib/module/games/bike-racing/BikeRacingStore.js +1 -0
- package/lib/module/games/bike-racing/BikeRacingStore.js.map +1 -0
- package/lib/module/games/bike-racing/components/BikeComponent.js +1 -0
- package/lib/module/games/bike-racing/components/BikeComponent.js.map +1 -0
- package/lib/module/games/bike-racing/components/GameBackground.js +1 -0
- package/lib/module/games/bike-racing/components/GameBackground.js.map +1 -0
- package/lib/module/games/bike-racing/components/ScoreBoard.js +1 -0
- package/lib/module/games/bike-racing/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/bike-racing/components/index.js +1 -0
- package/lib/module/games/bike-racing/components/index.js.map +1 -0
- package/lib/module/games/bike-racing/index.js +1 -0
- package/lib/module/games/bike-racing/index.js.map +1 -0
- package/lib/module/games/block-blast/BlockBlast.js +1 -0
- package/lib/module/games/block-blast/BlockBlast.js.map +1 -0
- package/lib/module/games/block-blast/BlockBlastConstants.js +1 -0
- package/lib/module/games/block-blast/BlockBlastConstants.js.map +1 -0
- package/lib/module/games/block-blast/BlockBlastService.js +1 -0
- package/lib/module/games/block-blast/BlockBlastService.js.map +1 -0
- package/lib/module/games/block-blast/BlockBlastStore.js +1 -0
- package/lib/module/games/block-blast/BlockBlastStore.js.map +1 -0
- package/lib/module/games/block-blast/components/BlockPieceComponent.js +1 -0
- package/lib/module/games/block-blast/components/BlockPieceComponent.js.map +1 -0
- package/lib/module/games/block-blast/components/GameArea.js +1 -0
- package/lib/module/games/block-blast/components/GameArea.js.map +1 -0
- package/lib/module/games/block-blast/components/GameBackground.js +1 -0
- package/lib/module/games/block-blast/components/GameBackground.js.map +1 -0
- package/lib/module/games/block-blast/components/GridComponent.js +1 -0
- package/lib/module/games/block-blast/components/GridComponent.js.map +1 -0
- package/lib/module/games/block-blast/components/ScoreBoard.js +1 -0
- package/lib/module/games/block-blast/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/block-blast/components/index.js +1 -0
- package/lib/module/games/block-blast/components/index.js.map +1 -0
- package/lib/module/games/block-blast/index.js +1 -0
- package/lib/module/games/block-blast/index.js.map +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooter.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooter.js.map +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooterConstants.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooterConstants.js.map +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooterService.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooterService.js.map +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooterStore.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooterStore.js.map +1 -0
- package/lib/module/games/bubble-shooter/components/GameArea.js +1 -0
- package/lib/module/games/bubble-shooter/components/GameArea.js.map +1 -0
- package/lib/module/games/bubble-shooter/components/GameBackground.js +1 -0
- package/lib/module/games/bubble-shooter/components/GameBackground.js.map +1 -0
- package/lib/module/games/bubble-shooter/components/ScoreBoard.js +1 -0
- package/lib/module/games/bubble-shooter/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/bubble-shooter/components/index.js +1 -0
- package/lib/module/games/bubble-shooter/components/index.js.map +1 -0
- package/lib/module/games/bubble-shooter/index.js +1 -0
- package/lib/module/games/bubble-shooter/index.js.map +1 -0
- package/lib/module/games/candy-crush/CandyCrush.js +1 -131
- package/lib/module/games/candy-crush/CandyCrush.js.map +1 -1
- package/lib/module/games/candy-crush/CandyCrushConstants.js +1 -125
- package/lib/module/games/candy-crush/CandyCrushConstants.js.map +1 -1
- package/lib/module/games/candy-crush/CandyCrushService.js +1 -370
- package/lib/module/games/candy-crush/CandyCrushStore.js +1 -303
- package/lib/module/games/candy-crush/components/CandyItem.js +1 -191
- package/lib/module/games/candy-crush/components/GameBackground.js +1 -85
- package/lib/module/games/candy-crush/components/GameGrid.js +1 -314
- package/lib/module/games/candy-crush/components/ScoreBoard.js +1 -79
- package/lib/module/games/candy-crush/components/index.js +1 -7
- package/lib/module/games/candy-crush/index.js +1 -6
- package/lib/module/games/car-racing/CarRacing.js +1 -0
- package/lib/module/games/car-racing/CarRacing.js.map +1 -0
- package/lib/module/games/car-racing/CarRacingConstants.js +1 -0
- package/lib/module/games/car-racing/CarRacingConstants.js.map +1 -0
- package/lib/module/games/car-racing/CarRacingService.js +1 -0
- package/lib/module/games/car-racing/CarRacingService.js.map +1 -0
- package/lib/module/games/car-racing/CarRacingStore.js +1 -0
- package/lib/module/games/car-racing/CarRacingStore.js.map +1 -0
- package/lib/module/games/car-racing/components/CarComponent.js +1 -0
- package/lib/module/games/car-racing/components/CarComponent.js.map +1 -0
- package/lib/module/games/car-racing/components/GameBackground.js +1 -0
- package/lib/module/games/car-racing/components/GameBackground.js.map +1 -0
- package/lib/module/games/car-racing/components/ScoreBoard.js +1 -0
- package/lib/module/games/car-racing/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/car-racing/components/index.js +1 -0
- package/lib/module/games/car-racing/components/index.js.map +1 -0
- package/lib/module/games/colors-sort/ColorsSort.js +1 -143
- package/lib/module/games/colors-sort/ColorsSort.js.map +1 -1
- package/lib/module/games/colors-sort/ColorsSortConstants.js +1 -72
- package/lib/module/games/colors-sort/ColorsSortConstants.js.map +1 -1
- package/lib/module/games/colors-sort/ColorsSortService.js +1 -255
- package/lib/module/games/colors-sort/ColorsSortStore.js +1 -257
- package/lib/module/games/colors-sort/ColorsSortStore.js.map +1 -1
- package/lib/module/games/colors-sort/components/ColorContainer.js +1 -140
- package/lib/module/games/colors-sort/components/GameBackground.js +1 -135
- package/lib/module/games/colors-sort/components/ScoreBoard.js +1 -70
- package/lib/module/games/colors-sort/components/index.js +1 -6
- package/lib/module/games/dino-jump/DinoJump.js +1 -209
- package/lib/module/games/dino-jump/DinoJump.js.map +1 -1
- package/lib/module/games/dino-jump/DinoJumpConstants.js +1 -189
- package/lib/module/games/dino-jump/DinoJumpConstants.js.map +1 -1
- package/lib/module/games/dino-jump/DinoJumpService.js +1 -270
- package/lib/module/games/dino-jump/DinoJumpStore.js +1 -381
- package/lib/module/games/dino-jump/components/DinoSprite.js +1 -418
- package/lib/module/games/dino-jump/components/DinoSprite.js.map +1 -1
- package/lib/module/games/dino-jump/components/GameArea.js +1 -68
- package/lib/module/games/dino-jump/components/GameBackground.js +1 -444
- package/lib/module/games/dino-jump/components/ObstacleSprite.js +1 -306
- package/lib/module/games/dino-jump/components/ScoreBoard.js +1 -105
- package/lib/module/games/dino-jump/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/dino-jump/components/StarSprite.js +1 -45
- package/lib/module/games/dino-jump/components/index.js +1 -9
- package/lib/module/games/flappy-bird/FlappyBird.js +1 -126
- package/lib/module/games/flappy-bird/FlappyBird.js.map +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdConstants.js +1 -90
- package/lib/module/games/flappy-bird/FlappyBirdConstants.js.map +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdStore.js +1 -300
- package/lib/module/games/flappy-bird/components/Bird.js +1 -87
- package/lib/module/games/flappy-bird/components/GameArea.js +1 -87
- package/lib/module/games/flappy-bird/components/GameBackground.js +1 -79
- package/lib/module/games/flappy-bird/components/Pipes.js +1 -172
- package/lib/module/games/flappy-bird/components/ScoreBoard.js +1 -73
- package/lib/module/games/flappy-bird/components/index.js +1 -8
- package/lib/module/games/fruit-merger/FruitMerger.js +1 -120
- package/lib/module/games/fruit-merger/FruitMerger.js.map +1 -1
- package/lib/module/games/fruit-merger/FruitMergerConstants.js +1 -119
- package/lib/module/games/fruit-merger/FruitMergerConstants.js.map +1 -1
- package/lib/module/games/fruit-merger/FruitMergerService.js +1 -13
- package/lib/module/games/fruit-merger/FruitMergerStore.js +1 -315
- package/lib/module/games/fruit-merger/components/FruitItem.js +1 -102
- package/lib/module/games/fruit-merger/components/GameArea.js +1 -103
- package/lib/module/games/fruit-merger/components/GameBackground.js +1 -498
- package/lib/module/games/fruit-merger/components/ScoreBoard.js +1 -58
- package/lib/module/games/fruit-merger/components/index.js +1 -7
- package/lib/module/games/fruit-ninja/FruitNinja.js +1 -134
- package/lib/module/games/fruit-ninja/FruitNinja.js.map +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +1 -148
- package/lib/module/games/fruit-ninja/FruitNinjaConstants.js.map +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaService.js +1 -311
- package/lib/module/games/fruit-ninja/FruitNinjaStore.js +1 -191
- package/lib/module/games/fruit-ninja/FruitNinjaStore.js.map +1 -1
- package/lib/module/games/fruit-ninja/components/FruitComponent.js +1 -99
- package/lib/module/games/fruit-ninja/components/GameArea.js +1 -215
- package/lib/module/games/fruit-ninja/components/GameBackground.js +1 -1267
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js +1 -92
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/fruit-ninja/components/index.js +1 -7
- package/lib/module/games/game-2048/Game2048.js +1 -149
- package/lib/module/games/game-2048/Game2048.js.map +1 -1
- package/lib/module/games/game-2048/Game2048Constants.js +1 -263
- package/lib/module/games/game-2048/Game2048Constants.js.map +1 -1
- package/lib/module/games/game-2048/Game2048Service.js +1 -457
- package/lib/module/games/game-2048/Game2048Store.js +1 -236
- package/lib/module/games/game-2048/components/GameBackground.js +1 -247
- package/lib/module/games/game-2048/components/GameGrid.js +1 -139
- package/lib/module/games/game-2048/components/GameTile.js +1 -72
- package/lib/module/games/game-2048/components/ScoreBoard.js +1 -52
- package/lib/module/games/game-2048/components/index.js +1 -7
- package/lib/module/games/maze-runner/MazeRunner.js +1 -267
- package/lib/module/games/maze-runner/MazeRunner.js.map +1 -1
- package/lib/module/games/maze-runner/MazeRunnerConstants.js +1 -100
- package/lib/module/games/maze-runner/MazeRunnerConstants.js.map +1 -1
- package/lib/module/games/maze-runner/MazeRunnerService.js +1 -586
- package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +1 -150
- package/lib/module/games/maze-runner/components/EnhancedGameArea.js +1 -370
- package/lib/module/games/maze-runner/components/GameBackground.js +1 -175
- package/lib/module/games/maze-runner/components/ScoreBoard.js +1 -61
- package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +1 -209
- package/lib/module/games/maze-runner/components/StaticGameBackground.js +1 -169
- package/lib/module/games/maze-runner/components/WallComponent.js +1 -91
- package/lib/module/games/maze-runner/components/index.js +1 -8
- package/lib/module/games/perfect-circle/PerfectCircle.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircle.js.map +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleConstants.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleConstants.js.map +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleService.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleService.js.map +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleStore.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleStore.js.map +1 -0
- package/lib/module/games/perfect-circle/components/DrawingCanvas.js +1 -0
- package/lib/module/games/perfect-circle/components/DrawingCanvas.js.map +1 -0
- package/lib/module/games/perfect-circle/components/GameBackground.js +1 -0
- package/lib/module/games/perfect-circle/components/GameBackground.js.map +1 -0
- package/lib/module/games/perfect-circle/components/ScoreBoard.js +1 -0
- package/lib/module/games/perfect-circle/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/perfect-circle/index.js +1 -0
- package/lib/module/games/perfect-circle/index.js.map +1 -0
- package/lib/module/games/popit-fidget/PopitFidget.js +1 -285
- package/lib/module/games/popit-fidget/PopitFidget.js.map +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetConstants.js +1 -113
- package/lib/module/games/popit-fidget/PopitFidgetConstants.js.map +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetService.js +1 -132
- package/lib/module/games/popit-fidget/PopitFidgetStore.js +1 -125
- package/lib/module/games/popit-fidget/components/BubbleComponent.js +1 -198
- package/lib/module/games/popit-fidget/components/FidgetGrid.js +1 -165
- package/lib/module/games/popit-fidget/components/GameBackground.js +1 -177
- package/lib/module/games/popit-fidget/components/ScoreBoard.js +1 -61
- package/lib/module/games/popit-fidget/components/index.js +1 -7
- package/lib/module/games/sliding-numbers/SlidingNumbers.js +1 -159
- package/lib/module/games/sliding-numbers/SlidingNumbers.js.map +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +1 -207
- package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js.map +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersService.js +1 -248
- package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +1 -274
- package/lib/module/games/sliding-numbers/components/GameBackground.js +1 -259
- package/lib/module/games/sliding-numbers/components/NumbersGrid.js +1 -174
- package/lib/module/games/sliding-numbers/components/NumbersTile.js +1 -116
- package/lib/module/games/sliding-numbers/components/ScoreBoard.js +1 -64
- package/lib/module/games/sliding-numbers/components/index.js +1 -7
- package/lib/module/games/snake/Snake.js +1 -189
- package/lib/module/games/snake/Snake.js.map +1 -1
- package/lib/module/games/snake/SnakeConstants.js +1 -138
- package/lib/module/games/snake/SnakeConstants.js.map +1 -1
- package/lib/module/games/snake/SnakeService.js +1 -148
- package/lib/module/games/snake/SnakeStore.js +1 -182
- package/lib/module/games/snake/SnakeStore.js.map +1 -1
- package/lib/module/games/snake/components/GameBackground.js +1 -221
- package/lib/module/games/snake/components/GameGrid.js +1 -153
- package/lib/module/games/snake/components/ScoreBoard.js +1 -51
- package/lib/module/games/snake/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/snake/components/index.js +1 -6
- package/lib/module/games/snake/index.js +1 -6
- package/lib/module/games/space-fighter/SpaceFighter.js +1 -165
- package/lib/module/games/space-fighter/SpaceFighter.js.map +1 -1
- package/lib/module/games/space-fighter/SpaceFighterConstants.js +1 -108
- package/lib/module/games/space-fighter/SpaceFighterConstants.js.map +1 -1
- package/lib/module/games/space-fighter/SpaceFighterService.js +1 -326
- package/lib/module/games/space-fighter/SpaceFighterStore.js +1 -209
- package/lib/module/games/space-fighter/components/AsteroidComponent.js +1 -113
- package/lib/module/games/space-fighter/components/GameArea.js +1 -289
- package/lib/module/games/space-fighter/components/GameBackground.js +1 -239
- package/lib/module/games/space-fighter/components/ScoreBoard.js +1 -136
- package/lib/module/games/space-fighter/components/Spacecraft3D.js +1 -202
- package/lib/module/games/space-fighter/components/SpacecraftPath.js +1 -52
- package/lib/module/games/space-fighter/components/index.js +1 -9
- package/lib/module/games/whack-a-mole/WhackAMole.js +1 -270
- package/lib/module/games/whack-a-mole/WhackAMole.js.map +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +1 -115
- package/lib/module/games/whack-a-mole/WhackAMoleConstants.js.map +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleService.js +1 -120
- package/lib/module/games/whack-a-mole/WhackAMoleStore.js +1 -172
- package/lib/module/games/whack-a-mole/components/GameBackground.js +1 -477
- package/lib/module/games/whack-a-mole/components/GameGrid.js +1 -97
- package/lib/module/games/whack-a-mole/components/GameHole.js +1 -196
- package/lib/module/games/whack-a-mole/components/MoleCharacter.js +1 -241
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js +1 -67
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/whack-a-mole/components/index.js +1 -8
- package/lib/module/helpers/AnimationFrame.js +1 -120
- package/lib/module/helpers/AnimationTracker.js +1 -89
- package/lib/module/helpers/ErrorHandler.js +1 -269
- package/lib/module/helpers/GameControlButton.js +1 -219
- package/lib/module/helpers/GameOverModal.js +1 -144
- package/lib/module/helpers/GameOverModal.js.map +1 -1
- package/lib/module/helpers/GameSettingsModal.js +1 -287
- package/lib/module/helpers/GameSettingsModal.js.map +1 -1
- package/lib/module/helpers/ParticleBlast.js +1 -134
- package/lib/module/helpers/ScoreBoardContainer.js +1 -34
- package/lib/module/helpers/ScoreBoardContainer.js.map +1 -1
- package/lib/module/helpers/index.js +1 -12
- package/lib/module/index.js +1 -22
- package/lib/module/index.js.map +1 -1
- package/lib/module/services/GamesConstants.js +1 -178
- package/lib/module/services/GamesConstants.js.map +1 -1
- package/lib/module/services/GamesService.js +1 -112
- package/lib/module/services/GamesService.js.map +1 -1
- package/lib/module/services/HapticsService.js +1 -77
- package/lib/module/services/ScoringService.js +1 -0
- package/lib/module/services/ScoringService.js.map +1 -0
- package/lib/module/services/SoundsService.js +1 -302
- package/lib/module/services/SoundsService.js.map +1 -1
- package/lib/module/services/UtilsService.js +1 -32
- package/lib/module/services/UtilsService.js.map +1 -1
- package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts.map +1 -1
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +1 -1
- package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts +4 -0
- package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts.map +1 -0
- package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts +76 -0
- package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts +22 -0
- package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts.map +1 -0
- package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts +72 -0
- package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts.map +1 -0
- package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts +12 -0
- package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts.map +1 -0
- package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts +9 -0
- package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts +7 -0
- package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/bike-racing/components/index.d.ts +4 -0
- package/lib/typescript/src/games/bike-racing/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/bike-racing/index.d.ts +5 -0
- package/lib/typescript/src/games/bike-racing/index.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/BlockBlast.d.ts +4 -0
- package/lib/typescript/src/games/block-blast/BlockBlast.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts +82 -0
- package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts +17 -0
- package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts +62 -0
- package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts +14 -0
- package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/components/GameArea.d.ts +12 -0
- package/lib/typescript/src/games/block-blast/components/GameArea.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/components/GameBackground.d.ts +7 -0
- package/lib/typescript/src/games/block-blast/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts +17 -0
- package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts +7 -0
- package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/components/index.d.ts +6 -0
- package/lib/typescript/src/games/block-blast/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/block-blast/index.d.ts +5 -0
- package/lib/typescript/src/games/block-blast/index.d.ts.map +1 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts +4 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts.map +1 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts +61 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts +26 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts.map +1 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts +62 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts.map +1 -0
- package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts +9 -0
- package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts.map +1 -0
- package/lib/typescript/src/games/bubble-shooter/components/GameBackground.d.ts +8 -0
- package/lib/typescript/src/games/bubble-shooter/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts +7 -0
- package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/bubble-shooter/components/index.d.ts +4 -0
- package/lib/typescript/src/games/bubble-shooter/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/bubble-shooter/index.d.ts +3 -0
- package/lib/typescript/src/games/bubble-shooter/index.d.ts.map +1 -0
- package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts.map +1 -1
- package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +7 -7
- package/lib/typescript/src/games/car-racing/CarRacing.d.ts +4 -0
- package/lib/typescript/src/games/car-racing/CarRacing.d.ts.map +1 -0
- package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts +76 -0
- package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/car-racing/CarRacingService.d.ts +22 -0
- package/lib/typescript/src/games/car-racing/CarRacingService.d.ts.map +1 -0
- package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts +72 -0
- package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts.map +1 -0
- package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts +13 -0
- package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts.map +1 -0
- package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts +9 -0
- package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts +7 -0
- package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/car-racing/components/index.d.ts +4 -0
- package/lib/typescript/src/games/car-racing/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts.map +1 -1
- package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts.map +1 -1
- package/lib/typescript/src/games/dino-jump/DinoJump.d.ts.map +1 -1
- package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts.map +1 -1
- package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts.map +1 -1
- package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/game-2048/Game2048.d.ts.map +1 -1
- package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts.map +1 -1
- package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts +4 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts.map +1 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts +81 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts +14 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts.map +1 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts +40 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts.map +1 -0
- package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts +9 -0
- package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts.map +1 -0
- package/lib/typescript/src/games/perfect-circle/components/GameBackground.d.ts +8 -0
- package/lib/typescript/src/games/perfect-circle/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts +7 -0
- package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/perfect-circle/index.d.ts +3 -0
- package/lib/typescript/src/games/perfect-circle/index.d.ts.map +1 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts.map +1 -1
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts.map +1 -1
- package/lib/typescript/src/games/snake/Snake.d.ts.map +1 -1
- package/lib/typescript/src/games/snake/SnakeStore.d.ts +4 -0
- package/lib/typescript/src/games/snake/SnakeStore.d.ts.map +1 -1
- package/lib/typescript/src/games/snake/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts.map +1 -1
- package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts.map +1 -1
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +1 -1
- package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/helpers/GameOverModal.d.ts +3 -0
- package/lib/typescript/src/helpers/GameOverModal.d.ts.map +1 -1
- package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +6 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/services/GamesConstants.d.ts +57 -7
- package/lib/typescript/src/services/GamesConstants.d.ts.map +1 -1
- package/lib/typescript/src/services/GamesService.d.ts +2 -1
- package/lib/typescript/src/services/GamesService.d.ts.map +1 -1
- package/lib/typescript/src/services/ScoringService.d.ts +2 -0
- package/lib/typescript/src/services/ScoringService.d.ts.map +1 -0
- package/lib/typescript/src/services/SoundsService.d.ts +88 -0
- package/lib/typescript/src/services/SoundsService.d.ts.map +1 -1
- package/lib/typescript/src/services/UtilsService.d.ts +12 -1
- package/lib/typescript/src/services/UtilsService.d.ts.map +1 -1
- 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","
|
|
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":"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","ignoreList":[]}
|