Skip to content

Commit

Permalink
updated code
Browse files Browse the repository at this point in the history
  • Loading branch information
zAlweNy26 committed Jan 25, 2023
1 parent 3e9cafe commit 69ba188
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 13 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

🥳 RPG Game in TypeScript, Phaser and Vue with Java Spring Boot as back-end.

## Features
## Start-up instructions

📦 Out of the box
🌱 Extensible, really simple directory structure
💪 Support using Node.js API in Electron-Renderer
🖥 It's easy to implement multiple windows
- Download Node.JS (at least v16.0.0) and accept to install also npm
- Download Java SDK (at least v17)
- Open a terminal inside the root folder of the project
- Run `npm install`
- Run `npm run online`
- Have fun !

## Credits

Expand Down
2 changes: 1 addition & 1 deletion electron/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function createWindow() {
win.webContents.openDevTools({ mode: "undocked", activate: false }) //TODO: DA TOGLIERE APPENA RISOLTO L'ERRORE
}

exec(`java -jar ${libPath}`)
exec(`java -jar ${libPath}`, console.log)

win.webContents.on('did-finish-load', () => {
win?.webContents.send('main-process-message', `Backend jar path : ${libPath}`)
Expand Down
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
<script src="/rpgui.js"></script>
<!--<script>
window.open("http://127.0.0.1:5173/", "_blank", "popup,location=yes,height=720,width=1280,resizable=0")
</script>-->
</body>
</html>
65 changes: 59 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"phaser": "^3.55.2",
"pinia": "^2.0.29",
"rxjs": "^7.8.0",
"vite-tsconfig-paths": "^4.0.5",
"webfontloader": "^1.6.28"
}
}
2 changes: 1 addition & 1 deletion src/game/scenes/StageScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default class StageScene extends Scene {
}

init(data: object | undefined) {
this.selectedPlayer = (data as any).selectedPlayer
this.selectedPlayer = (data as any).selectedPlayer ?? ""
}

preload() {
Expand Down

0 comments on commit 69ba188

Please sign in to comment.