Skip to content

Commit

Permalink
Merge pull request #54 from ambrons/fix/font-of-undefined-issue
Browse files Browse the repository at this point in the history
fixed issue in Game.js with the Banner creation throwing an exception
  • Loading branch information
Leandro Cabrera authored Dec 18, 2017
2 parents 2190d95 + 12577e9 commit 4ebf75f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "PhaserES6Webpack",
"version": "1.1.0",
"version": "1.1.1",
"description": "",
"author": "leandro cabrera <[email protected]>",
"main": "index.js",
Expand Down Expand Up @@ -50,4 +50,4 @@
"cordova-plugin-whitelist": {}
}
}
}
}
11 changes: 6 additions & 5 deletions src/states/Game.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ export default class extends Phaser.State {

create () {
const bannerText = 'Phaser + ES6 + Webpack'
let banner = this.add.text(this.world.centerX, this.game.height - 80, bannerText)
banner.font = 'Bangers'
let banner = this.add.text(this.world.centerX, this.game.height - 80, bannerText, {
font: '40px Bangers',
fill: '#77BFA3',
smoothed: false
})

banner.padding.set(10, 16)
banner.fontSize = 40
banner.fill = '#77BFA3'
banner.smoothed = false
banner.anchor.setTo(0.5)

this.mushroom = new Mushroom({
Expand Down

0 comments on commit 4ebf75f

Please sign in to comment.