"use strict";

class Scene5Controller extends BaseSceneController {

    _glass;

    initialize() {
        this.showText("He drink up all the lava");

        var tim = this.spriteManager.get("tim");
        tim.position.set(-2.2, -1.2, 0);
        tim.children[0].material.rotation = 0;
        tim.children.splice(1);
        tim.scale.setScalar(6);
        this.scene.add(tim);

        var bottle = this.spriteManager.get("bottle");
        bottle.position.set(3, -1, 0);
        bottle.scale.setScalar(2);
        this.scene.add(bottle);

        var glass = this.spriteManager.get("glass");
        glass.position.set(0, 2, 0);
        this.scene.add(glass);
        this._glass = glass;
    }

    update(time) {
        this._glass.children[0].material.rotation = Math.PI - Math.sin(time / 750);
    }
}