import State from './state'

export default class Scene {
    constructor(cb) {
        this.cb = cb

        this.state = new State()

        this.init()
    }

    init() {}

    setScene(scene) {
        this.cb('set-scene', scene)
    }

    draw(ctx) {
        this.state.draw(ctx)
    }

    update(dt) {
        this.state.update(dt)
    }

    setState(state) {
        this.state = state
        return state
    }
}
