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, 'intro_1_bg');
        this.nina = game.add.sprite(480, 320, 'intro_1_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: -40, y: 110}, 2900, Phaser.Easing.Sinusoidal.InOut, true);
        // this.game.add.tween(this.nina).to({ y: "-10"}, 500, Phaser.Easing.Quadratic.InOut, true,0,3,true);
    }
}
