<commit_before>'use strict';

var game = require('../game'),
    Phaser = require('phaser').Phaser;

var sprite;
var iAmHovering = false;
var pukeAbilitySprite, pukeAbilitySprite2, pukeAbilitySprite3;
var hoverAbilitySprite, hoverAbilitySprite2, hoverAbilitySprite3;
var pukeAbility = 0;
var hoverAbility = 0;
var controls = {};
var testMap;
var puker = 1;
var jumper = 0;
var layer;
var grassyLayer;
var ability = 0;//0 = vomit, 1 = hover. THis is checked in puke() which is general perpose
var aCounter = 0;//this keeps track of how close we are to triggering an ability.
var emitter;
var emitting = false;
var emitterXvelocity;
var bgParallax;
var bgParallax2;
var baddies = [];
var charge = 20;
var counter;
var counterBackground;
var gameOverActivated;
var sfx;
var music;
var mutePushed;
var musicMute = false;

function createGameState() {
ability = 0;
    game.physics.startSystem(Phaser.Physics.ARCADE);
    game.stage.backgroundColor = '#999999';

    var bg = game.add.sprite(0, -300, 'bg');
    bg.fixedToCamera = true;
    bgParallax = game.add.sprite(0, 0, 'bgParallax');
    bgParallax.fixedToCamera = true;
    bgParallax2 = game.add.sprite(1000, 0, 'bgParallax');
    bgParallax2.fixedToCamera = true;

    gameOverActivated = false;

    sfx = {};
    sfx.b1 = game.add.audio('bump1');
    sfx.b2 = game.add.audio('bump2');
    sfx.wobble = game.add.audio('wobble');

    music = game.add.sound('bgMusic');
    music.play('', 0, musicMute ? 0 : 0.8, true);
    mutePushed = false;

    testMap = game.add.tilemap('testMap');
    testMap.addTilesetImage('all_small', 'all_small');
    layer = testMap.createLayer('Tile Layer 1');
    grassyLayer = testMap.createLayer('Grass On Top');

    emitter = game.add.emitter(0, 0, 1);
    // TODO: Set start back to normal for production
    sprite = game.add.sprite(200, 200, 'player');
    //sprite = game.add.sprite(4950, 200, 'player');
    sprite.anchor.setTo(0.65, 0.5);
    sprite.facing = 1;

    counterBackground = game.add.sprite(3, 3, 'abilityBarBackground');
    counter = game.add.sprite(5, 5, 'abilityBar');

counter.fixedToCamera = true;
counterBackground.fixedToCamera = true;
counter.scale.x = 2;
counterBackground.scale.y = 0.5;

    sprite.animations.add('walk', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]);
    sprite.animations.add('stand', [6]);
    sprite.animations.add('float', [39]);

    sprite.animations.play('walk', 60, true);


    game.physics.arcade.enable(sprite);
    sprite.body.setSize(40, 144, 6, 14);
    game.physics.arcade.gravity.y = 300;

    game.physics.arcade.collide(sprite, layer);
    testMap.setCollisionBetween(8, 11, true, layer);
    testMap.setCollisionBetween(13, 17, true, layer);
    testMap.setCollisionBetween(19, 23, true, layer);
    testMap.setCollisionBetween(26, 29, true, layer);

    sprite.body.maxVelocity.x = 400;
    sprite.body.drag.x = 370;
    sprite.body.drag.y = 370;
    sprite.running = false;
    game.physics.enable(sprite, Phaser.Physics.ARCADE);
    sprite.body.gravity.y = 2000;

    layer.resizeWorld();


    emitter.makeParticles('vomit', [0,1,2,3], 200, true, true);
    emitter.maxParticleScale = 1.8;
    emitter.minParticleScale = .2;

    // Attach the emitter to the sprite
    //sprite.addChild(emitter);
<commit_msg>Mo collide tiles<commit_after>'use strict';

var game = require('../game'),
    Phaser = require('phaser').Phaser;

var sprite;
var iAmHovering = false;
var pukeAbilitySprite, pukeAbilitySprite2, pukeAbilitySprite3;
var hoverAbilitySprite, hoverAbilitySprite2, hoverAbilitySprite3;
var pukeAbility = 0;
var hoverAbility = 0;
var controls = {};
var testMap;
var puker = 1;
var jumper = 0;
var layer;
var grassyLayer;
var ability = 0;//0 = vomit, 1 = hover. THis is checked in puke() which is general perpose
var aCounter = 0;//this keeps track of how close we are to triggering an ability.
var emitter;
var emitting = false;
var emitterXvelocity;
var bgParallax;
var bgParallax2;
var baddies = [];
var charge = 20;
var counter;
var counterBackground;
var gameOverActivated;
var sfx;
var music;
var mutePushed;
var musicMute = false;

function createGameState() {
ability = 0;
    game.physics.startSystem(Phaser.Physics.ARCADE);
    game.stage.backgroundColor = '#999999';

    var bg = game.add.sprite(0, -300, 'bg');
    bg.fixedToCamera = true;
    bgParallax = game.add.sprite(0, 0, 'bgParallax');
    bgParallax.fixedToCamera = true;
    bgParallax2 = game.add.sprite(1000, 0, 'bgParallax');
    bgParallax2.fixedToCamera = true;

    gameOverActivated = false;

    sfx = {};
    sfx.b1 = game.add.audio('bump1');
    sfx.b2 = game.add.audio('bump2');
    sfx.wobble = game.add.audio('wobble');

    music = game.add.sound('bgMusic');
    music.play('', 0, musicMute ? 0 : 0.8, true);
    mutePushed = false;

    testMap = game.add.tilemap('testMap');
    testMap.addTilesetImage('all_small', 'all_small');
    layer = testMap.createLayer('Tile Layer 1');
    grassyLayer = testMap.createLayer('Grass On Top');

    emitter = game.add.emitter(0, 0, 1);
    // TODO: Set start back to normal for production
    sprite = game.add.sprite(200, 200, 'player');
    //sprite = game.add.sprite(4950, 200, 'player');
    sprite.anchor.setTo(0.65, 0.5);
    sprite.facing = 1;

    counterBackground = game.add.sprite(3, 3, 'abilityBarBackground');
    counter = game.add.sprite(5, 5, 'abilityBar');

counter.fixedToCamera = true;
counterBackground.fixedToCamera = true;
counter.scale.x = 2;
counterBackground.scale.y = 0.5;

    sprite.animations.add('walk', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]);
    sprite.animations.add('stand', [6]);
    sprite.animations.add('float', [39]);

    sprite.animations.play('walk', 60, true);


    game.physics.arcade.enable(sprite);
    sprite.body.setSize(40, 144, 6, 14);
    game.physics.arcade.gravity.y = 300;

    game.physics.arcade.collide(sprite, layer);
    testMap.setCollisionBetween(8, 11, true, layer);
    testMap.setCollisionBetween(13, 17, true, layer);
    testMap.setCollisionBetween(19, 24, true, layer);
    testMap.setCollisionBetween(25, 30, true, layer);

    sprite.body.maxVelocity.x = 400;
    sprite.body.drag.x = 370;
    sprite.body.drag.y = 370;
    sprite.running = false;
    game.physics.enable(sprite, Phaser.Physics.ARCADE);
    sprite.body.gravity.y = 2000;

    layer.resizeWorld();


    emitter.makeParticles('vomit', [0,1,2,3], 200, true, true);
    emitter.maxParticleScale = 1.8;
    emitter.minParticleScale = .2;

    // Attach the emitter to the sprite
    //sprite.addChild(emitter);

{'fraction_non_alphanumeric': 0.1488192484776474, 'fraction_numerical': 0.056735481954552205, 'mean_word_length': 3.725614035087719, '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': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2230737', 'n_tokens_mistral': 2820, 'n_tokens_neox': 2447, 'n_words': 594}