fix: build error

This commit is contained in:
2025-05-14 18:29:23 +07:00
parent 6cd8c7c284
commit 20381387b4
5 changed files with 5841 additions and 4 deletions
+1
View File
@@ -0,0 +1 @@
node_modules
+5821
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "phaser-project",
"version": "1.0.0",
"description": "Phaser 3 TypeScript Project",
"main": "src/main.js",
"main": "src/main.js",
"scripts": {
"start": "webpack serve --open",
"build": "webpack --mode production"
+6
View File
@@ -0,0 +1,6 @@
// Entry point for the application
// This file is required by Webpack when resolving './src' as a directory
import main from './main.js';
export default main;
+12 -3
View File
@@ -80,9 +80,18 @@ function update() {
}
function addPipe() {
const pipe = this.physics.add.image(850, Phaser.Math.Between(50, 550), 'pipe');
pipe.setImmovable(true);
pipes.add(pipe);
// Create top pipe
const topPipe = this.add.rectangle(850, Phaser.Math.Between(50, 250), 50, Phaser.Math.Between(100, 400));
this.physics.add.existing(topPipe);
topPipe.body.setImmovable(true);
// Create bottom pipe
const bottomPipe = this.add.rectangle(850, Phaser.Math.Between(350, 550), 50, Phaser.Math.Between(100, 400));
this.physics.add.existing(bottomPipe);
bottomPipe.body.setImmovable(true);
pipes.add(topPipe);
pipes.add(bottomPipe);
}
function restartGame() {