Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/enginooby-practice/phaser3
https://github.com/enginooby-practice/phaser3
Last synced: about 6 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/enginooby-practice/phaser3
- Owner: enginooby-practice
- License: mit
- Created: 2020-09-16T15:22:27.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-18T18:58:12.000Z (about 4 years ago)
- Last Synced: 2024-01-10T11:54:02.856Z (10 months ago)
- Language: TypeScript
- Size: 284 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
- Install node modules: ```npm install```
- Run local server: ```npm run start```
- Static resource in ```/public/assets```
- Declare optional-undefined attribute (attribute can be undefined) with ```?```: ```private player?: Phaser.Physics.Arcade.Sprite```
- Check object availability before access its optional-undefined attributes
```
if (this.player) {
doSomething(this.player.x)
}
```
- Scene structure:
- ```preload()```: load assets: images, audio, etc.
- ```create()```: add game objects to the scene (init + draw + collision)
- ```update()```: loop (events, control, animations, game over)