Changes assets to own

This commit is contained in:
KGrzeg 2021-10-12 16:05:10 +02:00
parent 3ba46bc350
commit 1ec94c53da
4 changed files with 6 additions and 8 deletions

BIN
public/assets/img/boom.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View file

@ -9,23 +9,21 @@ export default class HelloWorldScene extends Phaser.Scene
preload() preload()
{ {
this.load.setBaseURL('http://labs.phaser.io') this.load.image('sky', 'assets/img/nebula10.png')
this.load.image('logo', 'assets/img/phaser3-logo.png')
this.load.image('sky', 'assets/skies/space3.png') this.load.spritesheet('particles', 'assets/img/boom.png', { frameWidth: 960/5, frameHeight: 1344/7 })
this.load.image('logo', 'assets/sprites/phaser3-logo.png')
this.load.image('red', 'assets/particles/red.png')
} }
create() create()
{ {
this.add.image(400, 300, 'sky') this.add.image(400, 300, 'sky')
const particles = this.add.particles('red') const particles = this.add.particles('particles', 21)
const emitter = particles.createEmitter({ const emitter = particles.createEmitter({
speed: 100, speed: 300,
scale: { start: 1, end: 0 }, scale: { start: 1, end: 0 },
blendMode: 'ADD' blendMode: 'ADD',
}) })
const logo = this.physics.add.image(400, 100, 'logo') const logo = this.physics.add.image(400, 100, 'logo')