@playcraft/skills 0.0.2
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 +333 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/skills.loader.d.ts +31 -0
- package/dist/src/skills.loader.d.ts.map +1 -0
- package/dist/src/skills.loader.js +200 -0
- package/dist/src/skills.loader.js.map +1 -0
- package/dist/src/skills.types.d.ts +44 -0
- package/dist/src/skills.types.d.ts.map +1 -0
- package/dist/src/skills.types.js +9 -0
- package/dist/src/skills.types.js.map +1 -0
- package/package.json +35 -0
- package/skills/2048_core.aigameplay/SKILL.md +123 -0
- package/skills/2048_core.aigameplay/manifest.json +159 -0
- package/skills/2048_core.aigameplay/ref/pgs-schema.json +194 -0
- package/skills/2048_core.aigameplay/ref/reducer.template.ts +189 -0
- package/skills/SKILL.md +46 -0
- package/skills/ad_compliance_rules.aiconfig/SKILL.md +85 -0
- package/skills/ad_compliance_rules.aiconfig/manifest.json +60 -0
- package/skills/agent_remix_orchestrator.aicomponent/SKILL.md +257 -0
- package/skills/agent_remix_orchestrator.aicomponent/manifest.json +12 -0
- package/skills/app_metadata.aiconfig/SKILL.md +53 -0
- package/skills/app_metadata.aiconfig/manifest.json +32 -0
- package/skills/appear_sfx.aiaudio/SKILL.md +59 -0
- package/skills/appear_sfx.aiaudio/manifest.json +45 -0
- package/skills/appear_sfx.aiaudio/ref/appear.mp3 +0 -0
- package/skills/arrow_move_error_sfx.aiaudio/SKILL.md +59 -0
- package/skills/arrow_move_error_sfx.aiaudio/manifest.json +45 -0
- package/skills/arrow_move_error_sfx.aiaudio/ref/arrow_move_error.mp3 +0 -0
- package/skills/arrow_path_data_format.aicomponent/SKILL.md +152 -0
- package/skills/arrow_path_data_format.aicomponent/manifest.json +57 -0
- package/skills/arrow_path_data_format.aicomponent/ref/LevelParser.ts +188 -0
- package/skills/arrow_path_data_format.aicomponent/ref/LevelTypes.ts +131 -0
- package/skills/arrow_pick_match_rules.aigameplay/SKILL.md +117 -0
- package/skills/arrow_pick_match_rules.aigameplay/manifest.json +105 -0
- package/skills/arrow_pick_match_rules.aigameplay/ref/pgs-schema.json +180 -0
- package/skills/asset_pipeline_scripts.aicomponent/SKILL.md +117 -0
- package/skills/asset_pipeline_scripts.aicomponent/manifest.json +17 -0
- package/skills/asset_pipeline_scripts.aicomponent/ref/gen-sprite.sh +105 -0
- package/skills/ball_sort.aigameplay/SKILL.md +109 -0
- package/skills/ball_sort.aigameplay/manifest.json +155 -0
- package/skills/ball_sort.aigameplay/ref/pgs-schema.json +192 -0
- package/skills/ball_sort.aigameplay/ref/reducer.template.ts +156 -0
- package/skills/basketball_shot.aigameplay/SKILL.md +94 -0
- package/skills/basketball_shot.aigameplay/manifest.json +150 -0
- package/skills/basketball_shot.aigameplay/ref/pgs-schema.json +229 -0
- package/skills/basketball_shot.aigameplay/ref/reducer.template.ts +189 -0
- package/skills/bg_music.aiaudio/SKILL.md +61 -0
- package/skills/bg_music.aiaudio/manifest.json +48 -0
- package/skills/bg_music.aiaudio/ref/bg.mp3 +0 -0
- package/skills/big_watermelon.aigameplay/SKILL.md +94 -0
- package/skills/big_watermelon.aigameplay/manifest.json +155 -0
- package/skills/big_watermelon.aigameplay/ref/pgs-schema.json +191 -0
- package/skills/big_watermelon.aigameplay/ref/reducer.template.ts +202 -0
- package/skills/block_puzzle.aigameplay/SKILL.md +121 -0
- package/skills/block_puzzle.aigameplay/manifest.json +154 -0
- package/skills/block_puzzle.aigameplay/ref/pgs-schema.json +170 -0
- package/skills/block_puzzle.aigameplay/ref/reducer.template.ts +182 -0
- package/skills/board_entity_sprite.aiimage/SKILL.md +255 -0
- package/skills/board_entity_sprite.aiimage/manifest.json +153 -0
- package/skills/board_entity_sprite.aiimage/ref/ProceduralCar.ts +357 -0
- package/skills/board_entity_sprite.aiimage/ref/car.png +0 -0
- package/skills/board_entity_sprite.aiimage/ref/car.webp +0 -0
- package/skills/bottom_ui_bar.aicomponent/SKILL.md +50 -0
- package/skills/bottom_ui_bar.aicomponent/manifest.json +31 -0
- package/skills/bottom_ui_bar.aicomponent/ref/GameBottomUI.ts +27 -0
- package/skills/bubble_shooter.aigameplay/SKILL.md +129 -0
- package/skills/bubble_shooter.aigameplay/manifest.json +181 -0
- package/skills/bubble_shooter.aigameplay/ref/pgs-schema.json +226 -0
- package/skills/bubble_shooter.aigameplay/ref/reducer.template.ts +228 -0
- package/skills/button_click_sfx.aiaudio/SKILL.md +59 -0
- package/skills/button_click_sfx.aiaudio/manifest.json +45 -0
- package/skills/button_click_sfx.aiaudio/ref/button_click.mp3 +0 -0
- package/skills/calm_piano.aiaudio/SKILL.md +68 -0
- package/skills/calm_piano.aiaudio/manifest.json +50 -0
- package/skills/camera_controller_3d.aicomponent/SKILL.md +100 -0
- package/skills/camera_controller_3d.aicomponent/manifest.json +52 -0
- package/skills/camera_controller_3d.aicomponent/ref/CameraController.ts +199 -0
- package/skills/camera_controller_3d.aicomponent/ref/OrbitControlsAdapter.ts +152 -0
- package/skills/candy_tile.aiimage/SKILL.md +62 -0
- package/skills/candy_tile.aiimage/manifest.json +49 -0
- package/skills/car_parking.aigameplay/SKILL.md +105 -0
- package/skills/car_parking.aigameplay/manifest.json +164 -0
- package/skills/car_parking.aigameplay/ref/pgs-schema.json +163 -0
- package/skills/car_parking.aigameplay/ref/reducer.template.ts +166 -0
- package/skills/castle.aiimage/SKILL.md +64 -0
- package/skills/castle.aiimage/manifest.json +48 -0
- package/skills/cheerful_ukulele.aiaudio/SKILL.md +72 -0
- package/skills/cheerful_ukulele.aiaudio/manifest.json +50 -0
- package/skills/click_sfx.aiaudio/SKILL.md +59 -0
- package/skills/click_sfx.aiaudio/manifest.json +45 -0
- package/skills/click_sfx.aiaudio/ref/click.mp3 +0 -0
- package/skills/combo_display.aicomponent/SKILL.md +45 -0
- package/skills/combo_display.aicomponent/manifest.json +31 -0
- package/skills/combo_display.aicomponent/ref/ComboManager.ts +362 -0
- package/skills/combo_display.aicomponent/ref/ComboSmallUI.ts +232 -0
- package/skills/combo_praise_text.aicomponent/SKILL.md +56 -0
- package/skills/combo_praise_text.aicomponent/manifest.json +34 -0
- package/skills/combo_praise_text.aicomponent/ref/ComboManager.ts +362 -0
- package/skills/countdown_timer.aicomponent/SKILL.md +44 -0
- package/skills/countdown_timer.aicomponent/manifest.json +35 -0
- package/skills/countdown_timer.aicomponent/ref/CountdownDisplay.ts +213 -0
- package/skills/cta_platform_config.aiconfig/SKILL.md +72 -0
- package/skills/cta_platform_config.aiconfig/manifest.json +56 -0
- package/skills/debug_overlay.aicomponent/SKILL.md +75 -0
- package/skills/debug_overlay.aicomponent/manifest.json +17 -0
- package/skills/debug_overlay.aicomponent/ref/DebugOverlay.ts +144 -0
- package/skills/desert.aiimage/SKILL.md +63 -0
- package/skills/desert.aiimage/manifest.json +49 -0
- package/skills/difficulty_curve_designer.aiconfig/SKILL.md +68 -0
- package/skills/difficulty_curve_designer.aiconfig/manifest.json +36 -0
- package/skills/digit_renderer.aicomponent/SKILL.md +43 -0
- package/skills/digit_renderer.aicomponent/manifest.json +25 -0
- package/skills/digit_renderer.aicomponent/ref/DigitRenderer.ts +237 -0
- package/skills/download_button.aicomponent/SKILL.md +44 -0
- package/skills/download_button.aicomponent/manifest.json +25 -0
- package/skills/download_button.aicomponent/ref/DownloadButton.ts +137 -0
- package/skills/draw_line_puzzle.aigameplay/SKILL.md +84 -0
- package/skills/draw_line_puzzle.aigameplay/manifest.json +152 -0
- package/skills/draw_line_puzzle.aigameplay/ref/pgs-schema.json +189 -0
- package/skills/draw_line_puzzle.aigameplay/ref/reducer.template.ts +194 -0
- package/skills/easy_to_hard.aiconfig/SKILL.md +52 -0
- package/skills/easy_to_hard.aiconfig/manifest.json +33 -0
- package/skills/eight_ball_pool.aigameplay/SKILL.md +104 -0
- package/skills/eight_ball_pool.aigameplay/manifest.json +152 -0
- package/skills/eight_ball_pool.aigameplay/ref/pgs-schema.json +205 -0
- package/skills/eight_ball_pool.aigameplay/ref/reducer.template.ts +198 -0
- package/skills/energetic_electronic.aiaudio/SKILL.md +69 -0
- package/skills/energetic_electronic.aiaudio/manifest.json +51 -0
- package/skills/fail_sfx.aiaudio/SKILL.md +59 -0
- package/skills/fail_sfx.aiaudio/manifest.json +44 -0
- package/skills/fail_sfx.aiaudio/ref/fail.mp3 +0 -0
- package/skills/figer_icon.aiimage/SKILL.md +58 -0
- package/skills/figer_icon.aiimage/manifest.json +48 -0
- package/skills/figer_icon.aiimage/ref/figer.png +0 -0
- package/skills/figer_icon.aiimage/ref/figer.webp +0 -0
- package/skills/forest.aiimage/SKILL.md +74 -0
- package/skills/forest.aiimage/manifest.json +48 -0
- package/skills/fruit_tile.aiimage/SKILL.md +68 -0
- package/skills/fruit_tile.aiimage/manifest.json +48 -0
- package/skills/game_over_panel.aicomponent/SKILL.md +47 -0
- package/skills/game_over_panel.aicomponent/manifest.json +61 -0
- package/skills/game_over_panel.aicomponent/ref/GameOverPanel.ts +74 -0
- package/skills/game_scene.aicomponent/SKILL.md +57 -0
- package/skills/game_scene.aicomponent/manifest.json +36 -0
- package/skills/game_scene.aicomponent/ref/Game.ts +748 -0
- package/skills/gameplay_balance_check.aivalidator/SKILL.md +69 -0
- package/skills/gameplay_balance_check.aivalidator/manifest.json +21 -0
- package/skills/gameplay_unit_test.aivalidator/SKILL.md +89 -0
- package/skills/gameplay_unit_test.aivalidator/manifest.json +17 -0
- package/skills/gameplay_unit_test.aivalidator/ref/gameplay.test.ts +202 -0
- package/skills/gameplay_unit_test.aivalidator/ref/vitest.config.ts +13 -0
- package/skills/grid_board_layout.aicomponent/SKILL.md +85 -0
- package/skills/grid_board_layout.aicomponent/manifest.json +69 -0
- package/skills/grid_board_layout.aicomponent/ref/BoardLayout.ts +416 -0
- package/skills/grid_board_layout.aicomponent/ref/BoardLayout3D.ts +125 -0
- package/skills/grid_board_layout.aicomponent/ref/BoardLayoutMath.ts +85 -0
- package/skills/grid_board_layout.aicomponent/ref/BoardRenderer3D.ts +298 -0
- package/skills/heart_lives.aicomponent/SKILL.md +42 -0
- package/skills/heart_lives.aicomponent/manifest.json +25 -0
- package/skills/heart_lives.aicomponent/ref/HeartDisplay.ts +96 -0
- package/skills/idle-breathe.aicomponent/SKILL.md +27 -0
- package/skills/idle-breathe.aicomponent/manifest.json +20 -0
- package/skills/idle-breathe.aicomponent/ref/phaser.js +25 -0
- package/skills/idle-breathe.aicomponent/ref/playcanvas.js +29 -0
- package/skills/jewel_tile.aiimage/SKILL.md +63 -0
- package/skills/jewel_tile.aiimage/manifest.json +49 -0
- package/skills/knife_hit.aigameplay/SKILL.md +103 -0
- package/skills/knife_hit.aigameplay/manifest.json +151 -0
- package/skills/knife_hit.aigameplay/ref/pgs-schema.json +202 -0
- package/skills/knife_hit.aigameplay/ref/reducer.template.ts +196 -0
- package/skills/left_right_parkour.aigameplay/SKILL.md +120 -0
- package/skills/left_right_parkour.aigameplay/manifest.json +165 -0
- package/skills/left_right_parkour.aigameplay/ref/pgs-schema.json +200 -0
- package/skills/left_right_parkour.aigameplay/ref/reducer.template.ts +194 -0
- package/skills/level_data_pack.aiconfig/SKILL.md +64 -0
- package/skills/level_data_pack.aiconfig/manifest.json +37 -0
- package/skills/level_data_validator.aivalidator/SKILL.md +85 -0
- package/skills/level_data_validator.aivalidator/manifest.json +17 -0
- package/skills/level_data_validator.aivalidator/ref/LevelValidator.ts +113 -0
- package/skills/level_lifecycle.aicomponent/SKILL.md +81 -0
- package/skills/level_lifecycle.aicomponent/manifest.json +87 -0
- package/skills/level_lifecycle.aicomponent/ref/LevelLifecycle.ts +235 -0
- package/skills/level_solvability_validator.aivalidator/SKILL.md +74 -0
- package/skills/level_solvability_validator.aivalidator/manifest.json +23 -0
- package/skills/level_solvability_validator.aivalidator/ref/LevelValidator.ts +186 -0
- package/skills/level_state.aicomponent/SKILL.md +55 -0
- package/skills/level_state.aicomponent/manifest.json +34 -0
- package/skills/level_state.aicomponent/ref/LevelDataManager.ts +26 -0
- package/skills/level_state.aicomponent/ref/LevelManager.ts +26 -0
- package/skills/loading_screen.aicomponent/SKILL.md +57 -0
- package/skills/loading_screen.aicomponent/manifest.json +43 -0
- package/skills/loading_screen.aicomponent/ref/LoadingUI.ts +339 -0
- package/skills/lose_result_panel.aiimage/SKILL.md +58 -0
- package/skills/lose_result_panel.aiimage/manifest.json +47 -0
- package/skills/lose_result_panel.aiimage/ref/lose.png +0 -0
- package/skills/lose_result_panel.aiimage/ref/lose.webp +0 -0
- package/skills/lose_sfx.aiaudio/SKILL.md +59 -0
- package/skills/lose_sfx.aiaudio/manifest.json +45 -0
- package/skills/lose_sfx.aiaudio/ref/lose.mp3 +0 -0
- package/skills/match-pop.aicomponent/SKILL.md +29 -0
- package/skills/match-pop.aicomponent/manifest.json +19 -0
- package/skills/match-pop.aicomponent/ref/phaser.js +30 -0
- package/skills/match-pop.aicomponent/ref/playcanvas.js +22 -0
- package/skills/match3_core.aigameplay/SKILL.md +125 -0
- package/skills/match3_core.aigameplay/manifest.json +107 -0
- package/skills/match3_core.aigameplay/ref/pgs-schema.json +154 -0
- package/skills/match3_core.aigameplay/ref/reducer.template.ts +191 -0
- package/skills/match_engine.aicomponent/SKILL.md +84 -0
- package/skills/match_engine.aicomponent/manifest.json +23 -0
- package/skills/match_engine.aicomponent/ref/MatchEngine.ts +75 -0
- package/skills/memory_match.aigameplay/SKILL.md +111 -0
- package/skills/memory_match.aigameplay/manifest.json +164 -0
- package/skills/memory_match.aigameplay/ref/pgs-schema.json +190 -0
- package/skills/memory_match.aigameplay/ref/reducer.template.ts +162 -0
- package/skills/merge_core.aigameplay/SKILL.md +112 -0
- package/skills/merge_core.aigameplay/manifest.json +154 -0
- package/skills/merge_core.aigameplay/ref/pgs-schema.json +202 -0
- package/skills/merge_core.aigameplay/ref/reducer.template.ts +179 -0
- package/skills/mistake_sfx.aiaudio/SKILL.md +59 -0
- package/skills/mistake_sfx.aiaudio/manifest.json +45 -0
- package/skills/mistake_sfx.aiaudio/ref/mistake.mp3 +0 -0
- package/skills/nomove_hint_overlay.aiimage/SKILL.md +58 -0
- package/skills/nomove_hint_overlay.aiimage/manifest.json +48 -0
- package/skills/nomove_hint_overlay.aiimage/ref/nomove_hint.png +0 -0
- package/skills/nomove_hint_overlay.aiimage/ref/nomove_hint.webp +0 -0
- package/skills/normal_dot.aiimage/SKILL.md +58 -0
- package/skills/normal_dot.aiimage/manifest.json +46 -0
- package/skills/normal_dot.aiimage/ref/normal_dot.png +0 -0
- package/skills/normal_dot.aiimage/ref/normal_dot.webp +0 -0
- package/skills/ocean.aiimage/SKILL.md +71 -0
- package/skills/ocean.aiimage/manifest.json +49 -0
- package/skills/particle-confetti.aicomponent/SKILL.md +32 -0
- package/skills/particle-confetti.aicomponent/manifest.json +21 -0
- package/skills/particle-confetti.aicomponent/ref/html5-spritesheet.js +17 -0
- package/skills/particle-confetti.aicomponent/ref/phaser.js +38 -0
- package/skills/particle-explosion.aicomponent/SKILL.md +37 -0
- package/skills/particle-explosion.aicomponent/manifest.json +24 -0
- package/skills/particle-explosion.aicomponent/ref/html5-spritesheet.js +40 -0
- package/skills/particle-explosion.aicomponent/ref/phaser.js +46 -0
- package/skills/particle-explosion.aicomponent/ref/playcanvas.js +33 -0
- package/skills/particle-trail.aicomponent/SKILL.md +25 -0
- package/skills/particle-trail.aicomponent/manifest.json +22 -0
- package/skills/particle-trail.aicomponent/ref/phaser.js +31 -0
- package/skills/path_animation.aicomponent/SKILL.md +82 -0
- package/skills/path_animation.aicomponent/manifest.json +77 -0
- package/skills/path_animation.aicomponent/ref/AnimationManager.ts +694 -0
- package/skills/path_animation.aicomponent/ref/AnimationManager3D.ts +317 -0
- package/skills/path_elimination_rules.aigameplay/SKILL.md +88 -0
- package/skills/path_elimination_rules.aigameplay/manifest.json +119 -0
- package/skills/path_elimination_rules.aigameplay/ref/pgs-schema.json +227 -0
- package/skills/path_input_handler.aicomponent/SKILL.md +87 -0
- package/skills/path_input_handler.aicomponent/manifest.json +97 -0
- package/skills/path_input_handler.aicomponent/ref/InputHandler.ts +714 -0
- package/skills/path_input_handler.aicomponent/ref/InputHandler3D.ts +204 -0
- package/skills/path_renderer.aicomponent/SKILL.md +101 -0
- package/skills/path_renderer.aicomponent/manifest.json +69 -0
- package/skills/path_renderer.aicomponent/ref/PathRenderer.ts +509 -0
- package/skills/path_renderer.aicomponent/ref/PathRenderer3D.ts +176 -0
- package/skills/path_renderer.aicomponent/ref/PathRenderers.ts +640 -0
- package/skills/phaser.aicomponent/SKILL.md +315 -0
- package/skills/phaser.aicomponent/manifest.json +156 -0
- package/skills/phaser.aicomponent/ref/BootScene.ts +29 -0
- package/skills/phaser.aicomponent/ref/GameConfig.ts +29 -0
- package/skills/phaser.aicomponent/ref/GameScene.ts +88 -0
- package/skills/phaser.aicomponent/ref/PreloaderScene.ts +78 -0
- package/skills/phaser.aicomponent/ref/SceneKeys.ts +7 -0
- package/skills/phaser.aicomponent/ref/SoundUtils.ts +21 -0
- package/skills/phaser.aicomponent/ref/UiLayout.ts +74 -0
- package/skills/phaser.aicomponent/ref/globals.d.ts +52 -0
- package/skills/phaser.aicomponent/ref/index.css +40 -0
- package/skills/phaser.aicomponent/ref/index.html +14 -0
- package/skills/phaser.aicomponent/ref/index.ts +48 -0
- package/skills/phaser.aicomponent/ref/main.ts +16 -0
- package/skills/phaser.aicomponent/ref/package.json +22 -0
- package/skills/phaser.aicomponent/ref/tsconfig.json +25 -0
- package/skills/phaser.aicomponent/ref/webpack.config.js +57 -0
- package/skills/phaser_scene_lifecycle.aicomponent/SKILL.md +63 -0
- package/skills/phaser_scene_lifecycle.aicomponent/manifest.json +33 -0
- package/skills/pick_and_match_rules.aigameplay/SKILL.md +113 -0
- package/skills/pick_and_match_rules.aigameplay/manifest.json +121 -0
- package/skills/pick_and_match_rules.aigameplay/ref/pgs-schema.json +354 -0
- package/skills/pin_pull.aigameplay/SKILL.md +110 -0
- package/skills/pin_pull.aigameplay/manifest.json +164 -0
- package/skills/pin_pull.aigameplay/ref/pgs-schema.json +201 -0
- package/skills/pin_pull.aigameplay/ref/reducer.template.ts +216 -0
- package/skills/playable_app_logo.aiimage/SKILL.md +58 -0
- package/skills/playable_app_logo.aiimage/manifest.json +47 -0
- package/skills/playable_app_logo.aiimage/ref/logo.png +0 -0
- package/skills/playable_app_logo.aiimage/ref/logo.webp +0 -0
- package/skills/playable_end_screen_layout.aicomponent/SKILL.md +75 -0
- package/skills/playable_end_screen_layout.aicomponent/manifest.json +24 -0
- package/skills/playable_guidance_layer.aicomponent/SKILL.md +89 -0
- package/skills/playable_guidance_layer.aicomponent/manifest.json +24 -0
- package/skills/playable_hud_layout.aicomponent/SKILL.md +96 -0
- package/skills/playable_hud_layout.aicomponent/manifest.json +24 -0
- package/skills/playable_scripts_build.aicomponent/SKILL.md +69 -0
- package/skills/playable_scripts_build.aicomponent/manifest.json +53 -0
- package/skills/playable_scripts_build.aicomponent/ref/builds.config.js +257 -0
- package/skills/playcraft-3d-flip-sprite/SKILL.md +336 -0
- package/skills/playcraft-3d-flip-sprite/renderer/flatten_glb.mjs +62 -0
- package/skills/playcraft-3d-flip-sprite/renderer/render.mjs +325 -0
- package/skills/playcraft-3d-flip-sprite/renderer/render_single.mjs +138 -0
- package/skills/playcraft-asset-management/SKILL.md +73 -0
- package/skills/playcraft-audio-generation/SKILL.md +126 -0
- package/skills/playcraft-build/SKILL.md +44 -0
- package/skills/playcraft-code-editor/SKILL.md +71 -0
- package/skills/playcraft-create-remix/SKILL.md +62 -0
- package/skills/playcraft-deploy/SKILL.md +59 -0
- package/skills/playcraft-image-generation/SKILL.md +148 -0
- package/skills/playcraft-image-processing/SKILL.md +216 -0
- package/skills/playcraft-platform-intro/SKILL.md +41 -0
- package/skills/playcraft-prefab/SKILL.md +98 -0
- package/skills/playcraft-project-management/SKILL.md +57 -0
- package/skills/playcraft-remix-workflow/SKILL.md +119 -0
- package/skills/playcraft-remix-workflow/references/xplatform.schema.json5 +31 -0
- package/skills/playcraft-save/SKILL.md +46 -0
- package/skills/playcraft-skill-recommender/SKILL.md +152 -0
- package/skills/playcraft-sprite-generation/SKILL.md +534 -0
- package/skills/playcraft-sprite-remix/SKILL.md +155 -0
- package/skills/playcraft-sprite-sheet/SKILL.md +97 -0
- package/skills/playtest_report.aivalidator/SKILL.md +103 -0
- package/skills/playtest_report.aivalidator/manifest.json +21 -0
- package/skills/preloader_scene.aicomponent/SKILL.md +58 -0
- package/skills/preloader_scene.aicomponent/manifest.json +43 -0
- package/skills/preloader_scene.aicomponent/ref/Preloader.ts +339 -0
- package/skills/progress_bar.aicomponent/SKILL.md +38 -0
- package/skills/progress_bar.aicomponent/manifest.json +25 -0
- package/skills/progress_bar.aicomponent/ref/ProgressDisplay.ts +140 -0
- package/skills/references/xplatform.schema.json5 +31 -0
- package/skills/responsive_2d_layout.aicomponent/SKILL.md +161 -0
- package/skills/responsive_2d_layout.aicomponent/manifest.json +43 -0
- package/skills/responsive_2d_layout.aicomponent/ref/UiLayout.ts +56 -0
- package/skills/run_context_state.aicomponent/SKILL.md +54 -0
- package/skills/run_context_state.aicomponent/manifest.json +40 -0
- package/skills/run_context_state.aicomponent/ref/RunContextRuntime.ts +30 -0
- package/skills/score-fly.aicomponent/SKILL.md +31 -0
- package/skills/score-fly.aicomponent/manifest.json +21 -0
- package/skills/score-fly.aicomponent/ref/phaser.js +26 -0
- package/skills/score-fly.aicomponent/ref/playcanvas.js +28 -0
- package/skills/score_goal.aiconfig/SKILL.md +46 -0
- package/skills/score_goal.aiconfig/manifest.json +33 -0
- package/skills/screen-flash.aicomponent/SKILL.md +30 -0
- package/skills/screen-flash.aicomponent/manifest.json +20 -0
- package/skills/screen-flash.aicomponent/ref/phaser.js +48 -0
- package/skills/screen-shake.aicomponent/SKILL.md +30 -0
- package/skills/screen-shake.aicomponent/manifest.json +19 -0
- package/skills/screen-shake.aicomponent/ref/phaser.js +23 -0
- package/skills/screen-shake.aicomponent/ref/playcanvas.js +44 -0
- package/skills/screw_puzzle.aigameplay/SKILL.md +116 -0
- package/skills/screw_puzzle.aigameplay/manifest.json +164 -0
- package/skills/screw_puzzle.aigameplay/ref/pgs-schema.json +235 -0
- package/skills/screw_puzzle.aigameplay/ref/reducer.template.ts +213 -0
- package/skills/settings_state.aicomponent/SKILL.md +61 -0
- package/skills/settings_state.aicomponent/manifest.json +33 -0
- package/skills/settings_state.aicomponent/ref/SettingsManager.ts +130 -0
- package/skills/slide_out_to_tray_animation.aicomponent/SKILL.md +64 -0
- package/skills/slide_out_to_tray_animation.aicomponent/manifest.json +58 -0
- package/skills/slide_out_to_tray_animation.aicomponent/ref/AnimationManager.ts +164 -0
- package/skills/slide_out_to_tray_animation.aicomponent/ref/AnimationManager3D.ts +198 -0
- package/skills/slide_out_to_tray_animation.aicomponent/ref/BezierUtils.ts +59 -0
- package/skills/slot_machine.aigameplay/SKILL.md +119 -0
- package/skills/slot_machine.aigameplay/manifest.json +166 -0
- package/skills/slot_machine.aigameplay/ref/pgs-schema.json +212 -0
- package/skills/slot_machine.aigameplay/ref/reducer.template.ts +212 -0
- package/skills/sniper_shot.aigameplay/SKILL.md +84 -0
- package/skills/sniper_shot.aigameplay/manifest.json +153 -0
- package/skills/sniper_shot.aigameplay/ref/pgs-schema.json +211 -0
- package/skills/sniper_shot.aigameplay/ref/reducer.template.ts +211 -0
- package/skills/solitaire.aigameplay/SKILL.md +101 -0
- package/skills/solitaire.aigameplay/manifest.json +151 -0
- package/skills/solitaire.aigameplay/ref/pgs-schema.json +200 -0
- package/skills/solitaire.aigameplay/ref/reducer.template.ts +176 -0
- package/skills/sound-effects/SKILL.md +46 -0
- package/skills/sound_utils.aicomponent/SKILL.md +52 -0
- package/skills/sound_utils.aicomponent/manifest.json +30 -0
- package/skills/sound_utils.aicomponent/ref/SoundUtils.ts +29 -0
- package/skills/sprite-animation-2d.aicomponent/SKILL.md +45 -0
- package/skills/sprite-animation-2d.aicomponent/manifest.json +28 -0
- package/skills/sprite-animation-2d.aicomponent/ref/html5.js +83 -0
- package/skills/sprite-animation-2d.aicomponent/ref/phaser.js +38 -0
- package/skills/sprite-animation-2d.aicomponent/ref/playcanvas.js +67 -0
- package/skills/sprite_entity_renderer.aicomponent/SKILL.md +148 -0
- package/skills/sprite_entity_renderer.aicomponent/manifest.json +17 -0
- package/skills/sprite_entity_renderer.aicomponent/ref/SpriteEntityRenderer.ts +126 -0
- package/skills/success_sfx.aiaudio/SKILL.md +59 -0
- package/skills/success_sfx.aiaudio/manifest.json +45 -0
- package/skills/success_sfx.aiaudio/ref/success.mp3 +0 -0
- package/skills/tap_blast.aigameplay/SKILL.md +116 -0
- package/skills/tap_blast.aigameplay/manifest.json +153 -0
- package/skills/tap_blast.aigameplay/ref/pgs-schema.json +208 -0
- package/skills/tap_blast.aigameplay/ref/reducer.template.ts +202 -0
- package/skills/theme_state.aicomponent/SKILL.md +53 -0
- package/skills/theme_state.aicomponent/manifest.json +33 -0
- package/skills/theme_state.aicomponent/ref/ThemeManager.ts +174 -0
- package/skills/theme_switcher_build.aicomponent/SKILL.md +62 -0
- package/skills/theme_switcher_build.aicomponent/manifest.json +38 -0
- package/skills/theme_switcher_build.aicomponent/ref/theme-index.ts +8 -0
- package/skills/theme_variant.aiconfig/SKILL.md +78 -0
- package/skills/theme_variant.aiconfig/manifest.json +39 -0
- package/skills/theme_variant.aiconfig/ref/ExampleTheme/index.ts +16 -0
- package/skills/theme_variant.aiconfig/ref/ExampleTheme/levelEasy.json +141 -0
- package/skills/threejs.aicomponent/SKILL.md +422 -0
- package/skills/threejs.aicomponent/manifest.json +166 -0
- package/skills/threejs.aicomponent/ref/AssetLoader.ts +158 -0
- package/skills/threejs.aicomponent/ref/BaseScene.ts +88 -0
- package/skills/threejs.aicomponent/ref/GameConfig.ts +47 -0
- package/skills/threejs.aicomponent/ref/MainScene.ts +170 -0
- package/skills/threejs.aicomponent/ref/PreloaderScene.ts +93 -0
- package/skills/threejs.aicomponent/ref/SceneKeys.ts +6 -0
- package/skills/threejs.aicomponent/ref/SceneManager.ts +69 -0
- package/skills/threejs.aicomponent/ref/ViewportManager.ts +62 -0
- package/skills/threejs.aicomponent/ref/globals.d.ts +74 -0
- package/skills/threejs.aicomponent/ref/index.css +80 -0
- package/skills/threejs.aicomponent/ref/index.html +20 -0
- package/skills/threejs.aicomponent/ref/index.ts +117 -0
- package/skills/threejs.aicomponent/ref/main.ts +10 -0
- package/skills/threejs.aicomponent/ref/package.json +23 -0
- package/skills/threejs.aicomponent/ref/tsconfig.json +24 -0
- package/skills/threejs.aicomponent/ref/webpack.config.js +61 -0
- package/skills/time_clear_goal.aiconfig/SKILL.md +46 -0
- package/skills/time_clear_goal.aiconfig/manifest.json +32 -0
- package/skills/time_icon.aiimage/SKILL.md +58 -0
- package/skills/time_icon.aiimage/manifest.json +47 -0
- package/skills/time_icon.aiimage/ref/time.png +0 -0
- package/skills/time_icon.aiimage/ref/time.webp +0 -0
- package/skills/top_ui_bar.aicomponent/SKILL.md +45 -0
- package/skills/top_ui_bar.aicomponent/manifest.json +27 -0
- package/skills/top_ui_bar.aicomponent/ref/GameTopUI.ts +229 -0
- package/skills/tower_defence.aigameplay/SKILL.md +117 -0
- package/skills/tower_defence.aigameplay/manifest.json +175 -0
- package/skills/tower_defence.aigameplay/ref/pgs-schema.json +247 -0
- package/skills/tower_defence.aigameplay/ref/reducer.template.ts +239 -0
- package/skills/tray_container.aicomponent/SKILL.md +143 -0
- package/skills/tray_container.aicomponent/manifest.json +58 -0
- package/skills/tray_container.aicomponent/ref/TrayRenderer.ts +155 -0
- package/skills/tray_container.aicomponent/ref/TrayRenderer3D.ts +281 -0
- package/skills/tray_container.aicomponent/ref/TrayRendererHtmlOverlay.ts +228 -0
- package/skills/tutorial_overlay.aicomponent/SKILL.md +46 -0
- package/skills/tutorial_overlay.aicomponent/manifest.json +34 -0
- package/skills/tutorial_overlay.aicomponent/ref/TutorialManager.ts +367 -0
- package/skills/tween-animation-2d.aicomponent/SKILL.md +35 -0
- package/skills/tween-animation-2d.aicomponent/manifest.json +28 -0
- package/skills/tween-animation-2d.aicomponent/ref/phaser.js +49 -0
- package/skills/tween-animation-2d.aicomponent/ref/playcanvas.js +36 -0
- package/skills/typescript_module_patterns.aicomponent/SKILL.md +209 -0
- package/skills/typescript_module_patterns.aicomponent/manifest.json +28 -0
- package/skills/typescript_module_patterns.aicomponent/ref/globals.d.ts +31 -0
- package/skills/ui-transition.aicomponent/SKILL.md +33 -0
- package/skills/ui-transition.aicomponent/manifest.json +19 -0
- package/skills/ui-transition.aicomponent/ref/phaser.js +45 -0
- package/skills/ux_flow_spec.aiconfig/SKILL.md +82 -0
- package/skills/ux_flow_spec.aiconfig/manifest.json +39 -0
- package/skills/wave_difficulty.aiconfig/SKILL.md +46 -0
- package/skills/wave_difficulty.aiconfig/manifest.json +33 -0
- package/skills/webpack_build.aicomponent/SKILL.md +204 -0
- package/skills/webpack_build.aicomponent/manifest.json +29 -0
- package/skills/webpack_build.aicomponent/ref/package.json +16 -0
- package/skills/webpack_build.aicomponent/ref/webpack.config.js +53 -0
- package/skills/win_anim_sfx.aiaudio/SKILL.md +59 -0
- package/skills/win_anim_sfx.aiaudio/manifest.json +46 -0
- package/skills/win_anim_sfx.aiaudio/ref/win_anim.mp3 +0 -0
- package/skills/win_dot.aiimage/SKILL.md +58 -0
- package/skills/win_dot.aiimage/manifest.json +47 -0
- package/skills/win_dot.aiimage/ref/win_dot.png +0 -0
- package/skills/win_dot.aiimage/ref/win_dot.webp +0 -0
- package/skills/win_result_panel.aiimage/SKILL.md +58 -0
- package/skills/win_result_panel.aiimage/manifest.json +47 -0
- package/skills/win_result_panel.aiimage/ref/win.png +0 -0
- package/skills/win_result_panel.aiimage/ref/win.webp +0 -0
- package/skills/word_connect.aigameplay/SKILL.md +86 -0
- package/skills/word_connect.aigameplay/manifest.json +154 -0
- package/skills/word_connect.aigameplay/ref/pgs-schema.json +212 -0
- package/skills/word_connect.aigameplay/ref/reducer.template.ts +186 -0
- package/src/index.ts +10 -0
- package/src/skills.loader.ts +225 -0
- package/src/skills.types.ts +42 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "score-fly.aicomponent",
|
|
4
|
+
"bundleType": "aicomponent",
|
|
5
|
+
"category": "animation",
|
|
6
|
+
"mode": "fixed",
|
|
7
|
+
"label": { "zh": "分数飞起动画", "en": "Score Fly-Up Animation" },
|
|
8
|
+
"tags": ["animation", "score", "ui", "text", "feedback", "playcanvas", "phaser"],
|
|
9
|
+
"generation": {
|
|
10
|
+
"animationType": "tween",
|
|
11
|
+
"engineSupport": ["playcanvas", "phaser", "html5"],
|
|
12
|
+
"parameters": {
|
|
13
|
+
"text": "string — score text to display (e.g. '+100')",
|
|
14
|
+
"flyHeight": "number — pixels to float up (default: 60)",
|
|
15
|
+
"duration": "number — animation duration in ms (default: 800)",
|
|
16
|
+
"color": "string — text color hex (default: '#FFD700')",
|
|
17
|
+
"fontSize": "number — font size in pixels (default: 32)"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": { "skill": "SKILL.md", "phaser": "ref/phaser.js", "playcanvas": "ref/playcanvas.js" }
|
|
21
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// score-fly — Phaser 3 implementation
|
|
2
|
+
|
|
3
|
+
function showScoreFly(scene, { x, y, text, flyHeight = 60, duration = 800, color = '#FFD700', fontSize = 32 }) {
|
|
4
|
+
const label = scene.add.text(x, y, text, {
|
|
5
|
+
fontSize: `${fontSize}px`,
|
|
6
|
+
fontFamily: 'Arial Black, Arial',
|
|
7
|
+
color,
|
|
8
|
+
stroke: '#000000',
|
|
9
|
+
strokeThickness: 3,
|
|
10
|
+
}).setOrigin(0.5, 0.5).setScale(0).setDepth(100);
|
|
11
|
+
|
|
12
|
+
scene.tweens.chain({
|
|
13
|
+
targets: label,
|
|
14
|
+
tweens: [
|
|
15
|
+
{ scaleX: 1.2, scaleY: 1.2, duration: 120, ease: 'Elastic.Out' },
|
|
16
|
+
{ scaleX: 1.0, scaleY: 1.0, duration: 80, ease: 'Cubic.Out' },
|
|
17
|
+
{ y: y - flyHeight, alpha: 0, duration: duration - 200, ease: 'Cubic.Out',
|
|
18
|
+
onComplete: () => label.destroy() },
|
|
19
|
+
],
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
return label;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Usage:
|
|
26
|
+
// showScoreFly(this, { x: tile.x, y: tile.y, text: '+100' });
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// score-fly — PlayCanvas implementation (UI Text element)
|
|
2
|
+
// Create a UI Text entity and call scoreFly() on it.
|
|
3
|
+
|
|
4
|
+
function scoreFly(entity, { flyHeight = 60, duration = 0.8 } = {}) {
|
|
5
|
+
var startPos = entity.getLocalPosition().clone();
|
|
6
|
+
var endPos = new pc.Vec3(startPos.x, startPos.y + flyHeight, startPos.z);
|
|
7
|
+
|
|
8
|
+
entity.setLocalScale(0, 0, 1);
|
|
9
|
+
entity.tween(entity.getLocalScale())
|
|
10
|
+
.to({ x: 1.2, y: 1.2, z: 1 }, 0.12, pc.ElasticOut)
|
|
11
|
+
.then(entity.tween(entity.getLocalScale()).to({ x: 1, y: 1, z: 1 }, 0.08, pc.QuadOut))
|
|
12
|
+
.start();
|
|
13
|
+
|
|
14
|
+
entity.tween(startPos)
|
|
15
|
+
.to(endPos, duration - 0.2, pc.QuadOut)
|
|
16
|
+
.delay(0.2)
|
|
17
|
+
.start();
|
|
18
|
+
|
|
19
|
+
// Fade via script attribute
|
|
20
|
+
var element = entity.element;
|
|
21
|
+
if (element) {
|
|
22
|
+
entity.tween({ opacity: 1 })
|
|
23
|
+
.to({ opacity: 0 }, duration - 0.2, pc.QuadIn)
|
|
24
|
+
.delay(0.2)
|
|
25
|
+
.on('complete', function () { entity.destroy(); })
|
|
26
|
+
.start();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: score_goal.aiconfig
|
|
3
|
+
description: 分数达标目标机制配置封包 - 关卡目标为达到指定分数,适合三消/台球类游戏
|
|
4
|
+
triggers: 分数,score,目标,goal,达标,target,得分,计分,配置,config,机制,mechanism
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# score_goal.aiconfig
|
|
8
|
+
|
|
9
|
+
分数达标目标机制配置封包。玩家需要在限制步数/时间内达到目标分数才能通关。
|
|
10
|
+
|
|
11
|
+
## Recipe
|
|
12
|
+
|
|
13
|
+
- **配置方式**:参数化(parametric)
|
|
14
|
+
- **核心参数**:
|
|
15
|
+
- `goalType`: `"score"`
|
|
16
|
+
- `targetScore`: 1000(目标分数)
|
|
17
|
+
- `scorePerMatch`: 50(每次消除得分)
|
|
18
|
+
- `bonusMultiplier`: 2(连消奖励倍数)
|
|
19
|
+
- **可 fork 变体**:
|
|
20
|
+
- 高分挑战:`targetScore: 3000`,更高分数要求
|
|
21
|
+
- 低分入门:`targetScore: 500`,降低门槛
|
|
22
|
+
|
|
23
|
+
**配置步骤:**
|
|
24
|
+
1. 读取 `game/config.json`
|
|
25
|
+
2. 写入 `level.goalType = "score"` 及分数参数
|
|
26
|
+
3. 更新 manifest
|
|
27
|
+
|
|
28
|
+
## Result
|
|
29
|
+
|
|
30
|
+
- **产物**:修改 `game/config.json` 键值
|
|
31
|
+
- **目标键**:`level.goalType = "score"`
|
|
32
|
+
|
|
33
|
+
## Binding
|
|
34
|
+
|
|
35
|
+
- **Binding Role**:`gameConfig`
|
|
36
|
+
- **挂载目标**:`game/config.json`
|
|
37
|
+
- **引用类型**:`config-key-value`
|
|
38
|
+
|
|
39
|
+
## Skill Definition
|
|
40
|
+
|
|
41
|
+
tools:
|
|
42
|
+
- read
|
|
43
|
+
- write
|
|
44
|
+
prompt_extension: |
|
|
45
|
+
You are configuring a score-based goal mechanism for a match-3 or billiards game.
|
|
46
|
+
Write the score goal parameters to game/config.json per the Recipe. Apply the Binding.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "score_goal.aiconfig",
|
|
4
|
+
"bundleType": "aiconfig",
|
|
5
|
+
"category": "config",
|
|
6
|
+
"mode": "parametric",
|
|
7
|
+
"label": { "zh": "分数达标目标配置", "en": "Score goal config" },
|
|
8
|
+
"tags": ["config", "goal", "score", "target", "mechanism", "level"],
|
|
9
|
+
"bindingRoles": ["gameConfig"],
|
|
10
|
+
"generation": {
|
|
11
|
+
"kind": "config-patch",
|
|
12
|
+
"params": {
|
|
13
|
+
"goalType": "score",
|
|
14
|
+
"targetScore": 1000,
|
|
15
|
+
"scorePerMatch": 50,
|
|
16
|
+
"bonusMultiplier": 2
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"result": {
|
|
20
|
+
"configKey": "level.goalType",
|
|
21
|
+
"configValue": "score",
|
|
22
|
+
"format": "json-patch"
|
|
23
|
+
},
|
|
24
|
+
"binding": {
|
|
25
|
+
"role": "gameConfig",
|
|
26
|
+
"target": "game/config.json",
|
|
27
|
+
"type": "config-key-value",
|
|
28
|
+
"constraints": { "key": "level.goalType" }
|
|
29
|
+
},
|
|
30
|
+
"files": {
|
|
31
|
+
"skill": "SKILL.md"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# screen-flash — Screen Flash VFX
|
|
2
|
+
|
|
3
|
+
Full-screen color flash overlay for dramatic impact moments.
|
|
4
|
+
|
|
5
|
+
## Common Uses
|
|
6
|
+
|
|
7
|
+
| Color | Use Case |
|
|
8
|
+
|-------|----------|
|
|
9
|
+
| White `#FFFFFF` | Explosion, lightning, perfect score |
|
|
10
|
+
| Red `#FF0000` | Damage taken, game over |
|
|
11
|
+
| Gold `#FFD700` | Level complete, achievement |
|
|
12
|
+
| Blue `#4488FF` | Power-up collected, freeze effect |
|
|
13
|
+
| Black `#000000` | Scene transition, blackout |
|
|
14
|
+
|
|
15
|
+
## Animation Sequence
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
0ms → holdTime: Fade in (alpha 0 → peak)
|
|
19
|
+
holdTime → end: Fade out (alpha peak → 0)
|
|
20
|
+
Total: 200ms default
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Parameters
|
|
24
|
+
|
|
25
|
+
| Parameter | Default | Description |
|
|
26
|
+
|-----------|---------|-------------|
|
|
27
|
+
| `color` | `#FFFFFF` | Flash color |
|
|
28
|
+
| `alpha` | 0.7 | Maximum opacity (0–1) |
|
|
29
|
+
| `duration` | 200ms | Total duration |
|
|
30
|
+
| `holdTime` | 50ms | Time to hold at peak before fading |
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "screen-flash.aicomponent",
|
|
4
|
+
"bundleType": "aicomponent",
|
|
5
|
+
"category": "vfx",
|
|
6
|
+
"mode": "fixed",
|
|
7
|
+
"label": { "zh": "全屏闪光特效", "en": "Screen Flash VFX" },
|
|
8
|
+
"tags": ["vfx", "screen-flash", "impact", "feedback", "ui", "playcanvas", "phaser"],
|
|
9
|
+
"generation": {
|
|
10
|
+
"animationType": "tween",
|
|
11
|
+
"engineSupport": ["playcanvas", "phaser", "html5"],
|
|
12
|
+
"parameters": {
|
|
13
|
+
"color": "string — flash color hex (default: '#FFFFFF')",
|
|
14
|
+
"alpha": "number — max opacity (default: 0.7)",
|
|
15
|
+
"duration": "number — total flash duration in ms (default: 200)",
|
|
16
|
+
"holdTime": "number — ms to hold at peak before fading (default: 50)"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": { "skill": "SKILL.md", "phaser": "ref/phaser.js" }
|
|
20
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// screen-flash — Phaser 3 implementation
|
|
2
|
+
|
|
3
|
+
function screenFlash(scene, {
|
|
4
|
+
color = 0xFFFFFF,
|
|
5
|
+
alpha = 0.7,
|
|
6
|
+
duration = 200,
|
|
7
|
+
holdTime = 50,
|
|
8
|
+
} = {}) {
|
|
9
|
+
// Use Phaser camera flash (simplest, cleanest)
|
|
10
|
+
scene.cameras.main.flash(duration, (color >> 16) & 0xFF, (color >> 8) & 0xFF, color & 0xFF, true);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Alternative: overlay rectangle (more control)
|
|
14
|
+
function screenFlashOverlay(scene, {
|
|
15
|
+
color = '#FFFFFF',
|
|
16
|
+
alpha = 0.7,
|
|
17
|
+
duration = 200,
|
|
18
|
+
holdTime = 50,
|
|
19
|
+
} = {}) {
|
|
20
|
+
const { width, height } = scene.cameras.main;
|
|
21
|
+
const overlay = scene.add.rectangle(width / 2, height / 2, width, height,
|
|
22
|
+
parseInt(color.replace('#', ''), 16), 0
|
|
23
|
+
).setDepth(999).setScrollFactor(0);
|
|
24
|
+
|
|
25
|
+
scene.tweens.chain({
|
|
26
|
+
targets: overlay,
|
|
27
|
+
tweens: [
|
|
28
|
+
{ fillAlpha: alpha, duration: holdTime, ease: 'Linear' },
|
|
29
|
+
{ fillAlpha: 0, duration: duration - holdTime, ease: 'Cubic.Out',
|
|
30
|
+
onComplete: () => overlay.destroy() },
|
|
31
|
+
],
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
return overlay;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Presets
|
|
38
|
+
const FLASH_PRESETS = {
|
|
39
|
+
white: { color: 0xFFFFFF, alpha: 0.7, duration: 200 },
|
|
40
|
+
red: { color: 0xFF0000, alpha: 0.5, duration: 300 },
|
|
41
|
+
gold: { color: 0xFFD700, alpha: 0.6, duration: 400 },
|
|
42
|
+
blue: { color: 0x4488FF, alpha: 0.5, duration: 250 },
|
|
43
|
+
black: { color: 0x000000, alpha: 1.0, duration: 500 },
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// Usage:
|
|
47
|
+
// screenFlash(this, FLASH_PRESETS.red); // damage flash
|
|
48
|
+
// screenFlash(this, FLASH_PRESETS.gold); // level complete
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# screen-shake — Screen Shake Effect
|
|
2
|
+
|
|
3
|
+
Camera shake for impact feedback — explosions, match failures, boss attacks, hard landings.
|
|
4
|
+
|
|
5
|
+
## Presets
|
|
6
|
+
|
|
7
|
+
| Preset | Intensity | Duration | Use Case |
|
|
8
|
+
|--------|-----------|----------|----------|
|
|
9
|
+
| `micro` | 3px | 150ms | Soft button tap |
|
|
10
|
+
| `small` | 6px | 200ms | Item pickup, coin collect |
|
|
11
|
+
| `medium` | 10px | 300ms | Match combo, hit feedback |
|
|
12
|
+
| `large` | 20px | 500ms | Explosion, level fail |
|
|
13
|
+
| `boss` | 35px | 800ms | Boss attack, catastrophic event |
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Default | Description |
|
|
18
|
+
|-----------|---------|-------------|
|
|
19
|
+
| `intensity` | 8 | Shake amplitude in pixels |
|
|
20
|
+
| `duration` | 300ms | Shake duration |
|
|
21
|
+
| `decay` | 0.9 | Per-frame decay factor (closer to 1 = longer tail) |
|
|
22
|
+
| `frequency` | 20 | Oscillations per second |
|
|
23
|
+
|
|
24
|
+
## Decision Notes
|
|
25
|
+
|
|
26
|
+
| Decision | Reason |
|
|
27
|
+
|----------|--------|
|
|
28
|
+
| Decay-based over fixed amplitude | Natural shake feels organic; linear doesn't |
|
|
29
|
+
| Camera shake > entity shake | Shaking individual entities creates sync issues in multi-entity scenes |
|
|
30
|
+
| 300ms default | Long enough to feel impactful, short enough to not interrupt gameplay |
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "screen-shake.aicomponent",
|
|
4
|
+
"bundleType": "aicomponent",
|
|
5
|
+
"category": "animation",
|
|
6
|
+
"mode": "fixed",
|
|
7
|
+
"label": { "zh": "屏幕震动效果", "en": "Screen Shake Effect" },
|
|
8
|
+
"tags": ["animation", "screen-shake", "camera", "impact", "playcanvas", "phaser"],
|
|
9
|
+
"generation": {
|
|
10
|
+
"animationType": "camera",
|
|
11
|
+
"engineSupport": ["playcanvas", "phaser"],
|
|
12
|
+
"parameters": {
|
|
13
|
+
"intensity": "number — shake amplitude in pixels (default: 8)",
|
|
14
|
+
"duration": "number — shake duration in ms (default: 300)",
|
|
15
|
+
"decay": "number — how quickly shake fades (0–1, default: 0.9)"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": { "skill": "SKILL.md", "playcanvas": "ref/playcanvas.js", "phaser": "ref/phaser.js" }
|
|
19
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// screen-shake — Phaser 3 implementation
|
|
2
|
+
// Uses Phaser's built-in camera shake.
|
|
3
|
+
|
|
4
|
+
function screenShake(scene, { intensity = 8, duration = 300 } = {}) {
|
|
5
|
+
scene.cameras.main.shake(duration, intensity / scene.cameras.main.width);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// Preset shakes
|
|
9
|
+
const SHAKE_PRESETS = {
|
|
10
|
+
micro: { intensity: 3, duration: 150 },
|
|
11
|
+
small: { intensity: 6, duration: 200 },
|
|
12
|
+
medium: { intensity: 10, duration: 300 },
|
|
13
|
+
large: { intensity: 20, duration: 500 },
|
|
14
|
+
boss: { intensity: 35, duration: 800 },
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
function screenShakePreset(scene, preset = 'medium') {
|
|
18
|
+
screenShake(scene, SHAKE_PRESETS[preset] ?? SHAKE_PRESETS.medium);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Usage:
|
|
22
|
+
// screenShakePreset(this, 'medium');
|
|
23
|
+
// screenShake(this, { intensity: 15, duration: 400 });
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// screen-shake — PlayCanvas implementation
|
|
2
|
+
// Attach to the Camera entity.
|
|
3
|
+
|
|
4
|
+
var ScreenShake = pc.createScript('screenShake');
|
|
5
|
+
ScreenShake.attributes.add('intensity', { type: 'number', default: 8 });
|
|
6
|
+
ScreenShake.attributes.add('duration', { type: 'number', default: 0.3 });
|
|
7
|
+
ScreenShake.attributes.add('decay', { type: 'number', default: 0.9 });
|
|
8
|
+
|
|
9
|
+
ScreenShake.prototype.initialize = function () {
|
|
10
|
+
this._shaking = false;
|
|
11
|
+
this._elapsed = 0;
|
|
12
|
+
this._currentIntensity = 0;
|
|
13
|
+
this._basePos = this.entity.getLocalPosition().clone();
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
ScreenShake.prototype.shake = function (intensity, duration) {
|
|
17
|
+
this._currentIntensity = intensity ?? this.intensity;
|
|
18
|
+
this._duration = duration ?? this.duration;
|
|
19
|
+
this._elapsed = 0;
|
|
20
|
+
this._basePos.copy(this.entity.getLocalPosition());
|
|
21
|
+
this._shaking = true;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
ScreenShake.prototype.update = function (dt) {
|
|
25
|
+
if (!this._shaking) return;
|
|
26
|
+
|
|
27
|
+
this._elapsed += dt;
|
|
28
|
+
if (this._elapsed >= this._duration) {
|
|
29
|
+
this._shaking = false;
|
|
30
|
+
this.entity.setLocalPosition(this._basePos);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const progress = this._elapsed / this._duration;
|
|
35
|
+
const amplitude = this._currentIntensity * Math.pow(this.decay, progress * 30);
|
|
36
|
+
const ox = (Math.random() * 2 - 1) * amplitude;
|
|
37
|
+
const oy = (Math.random() * 2 - 1) * amplitude;
|
|
38
|
+
|
|
39
|
+
this.entity.setLocalPosition(
|
|
40
|
+
this._basePos.x + ox,
|
|
41
|
+
this._basePos.y + oy,
|
|
42
|
+
this._basePos.z,
|
|
43
|
+
);
|
|
44
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: screw_puzzle.aigameplay
|
|
3
|
+
description: 螺丝拆解玩法封包 - 通过点击拧松螺丝、利用颜色匹配和重力释放机制拆解所有零件的 PGS 实现
|
|
4
|
+
triggers: 螺丝,拆解,拧螺丝,screw,puzzle,零件,拆除,颜色匹配,重力释放,disassembly,color match
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# screw_puzzle.aigameplay
|
|
8
|
+
|
|
9
|
+
螺丝拆解核心玩法封包。实现螺丝拆解规则的 PGS (PlayCraft Gameplay Schema, 玩法定义规范) JSON 和 reducer,玩家通过按正确顺序点击拧松螺丝,将螺丝移入同色螺孔,无螺丝固定的零件因重力下落并退出场景,直到所有零件清空。
|
|
10
|
+
|
|
11
|
+
## Recipe
|
|
12
|
+
|
|
13
|
+
- **玩法类型**:screw_puzzle(螺丝拆解)
|
|
14
|
+
- **参考文件**:
|
|
15
|
+
- `ref/pgs-schema.json`:PGS (PlayCraft Gameplay Schema, 玩法定义规范) 规则骨架(entities、rules、algorithm、testCases)
|
|
16
|
+
- `ref/reducer.template.ts`:reducer 接口约束模板(`init` / `dispatch` / `getState` + 分步函数)
|
|
17
|
+
- **核心规则**:
|
|
18
|
+
- `colorMatchRequired`: true(螺丝只能插入同色螺孔)
|
|
19
|
+
- `gravityEnabled`: true(零件失去所有螺丝支撑后下落)
|
|
20
|
+
- `bufferSlots`: 3(临时缓冲区最多容纳 3 颗螺丝)
|
|
21
|
+
- `itemReleaseOnAllScrewsRemoved`: true(零件上所有螺丝拆除后自动下落退出)
|
|
22
|
+
- **PGS Agent 操作流程**:
|
|
23
|
+
1. 读取 `ref/pgs-schema.json` 作为规则骨架起点
|
|
24
|
+
2. 读取 `ref/reducer.template.ts` 了解接口约束
|
|
25
|
+
3. 实现 `reducer.ts`,导出 `init(config)`、`dispatch(state, action)`、`getState(state)` 以及**全部分步函数**
|
|
26
|
+
4. 运行 `ref/pgs-schema.json` 中的所有 `testCases`,全部通过后才算完成
|
|
27
|
+
5. 更新 manifest 的 `generation.pgsVersion` 和 `result.outputFile`
|
|
28
|
+
- **可 fork 变体**:
|
|
29
|
+
- 时间挑战:添加倒计时限制
|
|
30
|
+
- 特殊螺丝:万能色螺丝(匹配任意颜色孔)
|
|
31
|
+
- 多层场景:添加 z-order 层级遮挡关系
|
|
32
|
+
|
|
33
|
+
## Result
|
|
34
|
+
|
|
35
|
+
- **产物文件**:`reducer.ts`
|
|
36
|
+
- **格式**:TypeScript,导出 `init(config)`、`dispatch(action)`、`getState()` + 分步函数接口
|
|
37
|
+
- **验证**:所有 testCases 必须通过
|
|
38
|
+
|
|
39
|
+
## 渲染集成(⚠️ 场景层必读)
|
|
40
|
+
|
|
41
|
+
### 设计原则:逻辑与动画分离
|
|
42
|
+
|
|
43
|
+
reducer 提供两套接口:
|
|
44
|
+
|
|
45
|
+
| 接口 | 适用场景 | 特点 |
|
|
46
|
+
|------|---------|------|
|
|
47
|
+
| `dispatch()` | 无头测试、AI 模拟、跳过动画 | 一步到位,只返回最终状态 |
|
|
48
|
+
| 分步函数 | **渲染层/GameScene** | 逐步执行,返回中间过程数据 |
|
|
49
|
+
|
|
50
|
+
### ⚠️ 禁止在渲染层使用 dispatch() 然后全量重建场景
|
|
51
|
+
|
|
52
|
+
正确做法是**分步驱动动画链**:
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
// ✅ 正确做法:逐步调用分步函数,每步之间插入动画
|
|
56
|
+
|
|
57
|
+
// Step 1: 检查螺丝是否可拆
|
|
58
|
+
const canRemove = canRemoveScrew(state, screwId);
|
|
59
|
+
if (!canRemove) { playErrorFeedback(); return; }
|
|
60
|
+
|
|
61
|
+
// Step 2: 移除螺丝,拿到移动动画数据
|
|
62
|
+
const { newState, screwMove } = removeScrew(state, screwId);
|
|
63
|
+
await playScrewRemoveAnimation(screwMove); // 螺丝飞向对应颜色螺孔动画
|
|
64
|
+
|
|
65
|
+
// Step 3: 检查关联零件是否可以释放
|
|
66
|
+
const releasedItems = checkItemRelease(newState, screwMove.itemIds);
|
|
67
|
+
if (releasedItems.length > 0) {
|
|
68
|
+
await playItemReleaseAnimation(releasedItems); // 零件下落动画
|
|
69
|
+
|
|
70
|
+
// Step 4: 应用重力(零件退出后上层零件下移)
|
|
71
|
+
const fallMoves = applyGravity(newState);
|
|
72
|
+
await playGravityAnimation(fallMoves);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Step 5: 检查胜败
|
|
76
|
+
const result = checkWinLose(newState);
|
|
77
|
+
if (result.win) showWinPanel();
|
|
78
|
+
if (result.lose) showLosePanel();
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 分步函数返回值与动画映射
|
|
82
|
+
|
|
83
|
+
| 分步函数 | 返回值 | 场景层动画 |
|
|
84
|
+
|---------|--------|-----------|
|
|
85
|
+
| `canRemoveScrew()` | `boolean` | 不可拆时播放摇晃/红色提示 |
|
|
86
|
+
| `removeScrew()` | `{ newState, screwMove }` | 螺丝旋转消失 + 飞入对应颜色螺孔 |
|
|
87
|
+
| `checkItemRelease()` | `ReleasedItem[]` | 零件整体下落退出屏幕 |
|
|
88
|
+
| `applyGravity()` | `FallMove[]` | 上层零件向下移动填充空位 |
|
|
89
|
+
| `findValidMoves()` | `string[]` | 高亮可拆螺丝(引导提示) |
|
|
90
|
+
|
|
91
|
+
## Binding
|
|
92
|
+
|
|
93
|
+
- **Binding Role**:`gameplayRule`
|
|
94
|
+
- **挂载目标**:`game/gameplay/screw_puzzle/reducer.ts`
|
|
95
|
+
- **引用类型**:`gameplay-module-reference`
|
|
96
|
+
- **接口契约**:`init(config)` / `dispatch(action)` / `getState()` / `canRemoveScrew()` / `removeScrew()` / `checkItemRelease()` / `applyGravity()` / `findValidMoves()`
|
|
97
|
+
|
|
98
|
+
## Skill Definition
|
|
99
|
+
|
|
100
|
+
tools:
|
|
101
|
+
- bash
|
|
102
|
+
- write
|
|
103
|
+
- read
|
|
104
|
+
prompt_extension: |
|
|
105
|
+
You are implementing a screw puzzle disassembly gameplay module following the PGS specification.
|
|
106
|
+
Write the PGS JSON with entities (board, screws, items, screw_holes), rules, algorithm, and testCases.
|
|
107
|
+
Implement the reducer.ts with:
|
|
108
|
+
- init/dispatch/getState (一体化接口,用于测试)
|
|
109
|
+
- canRemoveScrew/removeScrew/checkItemRelease/applyGravity/findValidMoves (分步函数,用于渲染层动画驱动)
|
|
110
|
+
Key constraints:
|
|
111
|
+
- A screw can only go into a matching-color screw hole
|
|
112
|
+
- An item is released (falls/exits) when ALL its screws have been removed
|
|
113
|
+
- Buffer overflow (no matching holes and buffer full) causes deadlock/lose
|
|
114
|
+
The step-by-step functions are CRITICAL — the rendering layer (GameScene) must use them to drive animations.
|
|
115
|
+
Run the testCases to verify the logic before finalizing.
|
|
116
|
+
Apply the Binding to wire the reducer into the game's gameplay module path.
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"atomId": "screw_puzzle.aigameplay",
|
|
4
|
+
"bundleType": "aigameplay",
|
|
5
|
+
"category": "gameplay",
|
|
6
|
+
"mode": "fixed",
|
|
7
|
+
"label": {
|
|
8
|
+
"zh": "螺丝拆解玩法",
|
|
9
|
+
"en": "Screw Puzzle gameplay"
|
|
10
|
+
},
|
|
11
|
+
"tags": [
|
|
12
|
+
"gameplay",
|
|
13
|
+
"screw",
|
|
14
|
+
"puzzle",
|
|
15
|
+
"disassembly",
|
|
16
|
+
"casual",
|
|
17
|
+
"physics"
|
|
18
|
+
],
|
|
19
|
+
"bindingRoles": [
|
|
20
|
+
"gameplayRule"
|
|
21
|
+
],
|
|
22
|
+
"imports": [
|
|
23
|
+
{
|
|
24
|
+
"slot": "engine",
|
|
25
|
+
"pinAtomId": "phaser.aicomponent",
|
|
26
|
+
"edgeKind": "requires",
|
|
27
|
+
"bindAs": "engine"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"slot": "bgMusic",
|
|
31
|
+
"description": "背景循环音乐",
|
|
32
|
+
"bindAs": "bgm",
|
|
33
|
+
"required": false,
|
|
34
|
+
"edgeKind": "compatibleWith",
|
|
35
|
+
"matchBindingRoles": [
|
|
36
|
+
"bgMusic"
|
|
37
|
+
],
|
|
38
|
+
"allowedBundleTypes": [
|
|
39
|
+
"aiaudio"
|
|
40
|
+
],
|
|
41
|
+
"constraints": {
|
|
42
|
+
"loop": true
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"slot": "background",
|
|
47
|
+
"description": "游戏背景图",
|
|
48
|
+
"bindAs": "bg",
|
|
49
|
+
"required": false,
|
|
50
|
+
"edgeKind": "compatibleWith",
|
|
51
|
+
"matchBindingRoles": [
|
|
52
|
+
"backgroundTexture"
|
|
53
|
+
],
|
|
54
|
+
"allowedBundleTypes": [
|
|
55
|
+
"aiimage"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"slot": "screwTextures",
|
|
60
|
+
"description": "螺丝与零件贴图集",
|
|
61
|
+
"bindAs": "textures",
|
|
62
|
+
"required": false,
|
|
63
|
+
"edgeKind": "compatibleWith",
|
|
64
|
+
"matchBindingRoles": [
|
|
65
|
+
"tileTextureSet"
|
|
66
|
+
],
|
|
67
|
+
"allowedBundleTypes": [
|
|
68
|
+
"aiimage"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"slot": "tutorial",
|
|
73
|
+
"description": "新手引导浮层",
|
|
74
|
+
"bindAs": "tutorial",
|
|
75
|
+
"required": false,
|
|
76
|
+
"edgeKind": "compatibleWith",
|
|
77
|
+
"matchBindingRoles": [
|
|
78
|
+
"tutorialOverlay"
|
|
79
|
+
],
|
|
80
|
+
"allowedBundleTypes": [
|
|
81
|
+
"aicomponent"
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"slot": "winPanel",
|
|
86
|
+
"description": "通关反馈面板视觉",
|
|
87
|
+
"bindAs": "winPanel",
|
|
88
|
+
"required": false,
|
|
89
|
+
"edgeKind": "compatibleWith",
|
|
90
|
+
"matchBindingRoles": [
|
|
91
|
+
"successFeedbackPanel"
|
|
92
|
+
],
|
|
93
|
+
"allowedBundleTypes": [
|
|
94
|
+
"aiimage"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"slot": "losePanel",
|
|
99
|
+
"description": "失败反馈面板视觉",
|
|
100
|
+
"bindAs": "losePanel",
|
|
101
|
+
"required": false,
|
|
102
|
+
"edgeKind": "compatibleWith",
|
|
103
|
+
"matchBindingRoles": [
|
|
104
|
+
"failFeedbackPanel"
|
|
105
|
+
],
|
|
106
|
+
"allowedBundleTypes": [
|
|
107
|
+
"aiimage"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"slot": "endScreen",
|
|
112
|
+
"description": "可玩广告结算屏(含 CTA 按钮)",
|
|
113
|
+
"bindAs": "endScreen",
|
|
114
|
+
"required": false,
|
|
115
|
+
"edgeKind": "compatibleWith",
|
|
116
|
+
"matchBindingRoles": [
|
|
117
|
+
"playableEndScreenLayout"
|
|
118
|
+
],
|
|
119
|
+
"allowedBundleTypes": [
|
|
120
|
+
"aicomponent"
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
"generation": {
|
|
125
|
+
"kind": "pgs",
|
|
126
|
+
"pgsVersion": "1.0",
|
|
127
|
+
"gameplayType": "screw_puzzle",
|
|
128
|
+
"rules": {
|
|
129
|
+
"colorMatchRequired": true,
|
|
130
|
+
"gravityEnabled": true,
|
|
131
|
+
"bufferSlots": 3,
|
|
132
|
+
"itemReleaseOnAllScrewsRemoved": true
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"result": {
|
|
136
|
+
"outputFile": "reducer.ts",
|
|
137
|
+
"format": "typescript",
|
|
138
|
+
"constraints": {
|
|
139
|
+
"testCasesMustPass": true
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"binding": {
|
|
143
|
+
"role": "gameplayRule",
|
|
144
|
+
"target": "game/gameplay/screw_puzzle/reducer.ts",
|
|
145
|
+
"type": "gameplay-module-reference",
|
|
146
|
+
"constraints": {
|
|
147
|
+
"interface": [
|
|
148
|
+
"init(config)",
|
|
149
|
+
"dispatch(action)",
|
|
150
|
+
"getState()",
|
|
151
|
+
"canRemoveScrew(state, screwId)",
|
|
152
|
+
"removeScrew(state, screwId)",
|
|
153
|
+
"checkItemRelease(state, itemId)",
|
|
154
|
+
"applyGravity(state)",
|
|
155
|
+
"findValidMoves(state)"
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"files": {
|
|
160
|
+
"skill": "SKILL.md",
|
|
161
|
+
"pgsSchema": "ref/pgs-schema.json",
|
|
162
|
+
"reducerTemplate": "ref/reducer.template.ts"
|
|
163
|
+
}
|
|
164
|
+
}
|