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

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

        this.create();
    }

    create() {
        //the last intro screen has to dispatch this event
        this.bg = game.add.sprite(480, 320, 'intro_5_bg');
        this.nina = game.add.sprite(480, 320, 'intro_5_nina');

        this.bg.anchor.setTo(0.5);
        this.nina.anchor.setTo(0.5);

        this.add(this.bg);
        this.add(this.nina);
    }

    appearAnimation() {
        this.game.add.tween(this.nina).to({x: "+220", y: "-180"}, 2900, Phaser.Easing.Sinusoidal.InOut, true);
    }
}
