Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import Phaser from 'phaser-ce'
import config from '../config'
import Keyboard from '../objects/Keyboard'
import { makeGreen } from '../utils'
import Db from '../objects/Db'
export default class extends Phaser.State {
init(action, finalScore = 300, highScore = 0) {
this.game.add.plugin(window.PhaserInput.Plugin)
this.jumpInputs = Keyboard.addKeyboard(this.game)
this.enterKey = Keyboard.addEnter(this.game)
this.action = action
this.finalScore = finalScore
this.highScore = highScore
this.db = new Db(this.game)
}
create() {
const game = this.game
const { width, height } = game
const { lg, xl, center } = config.text