react-native-games 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +66 -0
- package/README.md +269 -0
- package/lib/module/games/balloon-blaster/BalloonBlaster.js +391 -0
- package/lib/module/games/balloon-blaster/BalloonBlaster.js.map +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlasterService.js +293 -0
- package/lib/module/games/balloon-blaster/BalloonBlasterService.js.map +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +156 -0
- package/lib/module/games/balloon-blaster/BalloonBlasterStore.js.map +1 -0
- package/lib/module/games/balloon-blaster/components/BalloonComponent.js +227 -0
- package/lib/module/games/balloon-blaster/components/BalloonComponent.js.map +1 -0
- package/lib/module/games/balloon-blaster/components/GameArea.js +42 -0
- package/lib/module/games/balloon-blaster/components/GameArea.js.map +1 -0
- package/lib/module/games/balloon-blaster/components/GameBackground.js +544 -0
- package/lib/module/games/balloon-blaster/components/GameBackground.js.map +1 -0
- package/lib/module/games/balloon-blaster/components/GameControls.js +229 -0
- package/lib/module/games/balloon-blaster/components/GameControls.js.map +1 -0
- package/lib/module/games/balloon-blaster/components/GameOverModal.js +133 -0
- package/lib/module/games/balloon-blaster/components/GameOverModal.js.map +1 -0
- package/lib/module/games/balloon-blaster/components/ParticleSystem.js +52 -0
- package/lib/module/games/balloon-blaster/components/ParticleSystem.js.map +1 -0
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js +119 -0
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/balloon-blaster/components/SliceTrail.js +58 -0
- package/lib/module/games/balloon-blaster/components/SliceTrail.js.map +1 -0
- package/lib/module/games/balloon-blaster/components/index.js +11 -0
- package/lib/module/games/balloon-blaster/components/index.js.map +1 -0
- package/lib/module/games/cat-popper/CatPopper.js +230 -0
- package/lib/module/games/cat-popper/CatPopper.js.map +1 -0
- package/lib/module/games/cat-popper/CatPopperService.js +100 -0
- package/lib/module/games/cat-popper/CatPopperService.js.map +1 -0
- package/lib/module/games/cat-popper/CatPopperStore.js +113 -0
- package/lib/module/games/cat-popper/CatPopperStore.js.map +1 -0
- package/lib/module/games/cat-popper/components/CatCharacter.js +281 -0
- package/lib/module/games/cat-popper/components/CatCharacter.js.map +1 -0
- package/lib/module/games/cat-popper/components/GameBackground.js +531 -0
- package/lib/module/games/cat-popper/components/GameBackground.js.map +1 -0
- package/lib/module/games/cat-popper/components/GameControls.js +230 -0
- package/lib/module/games/cat-popper/components/GameControls.js.map +1 -0
- package/lib/module/games/cat-popper/components/GameGrid.js +66 -0
- package/lib/module/games/cat-popper/components/GameGrid.js.map +1 -0
- package/lib/module/games/cat-popper/components/GameHole.js +183 -0
- package/lib/module/games/cat-popper/components/GameHole.js.map +1 -0
- package/lib/module/games/cat-popper/components/GameOverModal.js +131 -0
- package/lib/module/games/cat-popper/components/GameOverModal.js.map +1 -0
- package/lib/module/games/cat-popper/components/ScoreBoard.js +77 -0
- package/lib/module/games/cat-popper/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/cat-popper/components/index.js +10 -0
- package/lib/module/games/cat-popper/components/index.js.map +1 -0
- package/lib/module/games/fruit-slicer/FruitSlicer.js +411 -0
- package/lib/module/games/fruit-slicer/FruitSlicer.js.map +1 -0
- package/lib/module/games/fruit-slicer/FruitSlicerService.js +293 -0
- package/lib/module/games/fruit-slicer/FruitSlicerService.js.map +1 -0
- package/lib/module/games/fruit-slicer/FruitSlicerStore.js +156 -0
- package/lib/module/games/fruit-slicer/FruitSlicerStore.js.map +1 -0
- package/lib/module/games/fruit-slicer/components/FruitComponent.js +99 -0
- package/lib/module/games/fruit-slicer/components/FruitComponent.js.map +1 -0
- package/lib/module/games/fruit-slicer/components/GameArea.js +50 -0
- package/lib/module/games/fruit-slicer/components/GameArea.js.map +1 -0
- package/lib/module/games/fruit-slicer/components/GameBackground.js +1296 -0
- package/lib/module/games/fruit-slicer/components/GameBackground.js.map +1 -0
- package/lib/module/games/fruit-slicer/components/GameControls.js +230 -0
- package/lib/module/games/fruit-slicer/components/GameControls.js.map +1 -0
- package/lib/module/games/fruit-slicer/components/GameOverModal.js +189 -0
- package/lib/module/games/fruit-slicer/components/GameOverModal.js.map +1 -0
- package/lib/module/games/fruit-slicer/components/ParticleSystem.js +52 -0
- package/lib/module/games/fruit-slicer/components/ParticleSystem.js.map +1 -0
- package/lib/module/games/fruit-slicer/components/ScoreBoard.js +121 -0
- package/lib/module/games/fruit-slicer/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/fruit-slicer/components/SliceTrail.js +58 -0
- package/lib/module/games/fruit-slicer/components/SliceTrail.js.map +1 -0
- package/lib/module/games/fruit-slicer/components/index.js +11 -0
- package/lib/module/games/fruit-slicer/components/index.js.map +1 -0
- package/lib/module/games/maze-runner/MazeRunner.js +242 -0
- package/lib/module/games/maze-runner/MazeRunner.js.map +1 -0
- package/lib/module/games/maze-runner/MazeRunnerService.js +560 -0
- package/lib/module/games/maze-runner/MazeRunnerService.js.map +1 -0
- package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +149 -0
- package/lib/module/games/maze-runner/components/EnhancedBallComponent.js.map +1 -0
- package/lib/module/games/maze-runner/components/EnhancedGameArea.js +357 -0
- package/lib/module/games/maze-runner/components/EnhancedGameArea.js.map +1 -0
- package/lib/module/games/maze-runner/components/GameBackground.js +216 -0
- package/lib/module/games/maze-runner/components/GameBackground.js.map +1 -0
- package/lib/module/games/maze-runner/components/GameControls.js +129 -0
- package/lib/module/games/maze-runner/components/GameControls.js.map +1 -0
- package/lib/module/games/maze-runner/components/GameOverModal.js +134 -0
- package/lib/module/games/maze-runner/components/GameOverModal.js.map +1 -0
- package/lib/module/games/maze-runner/components/ScoreBoard.js +81 -0
- package/lib/module/games/maze-runner/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +209 -0
- package/lib/module/games/maze-runner/components/SkiaPipeComponent.js.map +1 -0
- package/lib/module/games/maze-runner/components/StaticGameBackground.js +169 -0
- package/lib/module/games/maze-runner/components/StaticGameBackground.js.map +1 -0
- package/lib/module/games/maze-runner/components/WallComponent.js +90 -0
- package/lib/module/games/maze-runner/components/WallComponent.js.map +1 -0
- package/lib/module/games/maze-runner/components/index.js +10 -0
- package/lib/module/games/maze-runner/components/index.js.map +1 -0
- package/lib/module/games/space-traveller/SpaceTraveller.js +393 -0
- package/lib/module/games/space-traveller/SpaceTraveller.js.map +1 -0
- package/lib/module/games/space-traveller/SpaceTravellerService.js +298 -0
- package/lib/module/games/space-traveller/SpaceTravellerService.js.map +1 -0
- package/lib/module/games/space-traveller/SpaceTravellerStore.js +139 -0
- package/lib/module/games/space-traveller/SpaceTravellerStore.js.map +1 -0
- package/lib/module/games/space-traveller/components/AsteroidComponent.js +111 -0
- package/lib/module/games/space-traveller/components/AsteroidComponent.js.map +1 -0
- package/lib/module/games/space-traveller/components/GameArea.js +75 -0
- package/lib/module/games/space-traveller/components/GameArea.js.map +1 -0
- package/lib/module/games/space-traveller/components/GameBackground.js +294 -0
- package/lib/module/games/space-traveller/components/GameBackground.js.map +1 -0
- package/lib/module/games/space-traveller/components/GameControls.js +177 -0
- package/lib/module/games/space-traveller/components/GameControls.js.map +1 -0
- package/lib/module/games/space-traveller/components/GameOverModal.js +182 -0
- package/lib/module/games/space-traveller/components/GameOverModal.js.map +1 -0
- package/lib/module/games/space-traveller/components/ParticleComponent.js +34 -0
- package/lib/module/games/space-traveller/components/ParticleComponent.js.map +1 -0
- package/lib/module/games/space-traveller/components/ScoreBoard.js +143 -0
- package/lib/module/games/space-traveller/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/space-traveller/components/SettingsModal.js +222 -0
- package/lib/module/games/space-traveller/components/SettingsModal.js.map +1 -0
- package/lib/module/games/space-traveller/components/Spacecraft3D.js +362 -0
- package/lib/module/games/space-traveller/components/Spacecraft3D.js.map +1 -0
- package/lib/module/games/space-traveller/components/SpacecraftPath.js +37 -0
- package/lib/module/games/space-traveller/components/SpacecraftPath.js.map +1 -0
- package/lib/module/games/space-traveller/components/index.js +13 -0
- package/lib/module/games/space-traveller/components/index.js.map +1 -0
- package/lib/module/index.js +12 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/services/GamesConstants.js +561 -0
- package/lib/module/services/GamesConstants.js.map +1 -0
- package/lib/module/services/GamesService.js +34 -0
- package/lib/module/services/GamesService.js.map +1 -0
- package/lib/module/shared/settings/GameSettings.js +295 -0
- package/lib/module/shared/settings/GameSettings.js.map +1 -0
- package/lib/module/shared/settings/SettingsService.js +119 -0
- package/lib/module/shared/settings/SettingsService.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts +16 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts.map +1 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts +66 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts.map +1 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts +37 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts.map +1 -0
- package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts +10 -0
- package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts.map +1 -0
- package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts +17 -0
- package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts.map +1 -0
- package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts +7 -0
- package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/balloon-blaster/components/GameControls.d.ts +10 -0
- package/lib/typescript/src/games/balloon-blaster/components/GameControls.d.ts.map +1 -0
- package/lib/typescript/src/games/balloon-blaster/components/GameOverModal.d.ts +9 -0
- package/lib/typescript/src/games/balloon-blaster/components/GameOverModal.d.ts.map +1 -0
- package/lib/typescript/src/games/balloon-blaster/components/ParticleSystem.d.ts +8 -0
- package/lib/typescript/src/games/balloon-blaster/components/ParticleSystem.d.ts.map +1 -0
- package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +9 -0
- package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/balloon-blaster/components/SliceTrail.d.ts +11 -0
- package/lib/typescript/src/games/balloon-blaster/components/SliceTrail.d.ts.map +1 -0
- package/lib/typescript/src/games/balloon-blaster/components/index.d.ts +9 -0
- package/lib/typescript/src/games/balloon-blaster/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/cat-popper/CatPopper.d.ts +13 -0
- package/lib/typescript/src/games/cat-popper/CatPopper.d.ts.map +1 -0
- package/lib/typescript/src/games/cat-popper/CatPopperService.d.ts +32 -0
- package/lib/typescript/src/games/cat-popper/CatPopperService.d.ts.map +1 -0
- package/lib/typescript/src/games/cat-popper/CatPopperStore.d.ts +21 -0
- package/lib/typescript/src/games/cat-popper/CatPopperStore.d.ts.map +1 -0
- package/lib/typescript/src/games/cat-popper/components/CatCharacter.d.ts +7 -0
- package/lib/typescript/src/games/cat-popper/components/CatCharacter.d.ts.map +1 -0
- package/lib/typescript/src/games/cat-popper/components/GameBackground.d.ts +7 -0
- package/lib/typescript/src/games/cat-popper/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/cat-popper/components/GameControls.d.ts +10 -0
- package/lib/typescript/src/games/cat-popper/components/GameControls.d.ts.map +1 -0
- package/lib/typescript/src/games/cat-popper/components/GameGrid.d.ts +13 -0
- package/lib/typescript/src/games/cat-popper/components/GameGrid.d.ts.map +1 -0
- package/lib/typescript/src/games/cat-popper/components/GameHole.d.ts +12 -0
- package/lib/typescript/src/games/cat-popper/components/GameHole.d.ts.map +1 -0
- package/lib/typescript/src/games/cat-popper/components/GameOverModal.d.ts +9 -0
- package/lib/typescript/src/games/cat-popper/components/GameOverModal.d.ts.map +1 -0
- package/lib/typescript/src/games/cat-popper/components/ScoreBoard.d.ts +8 -0
- package/lib/typescript/src/games/cat-popper/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/cat-popper/components/index.d.ts +8 -0
- package/lib/typescript/src/games/cat-popper/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-slicer/FruitSlicer.d.ts +16 -0
- package/lib/typescript/src/games/fruit-slicer/FruitSlicer.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-slicer/FruitSlicerService.d.ts +67 -0
- package/lib/typescript/src/games/fruit-slicer/FruitSlicerService.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-slicer/FruitSlicerStore.d.ts +37 -0
- package/lib/typescript/src/games/fruit-slicer/FruitSlicerStore.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-slicer/components/FruitComponent.d.ts +10 -0
- package/lib/typescript/src/games/fruit-slicer/components/FruitComponent.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-slicer/components/GameArea.d.ts +17 -0
- package/lib/typescript/src/games/fruit-slicer/components/GameArea.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-slicer/components/GameBackground.d.ts +7 -0
- package/lib/typescript/src/games/fruit-slicer/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-slicer/components/GameControls.d.ts +10 -0
- package/lib/typescript/src/games/fruit-slicer/components/GameControls.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-slicer/components/GameOverModal.d.ts +9 -0
- package/lib/typescript/src/games/fruit-slicer/components/GameOverModal.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-slicer/components/ParticleSystem.d.ts +8 -0
- package/lib/typescript/src/games/fruit-slicer/components/ParticleSystem.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-slicer/components/ScoreBoard.d.ts +9 -0
- package/lib/typescript/src/games/fruit-slicer/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-slicer/components/SliceTrail.d.ts +11 -0
- package/lib/typescript/src/games/fruit-slicer/components/SliceTrail.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-slicer/components/index.d.ts +9 -0
- package/lib/typescript/src/games/fruit-slicer/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts +18 -0
- package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts.map +1 -0
- package/lib/typescript/src/games/maze-runner/MazeRunnerService.d.ts +82 -0
- package/lib/typescript/src/games/maze-runner/MazeRunnerService.d.ts.map +1 -0
- package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts +11 -0
- package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts.map +1 -0
- package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts +12 -0
- package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts.map +1 -0
- package/lib/typescript/src/games/maze-runner/components/GameBackground.d.ts +7 -0
- package/lib/typescript/src/games/maze-runner/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/maze-runner/components/GameControls.d.ts +10 -0
- package/lib/typescript/src/games/maze-runner/components/GameControls.d.ts.map +1 -0
- package/lib/typescript/src/games/maze-runner/components/GameOverModal.d.ts +11 -0
- package/lib/typescript/src/games/maze-runner/components/GameOverModal.d.ts.map +1 -0
- package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts +8 -0
- package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/maze-runner/components/SkiaPipeComponent.d.ts +25 -0
- package/lib/typescript/src/games/maze-runner/components/SkiaPipeComponent.d.ts.map +1 -0
- package/lib/typescript/src/games/maze-runner/components/StaticGameBackground.d.ts +7 -0
- package/lib/typescript/src/games/maze-runner/components/StaticGameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts +10 -0
- package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts.map +1 -0
- package/lib/typescript/src/games/maze-runner/components/index.d.ts +8 -0
- package/lib/typescript/src/games/maze-runner/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/space-traveller/SpaceTraveller.d.ts +17 -0
- package/lib/typescript/src/games/space-traveller/SpaceTraveller.d.ts.map +1 -0
- package/lib/typescript/src/games/space-traveller/SpaceTravellerService.d.ts +65 -0
- package/lib/typescript/src/games/space-traveller/SpaceTravellerService.d.ts.map +1 -0
- package/lib/typescript/src/games/space-traveller/SpaceTravellerStore.d.ts +35 -0
- package/lib/typescript/src/games/space-traveller/SpaceTravellerStore.d.ts.map +1 -0
- package/lib/typescript/src/games/space-traveller/components/AsteroidComponent.d.ts +9 -0
- package/lib/typescript/src/games/space-traveller/components/AsteroidComponent.d.ts.map +1 -0
- package/lib/typescript/src/games/space-traveller/components/GameArea.d.ts +17 -0
- package/lib/typescript/src/games/space-traveller/components/GameArea.d.ts.map +1 -0
- package/lib/typescript/src/games/space-traveller/components/GameBackground.d.ts +7 -0
- package/lib/typescript/src/games/space-traveller/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/space-traveller/components/GameControls.d.ts +10 -0
- package/lib/typescript/src/games/space-traveller/components/GameControls.d.ts.map +1 -0
- package/lib/typescript/src/games/space-traveller/components/GameOverModal.d.ts +9 -0
- package/lib/typescript/src/games/space-traveller/components/GameOverModal.d.ts.map +1 -0
- package/lib/typescript/src/games/space-traveller/components/ParticleComponent.d.ts +8 -0
- package/lib/typescript/src/games/space-traveller/components/ParticleComponent.d.ts.map +1 -0
- package/lib/typescript/src/games/space-traveller/components/ScoreBoard.d.ts +8 -0
- package/lib/typescript/src/games/space-traveller/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/space-traveller/components/SettingsModal.d.ts +9 -0
- package/lib/typescript/src/games/space-traveller/components/SettingsModal.d.ts.map +1 -0
- package/lib/typescript/src/games/space-traveller/components/Spacecraft3D.d.ts +9 -0
- package/lib/typescript/src/games/space-traveller/components/Spacecraft3D.d.ts.map +1 -0
- package/lib/typescript/src/games/space-traveller/components/SpacecraftPath.d.ts +10 -0
- package/lib/typescript/src/games/space-traveller/components/SpacecraftPath.d.ts.map +1 -0
- package/lib/typescript/src/games/space-traveller/components/index.d.ts +11 -0
- package/lib/typescript/src/games/space-traveller/components/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +7 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/services/GamesConstants.d.ts +372 -0
- package/lib/typescript/src/services/GamesConstants.d.ts.map +1 -0
- package/lib/typescript/src/services/GamesService.d.ts +8 -0
- package/lib/typescript/src/services/GamesService.d.ts.map +1 -0
- package/lib/typescript/src/shared/settings/GameSettings.d.ts +36 -0
- package/lib/typescript/src/shared/settings/GameSettings.d.ts.map +1 -0
- package/lib/typescript/src/shared/settings/SettingsService.d.ts +32 -0
- package/lib/typescript/src/shared/settings/SettingsService.d.ts.map +1 -0
- package/package.json +125 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Dimensions } from 'react-native';
|
|
4
|
+
import { FRUIT_SLICER_GAME_CONFIG as GAME_CONFIG, FRUIT_SLICER_ANIMATION_CONFIG as ANIMATION_CONFIG, FRUIT_SLICER_COLORS as COLORS, FRUIT_TYPES, FRUIT_SPECIAL_ITEMS as SPECIAL_ITEMS } from "../../services/GamesConstants.js";
|
|
5
|
+
const {
|
|
6
|
+
width,
|
|
7
|
+
height
|
|
8
|
+
} = Dimensions.get('window');
|
|
9
|
+
|
|
10
|
+
// Constants now imported from centralized GamesConstants.ts
|
|
11
|
+
// Re-export for backward compatibility
|
|
12
|
+
export { GAME_CONFIG, ANIMATION_CONFIG, COLORS, FRUIT_TYPES, SPECIAL_ITEMS };
|
|
13
|
+
|
|
14
|
+
// Types
|
|
15
|
+
|
|
16
|
+
export class FruitSlicerService {
|
|
17
|
+
gameTimerRef = null;
|
|
18
|
+
fruitSpawnRef = null;
|
|
19
|
+
animationRef = null;
|
|
20
|
+
comboTimeoutRef = null;
|
|
21
|
+
particles = [];
|
|
22
|
+
constructor(fruitAnimations, particleAnimations) {
|
|
23
|
+
this.fruitAnimations = fruitAnimations;
|
|
24
|
+
this.particleAnimations = particleAnimations;
|
|
25
|
+
}
|
|
26
|
+
startGameTimer(onTick) {
|
|
27
|
+
this.clearGameTimer();
|
|
28
|
+
this.gameTimerRef = setInterval(onTick, 1000);
|
|
29
|
+
}
|
|
30
|
+
startFruitSpawning(spawnFruit, customSpawnInterval) {
|
|
31
|
+
this.clearFruitSpawn();
|
|
32
|
+
const spawnInterval = customSpawnInterval || GAME_CONFIG.FRUIT_SPAWN_INTERVAL;
|
|
33
|
+
const spawnLoop = () => {
|
|
34
|
+
const fruit = this.createRandomFruit();
|
|
35
|
+
spawnFruit(fruit);
|
|
36
|
+
|
|
37
|
+
// Randomly vary spawn timing
|
|
38
|
+
const nextSpawnTime = spawnInterval + (Math.random() - 0.5) * 400;
|
|
39
|
+
this.fruitSpawnRef = setTimeout(spawnLoop, Math.max(300, nextSpawnTime));
|
|
40
|
+
};
|
|
41
|
+
this.fruitSpawnRef = setTimeout(spawnLoop, 1000);
|
|
42
|
+
}
|
|
43
|
+
startPhysicsLoop(updateFruit, removeFruit, getFruits) {
|
|
44
|
+
const updateLoop = () => {
|
|
45
|
+
const fruits = getFruits();
|
|
46
|
+
fruits.forEach(fruit => {
|
|
47
|
+
if (fruit.isSliced) return;
|
|
48
|
+
|
|
49
|
+
// Apply gravity
|
|
50
|
+
const newVelocityY = fruit.velocity.y + GAME_CONFIG.GRAVITY;
|
|
51
|
+
|
|
52
|
+
// Update position
|
|
53
|
+
let newX = fruit.position.x + fruit.velocity.x;
|
|
54
|
+
const newY = fruit.position.y + newVelocityY;
|
|
55
|
+
|
|
56
|
+
// Update rotation
|
|
57
|
+
const newRotation = fruit.rotation + fruit.rotationSpeed;
|
|
58
|
+
|
|
59
|
+
// Remove fruits that fall off screen (bottom only)
|
|
60
|
+
if (newY > height + 100) {
|
|
61
|
+
removeFruit(fruit.id);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Prevent fruits from going too high off screen (top boundary)
|
|
66
|
+
// Handle wall bouncing properly
|
|
67
|
+
let newVelocityX = fruit.velocity.x;
|
|
68
|
+
if (newY < -50) {
|
|
69
|
+
// If fruit goes too high, start bringing it back down
|
|
70
|
+
const adjustedVelocityY = Math.max(newVelocityY, 0.5); // Ensure downward movement
|
|
71
|
+
updateFruit(fruit.id, {
|
|
72
|
+
position: {
|
|
73
|
+
x: newX,
|
|
74
|
+
y: -50
|
|
75
|
+
},
|
|
76
|
+
velocity: {
|
|
77
|
+
x: newVelocityX,
|
|
78
|
+
y: adjustedVelocityY
|
|
79
|
+
},
|
|
80
|
+
rotation: newRotation
|
|
81
|
+
});
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Left wall bounce
|
|
86
|
+
if (newX <= 0) {
|
|
87
|
+
newX = 0;
|
|
88
|
+
newVelocityX = Math.abs(newVelocityX) * 0.8; // Bounce right with damping
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Right wall bounce
|
|
92
|
+
if (newX >= width - GAME_CONFIG.FRUIT_SIZE) {
|
|
93
|
+
newX = width - GAME_CONFIG.FRUIT_SIZE;
|
|
94
|
+
newVelocityX = -Math.abs(newVelocityX) * 0.8; // Bounce left with damping
|
|
95
|
+
}
|
|
96
|
+
updateFruit(fruit.id, {
|
|
97
|
+
position: {
|
|
98
|
+
x: newX,
|
|
99
|
+
y: newY
|
|
100
|
+
},
|
|
101
|
+
velocity: {
|
|
102
|
+
x: newVelocityX,
|
|
103
|
+
y: newVelocityY
|
|
104
|
+
},
|
|
105
|
+
rotation: newRotation
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// Update particles
|
|
110
|
+
this.updateParticles();
|
|
111
|
+
this.animationRef = requestAnimationFrame(updateLoop);
|
|
112
|
+
};
|
|
113
|
+
this.animationRef = requestAnimationFrame(updateLoop);
|
|
114
|
+
}
|
|
115
|
+
createRandomFruit() {
|
|
116
|
+
// 10% chance for special items
|
|
117
|
+
const isSpecial = Math.random() < 0.1;
|
|
118
|
+
const type = isSpecial ? SPECIAL_ITEMS[Math.floor(Math.random() * SPECIAL_ITEMS.length)] : FRUIT_TYPES[Math.floor(Math.random() * FRUIT_TYPES.length)];
|
|
119
|
+
if (!type) {
|
|
120
|
+
// Fallback to default fruit type if undefined
|
|
121
|
+
const defaultType = FRUIT_TYPES[0];
|
|
122
|
+
const spawnX = Math.random() * (width - GAME_CONFIG.FRUIT_SIZE);
|
|
123
|
+
const spawnY = height + 20;
|
|
124
|
+
const velocityX = (Math.random() - 0.5) * GAME_CONFIG.INITIAL_VELOCITY_X_RANGE;
|
|
125
|
+
const velocityY = GAME_CONFIG.INITIAL_VELOCITY_Y + (Math.random() - 0.5) * 2;
|
|
126
|
+
return {
|
|
127
|
+
id: `fruit_${Date.now()}_${Math.random()}`,
|
|
128
|
+
type: defaultType,
|
|
129
|
+
position: {
|
|
130
|
+
x: spawnX,
|
|
131
|
+
y: spawnY
|
|
132
|
+
},
|
|
133
|
+
velocity: {
|
|
134
|
+
x: velocityX,
|
|
135
|
+
y: velocityY
|
|
136
|
+
},
|
|
137
|
+
rotation: 0,
|
|
138
|
+
rotationSpeed: (Math.random() - 0.5) * 0.2,
|
|
139
|
+
isSliced: false,
|
|
140
|
+
spawnTime: Date.now(),
|
|
141
|
+
isBomb: 'isBomb' in defaultType && Boolean(defaultType.isBomb),
|
|
142
|
+
isBonus: 'isBonus' in defaultType && Boolean(defaultType.isBonus),
|
|
143
|
+
isFreeze: 'isFreeze' in defaultType && Boolean(defaultType.isFreeze)
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Random spawn position (bottom of screen with some variety)
|
|
148
|
+
const spawnX = Math.random() * (width - GAME_CONFIG.FRUIT_SIZE);
|
|
149
|
+
const spawnY = height + 20; // Closer to screen for better visibility
|
|
150
|
+
|
|
151
|
+
// Random initial velocity with minimal variation for very predictable, slow arcs
|
|
152
|
+
const velocityX = (Math.random() - 0.5) * GAME_CONFIG.INITIAL_VELOCITY_X_RANGE;
|
|
153
|
+
const velocityY = GAME_CONFIG.INITIAL_VELOCITY_Y + (Math.random() - 0.5) * 2; // Minimal velocity variation for consistent arcs
|
|
154
|
+
|
|
155
|
+
return {
|
|
156
|
+
id: `fruit_${Date.now()}_${Math.random()}`,
|
|
157
|
+
type,
|
|
158
|
+
position: {
|
|
159
|
+
x: spawnX,
|
|
160
|
+
y: spawnY
|
|
161
|
+
},
|
|
162
|
+
velocity: {
|
|
163
|
+
x: velocityX,
|
|
164
|
+
y: velocityY
|
|
165
|
+
},
|
|
166
|
+
rotation: 0,
|
|
167
|
+
rotationSpeed: (Math.random() - 0.5) * 0.2,
|
|
168
|
+
isSliced: false,
|
|
169
|
+
spawnTime: Date.now(),
|
|
170
|
+
isBomb: 'isBomb' in type && type.isBomb,
|
|
171
|
+
isBonus: 'isBonus' in type && type.isBonus,
|
|
172
|
+
isFreeze: 'isFreeze' in type && type.isFreeze
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
createSliceParticles(fruit) {
|
|
176
|
+
const particles = [];
|
|
177
|
+
for (let i = 0; i < GAME_CONFIG.PARTICLE_COUNT; i++) {
|
|
178
|
+
const angle = i / GAME_CONFIG.PARTICLE_COUNT * Math.PI * 2;
|
|
179
|
+
const speed = 3 + Math.random() * 4;
|
|
180
|
+
particles.push({
|
|
181
|
+
id: `particle_${fruit.id}_${Date.now()}_${Math.random()}_${i}`,
|
|
182
|
+
position: {
|
|
183
|
+
...fruit.position
|
|
184
|
+
},
|
|
185
|
+
velocity: {
|
|
186
|
+
x: Math.cos(angle) * speed,
|
|
187
|
+
y: Math.sin(angle) * speed - 2
|
|
188
|
+
},
|
|
189
|
+
color: COLORS.PARTICLE_COLORS[Math.floor(Math.random() * COLORS.PARTICLE_COLORS.length)] || '#ff6b6b',
|
|
190
|
+
size: 4 + Math.random() * 6,
|
|
191
|
+
lifetime: 0,
|
|
192
|
+
maxLifetime: GAME_CONFIG.PARTICLE_LIFETIME
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
this.particles.push(...particles);
|
|
196
|
+
return particles;
|
|
197
|
+
}
|
|
198
|
+
updateParticles() {
|
|
199
|
+
this.particles = this.particles.filter(particle => {
|
|
200
|
+
particle.lifetime += 16; // Assume 60fps
|
|
201
|
+
|
|
202
|
+
if (particle.lifetime >= particle.maxLifetime) {
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// Update particle physics
|
|
207
|
+
particle.position.x += particle.velocity.x;
|
|
208
|
+
particle.position.y += particle.velocity.y;
|
|
209
|
+
particle.velocity.y += 0.1; // Gravity
|
|
210
|
+
|
|
211
|
+
return true;
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
getParticles() {
|
|
215
|
+
return this.particles;
|
|
216
|
+
}
|
|
217
|
+
checkFruitSlice(fruit, slicePath) {
|
|
218
|
+
if (fruit.isSliced || slicePath.length < 2) return false;
|
|
219
|
+
const fruitCenter = {
|
|
220
|
+
x: fruit.position.x + GAME_CONFIG.FRUIT_SIZE / 2,
|
|
221
|
+
y: fruit.position.y + GAME_CONFIG.FRUIT_SIZE / 2
|
|
222
|
+
};
|
|
223
|
+
const fruitRadius = GAME_CONFIG.FRUIT_SIZE / 2;
|
|
224
|
+
|
|
225
|
+
// Check if slice path intersects with fruit
|
|
226
|
+
for (let i = 0; i < slicePath.length - 1; i++) {
|
|
227
|
+
const p1 = slicePath[i];
|
|
228
|
+
const p2 = slicePath[i + 1];
|
|
229
|
+
if (!p1 || !p2) continue;
|
|
230
|
+
const distance = this.distanceFromPointToLine(fruitCenter, p1, p2);
|
|
231
|
+
if (distance <= fruitRadius) {
|
|
232
|
+
return true;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
return false;
|
|
236
|
+
}
|
|
237
|
+
distanceFromPointToLine(point, lineStart, lineEnd) {
|
|
238
|
+
const A = point.x - lineStart.x;
|
|
239
|
+
const B = point.y - lineStart.y;
|
|
240
|
+
const C = lineEnd.x - lineStart.x;
|
|
241
|
+
const D = lineEnd.y - lineStart.y;
|
|
242
|
+
const dot = A * C + B * D;
|
|
243
|
+
const lenSq = C * C + D * D;
|
|
244
|
+
if (lenSq === 0) return Math.sqrt(A * A + B * B);
|
|
245
|
+
let param = dot / lenSq;
|
|
246
|
+
param = Math.max(0, Math.min(1, param));
|
|
247
|
+
const xx = lineStart.x + param * C;
|
|
248
|
+
const yy = lineStart.y + param * D;
|
|
249
|
+
const dx = point.x - xx;
|
|
250
|
+
const dy = point.y - yy;
|
|
251
|
+
return Math.sqrt(dx * dx + dy * dy);
|
|
252
|
+
}
|
|
253
|
+
resetAnimations() {
|
|
254
|
+
this.fruitAnimations.clear();
|
|
255
|
+
this.particleAnimations.clear();
|
|
256
|
+
this.particles = [];
|
|
257
|
+
}
|
|
258
|
+
cleanup() {
|
|
259
|
+
this.clearGameTimer();
|
|
260
|
+
this.clearFruitSpawn();
|
|
261
|
+
this.clearAnimationLoop();
|
|
262
|
+
this.clearComboTimeout();
|
|
263
|
+
this.particles = [];
|
|
264
|
+
}
|
|
265
|
+
clearGameTimer() {
|
|
266
|
+
if (this.gameTimerRef) {
|
|
267
|
+
clearInterval(this.gameTimerRef);
|
|
268
|
+
this.gameTimerRef = null;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
clearFruitSpawn() {
|
|
272
|
+
if (this.fruitSpawnRef) {
|
|
273
|
+
clearTimeout(this.fruitSpawnRef);
|
|
274
|
+
this.fruitSpawnRef = null;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
clearAnimationLoop() {
|
|
278
|
+
if (this.animationRef) {
|
|
279
|
+
cancelAnimationFrame(this.animationRef);
|
|
280
|
+
this.animationRef = null;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
clearComboTimeout() {
|
|
284
|
+
if (this.comboTimeoutRef) {
|
|
285
|
+
clearTimeout(this.comboTimeoutRef);
|
|
286
|
+
this.comboTimeoutRef = null;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
export const createFruitSlicerService = (fruitAnimations, particleAnimations) => {
|
|
291
|
+
return new FruitSlicerService(fruitAnimations, particleAnimations);
|
|
292
|
+
};
|
|
293
|
+
//# sourceMappingURL=FruitSlicerService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Dimensions","FRUIT_SLICER_GAME_CONFIG","GAME_CONFIG","FRUIT_SLICER_ANIMATION_CONFIG","ANIMATION_CONFIG","FRUIT_SLICER_COLORS","COLORS","FRUIT_TYPES","FRUIT_SPECIAL_ITEMS","SPECIAL_ITEMS","width","height","get","FruitSlicerService","gameTimerRef","fruitSpawnRef","animationRef","comboTimeoutRef","particles","constructor","fruitAnimations","particleAnimations","startGameTimer","onTick","clearGameTimer","setInterval","startFruitSpawning","spawnFruit","customSpawnInterval","clearFruitSpawn","spawnInterval","FRUIT_SPAWN_INTERVAL","spawnLoop","fruit","createRandomFruit","nextSpawnTime","Math","random","setTimeout","max","startPhysicsLoop","updateFruit","removeFruit","getFruits","updateLoop","fruits","forEach","isSliced","newVelocityY","velocity","y","GRAVITY","newX","position","x","newY","newRotation","rotation","rotationSpeed","id","newVelocityX","adjustedVelocityY","abs","FRUIT_SIZE","updateParticles","requestAnimationFrame","isSpecial","type","floor","length","defaultType","spawnX","spawnY","velocityX","INITIAL_VELOCITY_X_RANGE","velocityY","INITIAL_VELOCITY_Y","Date","now","spawnTime","isBomb","Boolean","isBonus","isFreeze","createSliceParticles","i","PARTICLE_COUNT","angle","PI","speed","push","cos","sin","color","PARTICLE_COLORS","size","lifetime","maxLifetime","PARTICLE_LIFETIME","filter","particle","getParticles","checkFruitSlice","slicePath","fruitCenter","fruitRadius","p1","p2","distance","distanceFromPointToLine","point","lineStart","lineEnd","A","B","C","D","dot","lenSq","sqrt","param","min","xx","yy","dx","dy","resetAnimations","clear","cleanup","clearAnimationLoop","clearComboTimeout","clearInterval","clearTimeout","cancelAnimationFrame","createFruitSlicerService"],"sourceRoot":"../../../../src","sources":["games/fruit-slicer/FruitSlicerService.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,SACEC,wBAAwB,IAAIC,WAAW,EACvCC,6BAA6B,IAAIC,gBAAgB,EACjDC,mBAAmB,IAAIC,MAAM,EAC7BC,WAAW,EACXC,mBAAmB,IAAIC,aAAa,QAC/B,kCAA+B;AAEtC,MAAM;EAAEC,KAAK;EAAEC;AAAO,CAAC,GAAGX,UAAU,CAACY,GAAG,CAAC,QAAQ,CAAC;;AAElD;AACA;AACA,SAASV,WAAW,EAAEE,gBAAgB,EAAEE,MAAM,EAAEC,WAAW,EAAEE,aAAa;;AAE1E;;AA0BA,OAAO,MAAMI,kBAAkB,CAAC;EACtBC,YAAY,GAA0B,IAAI;EAC1CC,aAAa,GAA0B,IAAI;EAC3CC,YAAY,GAAkB,IAAI;EAClCC,eAAe,GAA0B,IAAI;EAC7CC,SAAS,GAAe,EAAE;EAElCC,WAAWA,CACDC,eAAiC,EACjCC,kBAAoC,EAC5C;IAAA,KAFQD,eAAiC,GAAjCA,eAAiC;IAAA,KACjCC,kBAAoC,GAApCA,kBAAoC;EAC3C;EAEHC,cAAcA,CAACC,MAAkB,EAAE;IACjC,IAAI,CAACC,cAAc,CAAC,CAAC;IACrB,IAAI,CAACV,YAAY,GAAGW,WAAW,CAACF,MAAM,EAAE,IAAI,CAAC;EAC/C;EAEAG,kBAAkBA,CAACC,UAAkC,EAAEC,mBAA4B,EAAE;IACnF,IAAI,CAACC,eAAe,CAAC,CAAC;IAEtB,MAAMC,aAAa,GAAGF,mBAAmB,IAAI1B,WAAW,CAAC6B,oBAAoB;IAE7E,MAAMC,SAAS,GAAGA,CAAA,KAAM;MACtB,MAAMC,KAA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Y,GAAG,IAAI;IAC1B;EACF;EAEQkH,iBAAiBA,CAAA,EAAG;IAC1B,IAAI,IAAI,CAACjH,eAAe,EAAE;MACxBmH,YAAY,CAAC,IAAI,CAACnH,eAAe,CAAC;MAClC,IAAI,CAACA,eAAe,GAAG,IAAI;IAC7B;EACF;AACF;AAEA,OAAO,MAAMqH,wBAAwB,GAAGA,CAAClH,eAAiC,EAAEC,kBAAoC,KAAK;EACnH,OAAO,IAAIR,kBAAkB,CAACO,eAAe,EAAEC,kBAAkB,CAAC;AACpE,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { create } from 'zustand';
|
|
4
|
+
import { GAME_CONFIG } from "./FruitSlicerService.js";
|
|
5
|
+
export const useFruitSlicerStore = create((set, get) => ({
|
|
6
|
+
// Initial state
|
|
7
|
+
score: 0,
|
|
8
|
+
timeLeft: GAME_CONFIG.GAME_DURATION,
|
|
9
|
+
isPlaying: false,
|
|
10
|
+
gameOver: false,
|
|
11
|
+
combo: 0,
|
|
12
|
+
lives: GAME_CONFIG.MAX_LIVES,
|
|
13
|
+
fruits: [],
|
|
14
|
+
slicePath: [],
|
|
15
|
+
isSlicing: false,
|
|
16
|
+
// Actions
|
|
17
|
+
startGame: gameDuration => {
|
|
18
|
+
const duration = gameDuration || GAME_CONFIG.GAME_DURATION;
|
|
19
|
+
set({
|
|
20
|
+
score: 0,
|
|
21
|
+
timeLeft: duration,
|
|
22
|
+
isPlaying: true,
|
|
23
|
+
gameOver: false,
|
|
24
|
+
combo: 0,
|
|
25
|
+
lives: GAME_CONFIG.MAX_LIVES,
|
|
26
|
+
fruits: [],
|
|
27
|
+
slicePath: [],
|
|
28
|
+
isSlicing: false
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
stopGame: () => {
|
|
32
|
+
set({
|
|
33
|
+
score: 0,
|
|
34
|
+
timeLeft: GAME_CONFIG.GAME_DURATION,
|
|
35
|
+
isPlaying: false,
|
|
36
|
+
gameOver: false,
|
|
37
|
+
combo: 0,
|
|
38
|
+
lives: GAME_CONFIG.MAX_LIVES,
|
|
39
|
+
fruits: [],
|
|
40
|
+
slicePath: [],
|
|
41
|
+
isSlicing: false
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
resetGame: () => {
|
|
45
|
+
set({
|
|
46
|
+
score: 0,
|
|
47
|
+
timeLeft: GAME_CONFIG.GAME_DURATION,
|
|
48
|
+
isPlaying: false,
|
|
49
|
+
gameOver: false,
|
|
50
|
+
combo: 0,
|
|
51
|
+
lives: GAME_CONFIG.MAX_LIVES,
|
|
52
|
+
fruits: [],
|
|
53
|
+
slicePath: [],
|
|
54
|
+
isSlicing: false
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
sliceFruit: fruitId => {
|
|
58
|
+
const {
|
|
59
|
+
fruits,
|
|
60
|
+
isPlaying
|
|
61
|
+
} = get();
|
|
62
|
+
if (!isPlaying) return;
|
|
63
|
+
const fruit = fruits.find(f => f.id === fruitId);
|
|
64
|
+
if (!fruit || fruit.isSliced) return;
|
|
65
|
+
|
|
66
|
+
// Simplified scoring: each fruit = 10 points (no combo multipliers)
|
|
67
|
+
const points = 10;
|
|
68
|
+
set(state => ({
|
|
69
|
+
score: state.score + points,
|
|
70
|
+
fruits: state.fruits.map(f => f.id === fruitId ? {
|
|
71
|
+
...f,
|
|
72
|
+
isSliced: true,
|
|
73
|
+
sliceTime: Date.now()
|
|
74
|
+
} : f)
|
|
75
|
+
}));
|
|
76
|
+
},
|
|
77
|
+
updateScore: points => {
|
|
78
|
+
set(state => ({
|
|
79
|
+
score: state.score + points
|
|
80
|
+
}));
|
|
81
|
+
},
|
|
82
|
+
decrementTime: () => {
|
|
83
|
+
set(state => {
|
|
84
|
+
const newTimeLeft = state.timeLeft - 1;
|
|
85
|
+
if (newTimeLeft <= 0) {
|
|
86
|
+
return {
|
|
87
|
+
timeLeft: 0,
|
|
88
|
+
isPlaying: false,
|
|
89
|
+
gameOver: true
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
timeLeft: newTimeLeft
|
|
94
|
+
};
|
|
95
|
+
});
|
|
96
|
+
},
|
|
97
|
+
addFruit: fruit => {
|
|
98
|
+
set(state => ({
|
|
99
|
+
fruits: [...state.fruits, fruit]
|
|
100
|
+
}));
|
|
101
|
+
},
|
|
102
|
+
removeFruit: fruitId => {
|
|
103
|
+
set(state => ({
|
|
104
|
+
fruits: state.fruits.filter(f => f.id !== fruitId)
|
|
105
|
+
}));
|
|
106
|
+
},
|
|
107
|
+
updateFruit: (fruitId, updates) => {
|
|
108
|
+
set(state => ({
|
|
109
|
+
fruits: state.fruits.map(f => f.id === fruitId ? {
|
|
110
|
+
...f,
|
|
111
|
+
...updates
|
|
112
|
+
} : f)
|
|
113
|
+
}));
|
|
114
|
+
},
|
|
115
|
+
setSlicePath: path => {
|
|
116
|
+
set({
|
|
117
|
+
slicePath: path
|
|
118
|
+
});
|
|
119
|
+
},
|
|
120
|
+
setIsSlicing: isSlicing => {
|
|
121
|
+
set({
|
|
122
|
+
isSlicing
|
|
123
|
+
});
|
|
124
|
+
},
|
|
125
|
+
incrementCombo: () => {
|
|
126
|
+
set(state => ({
|
|
127
|
+
combo: state.combo + 1
|
|
128
|
+
}));
|
|
129
|
+
},
|
|
130
|
+
resetCombo: () => {
|
|
131
|
+
set({
|
|
132
|
+
combo: 0
|
|
133
|
+
});
|
|
134
|
+
},
|
|
135
|
+
loseLife: () => {
|
|
136
|
+
set(state => {
|
|
137
|
+
const newLives = state.lives - 1;
|
|
138
|
+
if (newLives <= 0) {
|
|
139
|
+
return {
|
|
140
|
+
lives: 0,
|
|
141
|
+
isPlaying: false,
|
|
142
|
+
gameOver: true
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
return {
|
|
146
|
+
lives: newLives
|
|
147
|
+
};
|
|
148
|
+
});
|
|
149
|
+
},
|
|
150
|
+
addLife: () => {
|
|
151
|
+
set(state => ({
|
|
152
|
+
lives: Math.min(state.lives + 1, GAME_CONFIG.MAX_LIVES) // Cap at max lives
|
|
153
|
+
}));
|
|
154
|
+
}
|
|
155
|
+
}));
|
|
156
|
+
//# sourceMappingURL=FruitSlicerStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["create","GAME_CONFIG","useFruitSlicerStore","set","get","score","timeLeft","GAME_DURATION","isPlaying","gameOver","combo","lives","MAX_LIVES","fruits","slicePath","isSlicing","startGame","gameDuration","duration","stopGame","resetGame","sliceFruit","fruitId","fruit","find","f","id","isSliced","points","state","map","sliceTime","Date","now","updateScore","decrementTime","newTimeLeft","addFruit","removeFruit","filter","updateFruit","updates","setSlicePath","path","setIsSlicing","incrementCombo","resetCombo","loseLife","newLives","addLife","Math","min"],"sourceRoot":"../../../../src","sources":["games/fruit-slicer/FruitSlicerStore.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,SAAS;AAEhC,SAASC,WAAW,QAAQ,yBAAsB;AAkClD,OAAO,MAAMC,mBAAmB,GAAGF,MAAM,CAAmB,CAACG,GAAG,EAAEC,GAAG,MAAM;EACzE;EACAC,KAAK,EAAE,CAAC;EACRC,QAAQ,EAAEL,WAAW,CAACM,aAAa;EACnCC,SAAS,EAAE,KAAK;EAChBC,QAAQ,EAAE,KAAK;EACfC,KAAK,EAAE,CAAC;EACRC,KAAK,EAAEV,WAAW,CAACW,SAAS;EAC5BC,MAAM,EAAE,EAAE;EACVC,SAAS,EAAE,EAAE;EACbC,SAAS,EAAE,KAAK;EAEhB;EACAC,SAAS,EAAGC,YAAqB,IAAK;IACpC,MAAMC,QAAQ,GAAGD,YAAY,IAAIhB,WAAW,CAACM,aAAa;IAC1DJ,GAAG,CAAC;MACFE,KAAK,EAAE,CAAC;MACRC,QAAQ,EAAEY,QAAQ;MAClBV,SAAS,EAAE,IAAI;MACfC,QAAQ,EAAE,KAAK;MACfC,KAAK,EAAE,CAAC;MACRC,KAAK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,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { View, TouchableOpacity, Text, StyleSheet } from 'react-native';
|
|
5
|
+
import { GAME_CONFIG } from "../FruitSlicerService.js";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
export const FruitComponent = ({
|
|
8
|
+
fruit,
|
|
9
|
+
onSlice
|
|
10
|
+
}) => {
|
|
11
|
+
const scale = fruit.isSliced ? 0 : 1;
|
|
12
|
+
const opacity = fruit.isSliced ? 0 : 1;
|
|
13
|
+
const style = {
|
|
14
|
+
transform: [{
|
|
15
|
+
translateX: fruit.position.x
|
|
16
|
+
}, {
|
|
17
|
+
translateY: fruit.position.y
|
|
18
|
+
}, {
|
|
19
|
+
rotate: `${fruit.rotation}rad`
|
|
20
|
+
}, {
|
|
21
|
+
scale
|
|
22
|
+
}],
|
|
23
|
+
opacity,
|
|
24
|
+
position: 'absolute',
|
|
25
|
+
width: GAME_CONFIG.FRUIT_SIZE,
|
|
26
|
+
height: GAME_CONFIG.FRUIT_SIZE,
|
|
27
|
+
zIndex: fruit.isBomb ? 10 : 5
|
|
28
|
+
};
|
|
29
|
+
const getBorderColor = () => {
|
|
30
|
+
if (fruit.isBomb) return '#ef4444'; // red-500
|
|
31
|
+
if (fruit.isBonus) return '#fbbf24'; // yellow-400
|
|
32
|
+
if (fruit.isFreeze) return '#60a5fa'; // blue-400
|
|
33
|
+
return '#4ade80'; // green-400
|
|
34
|
+
};
|
|
35
|
+
const getBackgroundColor = () => {
|
|
36
|
+
if (fruit.isBomb) return '#fee2e2'; // red-100
|
|
37
|
+
if (fruit.isBonus) return '#fef3c7'; // yellow-100
|
|
38
|
+
if (fruit.isFreeze) return '#dbeafe'; // blue-100
|
|
39
|
+
return '#dcfce7'; // green-100
|
|
40
|
+
};
|
|
41
|
+
return /*#__PURE__*/_jsx(View, {
|
|
42
|
+
style: style,
|
|
43
|
+
children: /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
44
|
+
style: [styles.fruitButton, {
|
|
45
|
+
width: GAME_CONFIG.FRUIT_SIZE,
|
|
46
|
+
height: GAME_CONFIG.FRUIT_SIZE,
|
|
47
|
+
borderColor: getBorderColor(),
|
|
48
|
+
backgroundColor: getBackgroundColor()
|
|
49
|
+
}],
|
|
50
|
+
onPress: () => onSlice?.(fruit.id),
|
|
51
|
+
activeOpacity: 0.8,
|
|
52
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
53
|
+
style: styles.fruitEmoji,
|
|
54
|
+
children: fruit.type.emoji
|
|
55
|
+
}), (fruit.isBomb || fruit.isBonus || fruit.isFreeze) && /*#__PURE__*/_jsx(View, {
|
|
56
|
+
style: [styles.glowEffect, {
|
|
57
|
+
backgroundColor: fruit.isBomb ? '#ff4757' : fruit.isBonus ? '#ffa502' : '#3742fa',
|
|
58
|
+
shadowColor: fruit.isBomb ? '#ff4757' : fruit.isBonus ? '#ffa502' : '#3742fa',
|
|
59
|
+
shadowOffset: {
|
|
60
|
+
width: 0,
|
|
61
|
+
height: 0
|
|
62
|
+
},
|
|
63
|
+
shadowOpacity: 0.8,
|
|
64
|
+
shadowRadius: 10,
|
|
65
|
+
elevation: 10
|
|
66
|
+
}]
|
|
67
|
+
})]
|
|
68
|
+
})
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
const styles = StyleSheet.create({
|
|
72
|
+
fruitButton: {
|
|
73
|
+
justifyContent: 'center',
|
|
74
|
+
alignItems: 'center',
|
|
75
|
+
borderRadius: 50,
|
|
76
|
+
borderWidth: 2,
|
|
77
|
+
shadowColor: '#000',
|
|
78
|
+
shadowOffset: {
|
|
79
|
+
width: 0,
|
|
80
|
+
height: 4
|
|
81
|
+
},
|
|
82
|
+
shadowOpacity: 0.3,
|
|
83
|
+
shadowRadius: 8,
|
|
84
|
+
elevation: 8
|
|
85
|
+
},
|
|
86
|
+
fruitEmoji: {
|
|
87
|
+
fontSize: 32
|
|
88
|
+
},
|
|
89
|
+
glowEffect: {
|
|
90
|
+
position: 'absolute',
|
|
91
|
+
top: 0,
|
|
92
|
+
left: 0,
|
|
93
|
+
right: 0,
|
|
94
|
+
bottom: 0,
|
|
95
|
+
borderRadius: 50,
|
|
96
|
+
opacity: 0.3
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
//# sourceMappingURL=FruitComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","TouchableOpacity","Text","StyleSheet","GAME_CONFIG","jsx","_jsx","jsxs","_jsxs","FruitComponent","fruit","onSlice","scale","isSliced","opacity","style","transform","translateX","position","x","translateY","y","rotate","rotation","width","FRUIT_SIZE","height","zIndex","isBomb","getBorderColor","isBonus","isFreeze","getBackgroundColor","children","styles","fruitButton","borderColor","backgroundColor","onPress","id","activeOpacity","fruitEmoji","type","emoji","glowEffect","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","create","justifyContent","alignItems","borderRadius","borderWidth","fontSize","top","left","right","bottom"],"sourceRoot":"../../../../../src","sources":["games/fruit-slicer/components/FruitComponent.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAEvE,SAASC,WAAW,QAAQ,0BAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQpD,OAAO,MAAMC,cAA6C,GAAGA,CAAC;EAAEC,KAAK;EAAEC;AAAQ,CAAC,KAAK;EACnF,MAAMC,KAAK,GAAGF,KAAK,CAACG,QAAQ,GAAG,CAAC,GAAG,CAAC;EACpC,MAAMC,OAAO,GAAGJ,KAAK,CAACG,QAAQ,GAAG,CAAC,GAAG,CAAC;EAEtC,MAAME,KAAK,GAAG;IACZC,SAAS,EAAE,CAAC;MAAEC,UAAU,EAAEP,KAAK,CAACQ,QAAQ,CAACC;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AAQ,EAAE;EACZ,CAAC;EACDX,UAAU,EAAE;IACV1B,QAAQ,EAAE,UAAU;IACpBsC,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTN,YAAY,EAAE,EAAE;IAChBvC,OAAO,EAAE;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { View, StyleSheet } from 'react-native';
|
|
5
|
+
import { FruitComponent } from "./FruitComponent.js";
|
|
6
|
+
import { SliceTrail } from "./SliceTrail.js";
|
|
7
|
+
import { ParticleSystem } from "./ParticleSystem.js";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
export const GameArea = ({
|
|
10
|
+
fruits,
|
|
11
|
+
fruitAnimations,
|
|
12
|
+
slicePath,
|
|
13
|
+
isSlicing,
|
|
14
|
+
particles,
|
|
15
|
+
onFruitSlice,
|
|
16
|
+
children
|
|
17
|
+
}) => {
|
|
18
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
19
|
+
style: styles.gameArea,
|
|
20
|
+
children: [fruits.map(fruit => {
|
|
21
|
+
const animation = fruitAnimations.get(fruit.id);
|
|
22
|
+
return /*#__PURE__*/_jsx(FruitComponent, {
|
|
23
|
+
fruit: fruit,
|
|
24
|
+
animation: animation,
|
|
25
|
+
onSlice: onFruitSlice
|
|
26
|
+
}, fruit.id);
|
|
27
|
+
}), /*#__PURE__*/_jsx(SliceTrail, {
|
|
28
|
+
path: slicePath,
|
|
29
|
+
isVisible: isSlicing
|
|
30
|
+
}), /*#__PURE__*/_jsx(ParticleSystem, {
|
|
31
|
+
particles: particles
|
|
32
|
+
}), children]
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
const styles = StyleSheet.create({
|
|
36
|
+
gameArea: {
|
|
37
|
+
flex: 1,
|
|
38
|
+
position: 'relative',
|
|
39
|
+
overflow: 'hidden'
|
|
40
|
+
},
|
|
41
|
+
backgroundGradient: {
|
|
42
|
+
position: 'absolute',
|
|
43
|
+
top: 0,
|
|
44
|
+
left: 0,
|
|
45
|
+
right: 0,
|
|
46
|
+
bottom: 0
|
|
47
|
+
// backgroundColor: '#87CEEB', // Sky blue gradient fallback
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=GameArea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","FruitComponent","SliceTrail","ParticleSystem","jsx","_jsx","jsxs","_jsxs","GameArea","fruits","fruitAnimations","slicePath","isSlicing","particles","onFruitSlice","children","style","styles","gameArea","map","fruit","animation","get","id","onSlice","path","isVisible","create","flex","position","overflow","backgroundGradient","top","left","right","bottom"],"sourceRoot":"../../../../../src","sources":["games/fruit-slicer/components/GameArea.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAE/C,SAASC,cAAc,QAAQ,qBAAkB;AACjD,SAASC,UAAU,QAAQ,iBAAc;AACzC,SAASC,cAAc,QAAQ,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAYlD,OAAO,MAAMC,QAAiC,GAAGA,CAAC;EAAEC,MAAM;EAAEC,eAAe;EAAEC,SAAS;EAAEC,SAAS;EAAEC,SAAS;EAAEC,YAAY;EAAEC;AAAS,CAAC,KAAK;EACzI,oBACER,KAAA,CAACR,IAAI;IAACiB,KAAK,EAAEC,MAAM,CAACC,QAAS;IAAAH,QAAA,GAK1BN,MAAM,CAACU,GAAG,CAACC,KAAK,IAAI;MACnB,MAAMC,SAAS,GAAGX,eAAe,CAACY,GAAG,CAACF,KAAK,CAACG,EAAE,CAAC;MAE/C,oBAAOlB,IAAA,CAACJ,cAAc;QAA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