import Phaser from 'phaser'
import CinematicScreen from '../cinematic-screen'

export default class Intro1 extends CinematicScreen {
    constructor(game, parent, name) {
        super(game, parent, name);

        this.create();
    }

    create() {
        this.bg = game.add.sprite(480, 320, 'outro_2_bg');
        this.bg.anchor.setTo(0.5);
        this.add(this.bg);
    }

    appearAnimation() {
        this.game.add.tween(this.bg.scale).to({ x: "+0.2", y: "+0.2" }, 2300, Phaser.Easing.Sinusoidal.InOut, true);
        this.game.add.tween(this.bg).to({ y: "+10" }, 320, Phaser.Easing.Sinusoidal.InOut, true, 0, 2, true);
    }
}
