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(465, 360, 'outro_3_bg');
        this.bg.anchor.setTo(0.5);
        this.bg.scale.setTo(1.2);
        this.add(this.bg);
    }

    appearAnimation() {
        this.game.add.tween(this.bg).to({x: "+280"}, 3200, Phaser.Easing.Sinusoidal.InOut, true, 1250);
        this.game.add.tween(this.bg).to({y: 320}, 3200, Phaser.Easing.Sinusoidal.InOut, true, 1250);
        this.game.add.tween(this.bg.scale).to({x: 1, y: 1}, 3200, Phaser.Easing.Sinusoidal.InOut, true, 1250);
    }
}
