<commit_before>import { WidthSpriteSheetHero, HeightSpriteSheetHero, Width, Height, BabyRatio, HeroRatio } from '../Constants.js';
import { Tileset, Levels, HeroSprite } from '../ConstantsKey.js';
import MapManager from "objects/MapManager";
import Character from 'objects/Character';

const originPositionBadGuy = 200;
const originPositionBaby = 900;

class Introduction extends Phaser.State {

  constructor() {
    super();
  }

  create() {
      this.game.physics.startSystem(Phaser.Physics.ARCADE);

      this.map = this.game.add.tilemap(Levels[`Level666`].key);
      this.map.addTilesetImage(Levels[`Level666`].key, Tileset.key);

      this.map.createLayer('thirdLayer');
      this.map.createLayer('secondLayer');
      this.map.createLayer('firstLayer');
      // This resizes the game world to match the layer dimensions
      this.collisionLayer = this.map.createLayer('colissionLayer');
      this.map.setCollisionByExclusion([], true, this.collisionLayer);

      this.collisionLayer.resizeWorld();

      this.mapManager = new MapManager(this.map, Levels[`Level6`].lastLayer);
      this.mapManager.setUpCollisionLayer(this.collisionLayer);

      const originPositionBadGuy = 200;
      const originPositionBaby = 900;

      this.baby = this.add.group();
      this.baby.create(originPositionBaby, 800, 'baby');

      this.baby2 = this.add.group();
      this.baby2.create(originPositionBaby + 50, 800, 'baby2');

      this.badGuy = this.game.add.sprite(originPositionBadGuy, 370, 'baby3');

      this.baby.scale.setTo(BabyRatio, BabyRatio);
      this.baby2.scale.setTo(BabyRatio, BabyRatio);
      this.badGuy.scale.setTo(HeroRatio, HeroRatio);
      const timer = 2000;

      let tweenA = this.game.add.tween(this.badGuy).to( { y: 370 }, 2000, "Quart.easeOut");
      let tweenB = this.game.add.tween(this.badGuy).to( { x: 920 / 2 }, timer, "Quart.easeOut");
      this.tweenF = this.game.add.tween(this.badGuy).to( { x: 920 }, timer, "Quart.easeOut");
      this.tweenC = this.game.add.tween(this.badGuy).to( { x: Width + 600 }, timer + 2000 , "Quart.easeOut");
      this.tweenD = this.game.add.tween(this.baby).to( { x: Width + 100 }, timer + 2000, "Quart.easeOut");
      this.tweenE = this.game.add.tween(this.baby2).to( { x: Width + 10 }, timer + 2000, "Quart.easeOut");

      tweenA.chain(tweenB);
      tweenB.chain(this.tweenC);
      tweenB.onComplete.add(this.catched, this);

      tweenA.start();
  }

  catched() {
    this.tweenF.start();
    this.tweenC.start();
    this.tweenD.start();
    this.tweenE.start();
<commit_msg>update intro<commit_after>import { WidthSpriteSheetHero, HeightSpriteSheetHero, Width, Height, BabyRatio, HeroRatio } from '../Constants.js';
import { Tileset, Levels, HeroSprite } from '../ConstantsKey.js';
import MapManager from "objects/MapManager";
import Character from 'objects/Character';

const originPositionBadGuy = 200;
const originPositionBaby = 900;

class Introduction extends Phaser.State {

  constructor() {
    super();
  }

  create() {
      this.game.physics.startSystem(Phaser.Physics.ARCADE);

      this.map = this.game.add.tilemap(Levels[`Level666`].key);
      this.map.addTilesetImage(Levels[`Level666`].key, Tileset.key);

      this.map.createLayer('thirdLayer');
      this.map.createLayer('secondLayer');
      this.map.createLayer('firstLayer');
      // This resizes the game world to match the layer dimensions
      this.collisionLayer = this.map.createLayer('colissionLayer');
      this.map.setCollisionByExclusion([], true, this.collisionLayer);

      this.collisionLayer.resizeWorld();

      this.mapManager = new MapManager(this.map, Levels[`Level6`].lastLayer);
      this.mapManager.setUpCollisionLayer(this.collisionLayer);

      const originPositionBadGuy = 200;
      const originPositionBaby = 900;

      this.baby = this.add.group();
      this.baby.create(originPositionBaby, 800, 'baby');

      this.baby2 = this.add.group();
      this.baby2.create(originPositionBaby + 50, 800, 'baby2');

      this.badGuy = this.game.add.sprite(originPositionBadGuy, 370, 'baby3');

      this.baby.scale.setTo(BabyRatio, BabyRatio);
      this.baby2.scale.setTo(BabyRatio, BabyRatio);
      this.badGuy.scale.setTo(HeroRatio, HeroRatio);

      const timer = 2000;

      let tweenA = this.game.add.tween(this.badGuy).to( { y: 370 }, 2000, "Quart.easeOut");
      let tweenB = this.game.add.tween(this.badGuy).to( { x: 920 / 2 }, timer, "Quart.easeOut");
      this.tweenF = this.game.add.tween(this.badGuy).to( { x: 920 }, timer, "Quart.easeOut");

      this.tweenC = this.game.add.tween(this.badGuy).to( { x: Width + 600 }, timer + 2000 , "Quart.easeOut");
      this.tweenD = this.game.add.tween(this.baby).to( { x: Width + 100 }, timer + 2000, "Quart.easeOut");
      this.tweenE = this.game.add.tween(this.baby2).to( { x: Width + 10 }, timer + 2000, "Quart.easeOut");

      tweenA.chain(tweenB);
      tweenB.chain(this.tweenC);
      tweenB.onComplete.add(this.catched, this);

      tweenA.start();
  }

  catched() {
    this.tweenF.start();
    this.tweenC.start();
    this.tweenD.start();
    this.tweenE.start();

{'fraction_non_alphanumeric': 0.15222892738952695, 'fraction_numerical': 0.028810589838427096, 'mean_word_length': 3.4912587412587412, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4482081', 'n_tokens_mistral': 1958, 'n_tokens_neox': 1751, 'n_words': 301}