<commit_before>var splash = function  () {
  
};

var fireButton;
var shops;
var text;
var phone;
var message;
var title;
var tanuki;
var tween;
var transitionSpeed = 2;
var style = {font: 'bold 32px monospace', fill: '#fff', boundsAlignH: 'center', boundsAlignV: 'middle'};
splash.prototype.preload = function() {

};

splash.prototype.create = function() {
  this.starfield = this.add.tileSprite( 0, 0, 1024, 768, 'starfield' );
  shops = this.add.sprite( -100, 0, 'shop' );


  tanuki = this.add.image(0,0,'splash-1');
  fireButton = this.input.keyboard.addKey( Phaser.Keyboard.UP );
  text = this.add.text( 350, 650, 'Click to start', style );
   this.time.events.add( Phaser.Timer.SECOND * 3, this.addPhone, this );
   this.time.events.add( Phaser.Timer.SECOND * 6, this.addMessage, this );
   this.time.events.add( Phaser.Timer.SECOND * 6.5, this.addTitle, this );
};

splash.prototype.update = function() {

  var self = this;

  if ( fireButton.isDown || this.input.activePointer.isDown ) {
    tween = this.add.tween(shops);
    var tweenText = this.add.tween(text);
    var tweenPhone = this.add.tween(phone);
    var tweenMessage = this.add.tween(message);
    var tweenTitle = this.add.tween(title);
    var tweenSplash = this.add.tween(tanuki)

    tweenText.to({x:-1440}, 1000, 'Linear', true);
    tweenPhone.to({x:-1440}, 1000, 'Linear', true);
    tweenMessage.to({x:-1440}, 1000, 'Linear', true);
    tweenTitle.to({x:-1440}, 1000, 'Linear', true);
    tweenSplash.to({x:-1440}, 1000, 'Linear', true);
    tween.to({x:-1440}, 1000, 'Linear', true).onComplete.add(function () {
      console.log('game');
      self.game.state.start('game');
    });
    // go to game
    // this.game.state.start( 'game' );
  }
};

module.exports = splash; // export to app.js
<commit_msg>added ground layer under loading screen for smooth game transition<commit_after>var splash = function  () {
  
};

var fireButton;
var shops;
var text;
var phone;
var message;
var title;
var tanuki;
var tween;
var transitionSpeed = 2;
var style = {font: 'bold 32px monospace', fill: '#fff', boundsAlignH: 'center', boundsAlignV: 'middle'};
splash.prototype.preload = function() {

};

splash.prototype.create = function() {
  this.starfield = this.add.tileSprite( 0, 0, 1024, 768, 'starfield' );
  this.ground = this.add.tileSprite(0, 656, 1024, 112, 'ground');
  shops = this.add.sprite( -100, 0, 'shop' );


  tanuki = this.add.image(0,0,'splash-1');
  fireButton = this.input.keyboard.addKey( Phaser.Keyboard.SPACEBAR );
  text = this.add.text( 350, 650, 'Click to start', style );
   this.time.events.add( Phaser.Timer.SECOND * 1, this.addPhone, this );
   this.time.events.add( Phaser.Timer.SECOND * 2, this.addMessage, this );
   this.time.events.add( Phaser.Timer.SECOND * 3, this.addTitle, this );
};

splash.prototype.update = function() {

  var self = this;

  if ( fireButton.isDown || this.input.activePointer.isDown ) {
    tween = this.add.tween(shops);
    var tweenText = this.add.tween(text);
    var tweenPhone = this.add.tween(phone);
    var tweenMessage = this.add.tween(message);
    var tweenTitle = this.add.tween(title);
    var tweenSplash = this.add.tween(tanuki)

    tweenText.to({x:-1440}, 1000, 'Linear', true);
    tweenPhone.to({x:-1440}, 1000, 'Linear', true);
    tweenMessage.to({x:-1440}, 1000, 'Linear', true);
    tweenTitle.to({x:-1440}, 1000, 'Linear', true);
    tweenSplash.to({x:-1440}, 1000, 'Linear', true);
    tween.to({x:-1440}, 1000, 'Linear', true).onComplete.add(function () {
      console.log('game');
      self.game.state.start('game');
    });
    // go to game
    // this.game.state.start( 'game' );
  }
};

module.exports = splash; // export to app.js

{'fraction_non_alphanumeric': 0.17607345395625168, 'fraction_numerical': 0.04428841479881177, 'mean_word_length': 3.670870113493064, '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': '4012466', 'n_tokens_mistral': 1476, 'n_tokens_neox': 1341, 'n_words': 293}