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

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

        this.create();
    }

    create() {
        this.bg = game.add.sprite(480, 320, 'intro_3_bg');
        this.nina = game.add.sprite(480, 320, 'intro_4_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.scale).to({ x: "+0.2", y: "+0.2" }, 2000, Phaser.Easing.Quadratic.InOut, true);
        this.game.add.tween(this.nina).to({ y: "+10" }, 400, Phaser.Easing.Quadratic.InOut, true, 0, 1, true);
    }
}
