<commit_before>﻿var primeiraFase = { preload: preload, create: create, update: update, render: render };

var boat;
var enemies;
var score = 0;
var highscore = 0;
var jungles;
var tileSpeedRiver = 1.5;
var tileSpeedJungles = 0.3;
var jungleWidth = 196;
var riverWidth = 512;
var angleVelocity = 2;
var finalSound;
var remosSound;
var timerBarra;
var estagio;
var showEstagio = true;
var tileRiver;
var tileLeftJungle;
var tileRightJungle;

function preload() {
    //Imagens
    game.load.image('river', 'assets/bg/river_512-1200.jpeg');
    game.load.image('jungleLeft', 'assets/bg/jungleLeft_196-1200.jpg');
    game.load.image('jungleRight', 'assets/bg/jungleRight_196-1200.jpg');
    game.load.image('mainScore', 'assets/botoes/score_900-110.png');
    game.load.image('record', 'assets/botoes/score_250-100.png');
    game.load.image('logo', 'asets/bg/logo.png');
    game.load.image('logoBarra', 'assets/bg/logo_barra-160-64.png');

    //Sprites
    game.load.spritesheet('canoeman', 'assets/sprite/canoeman/canoeman_50-100-20.png', 50, 100, 20);
    game.load.spritesheet('alligator', 'assets/sprite/enemies/alligator_64-43-10.png', 64, 43, 10);
    game.load.spritesheet('boto', 'assets/sprite/enemies/boto_80-67-10.png', 80, 67, 10);
    game.load.spritesheet('sand', 'assets/sprite/enemies/sand_76-25-4.png', 76, 25, 4);
    game.load.spritesheet('trunk', 'assets/sprite/enemies/trunk_64-42-4.png', 64, 42, 4);
    game.load.spritesheet('timer', 'assets/botoes/timer-1500-369.png', 150,369,10);

    // Sons
    game.load.audio('remosound', 'songs/remada.mp3');
    game.load.audio('explodesound', 'songs/explode.mp3');
    game.load.audio('botosound', 'songs/boto.mp3');
    game.load.audio('alligatorsound', 'songs/alligator.wav');
}

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

    tileRiver = game.add.tileSprite(jungleWidth, 0, 512, 1200, 'river');
    tileLeftJungle = game.add.tileSprite(0, 0, 196, 1200, 'jungleLeft');    
    tileRightJungle = game.add.tileSprite(jungleWidth+riverWidth, 0, 196, 1200, 'jungleRight');

    createJungles();
    initEnemies();

    boat = game.add.sprite(game.world.centerX, 600 - 50, 'canoeman');
    boat.animations.add('run', [0,1,2,3,4,5,6,7,8,9], 7, true);
    boat.animations.add('dead', [10,11,12,13,14,15,16,17,18,19], 7, false);
    boat.animations.play('run');
    game.physics.enable(boat, Phaser.Physics.ARCADE);
    boat.body.collideWorldBounds = true;
    boat.body.drag.x = 30;
    boat.anchor.setTo(0.5, 0.5);
    boat.body.allowGravity = 0;
    boat.body.immovable = true

    timerBarra = game.add.sprite(0, 150, 'timer');
    timerBarra.animations.add('fase1', [0], 1, true);
    timerBarra.animations.add('fase2', [1], 1, true);
    timerBarra.animations.add('fase3', [2], 1, true);
    timerBarra.animations.add('fase4', [3], 1, true);
    timerBarra.animations.add('fase5', [4], 1, true);
    timerBarra.animations.add('fase6', [5], 7, true);
    timerBarra.animations.add('fase7', [6], 7, true);
    timerBarra.animations.add('fase8', [7], 7, true);
    timerBarra.animations.add('fase9', [8], 7, true);
    timerBarra.animations.add('fase10', [9], 7, true);
    timerBarra.animations.play('fase1');

    var style = { font: "20px Arial Bold", fill: "#ffffff" };
    var styleBig = { font: "40px Arial Bold", fill: "#ffffff" };

    // Record Score
    var recordScore = game.add.sprite(700, 500, 'record');
    var text = game.add.text(830, 550, 'RECORD', style);
    text.anchor.setTo(0.5, 0.5);
    var text = game.add.text(830, 580, localStorage.getItem("highscore"), styleBig);
    text.anchor.setTo(0.5, 0.5);

    //Main 
    score = 20;
    var imgScore = game.add.sprite(0, 0, 'mainScore');
    var style = { font: "40px Arial Bold", fill: "#ffffff" };
    this.labelScore = game.add.text(this.game.world.centerX, 50, score + "m", style);
    this.labelScore.anchor.set(0.5, 0);
    game.time.events.loop(150, addEnemies, this);<commit_msg>score<commit_after>﻿var primeiraFase = { preload: preload, create: create, update: update, render: render };

var boat;
var enemies;
var score = 0;
var highscore = 0;
var jungles;
var tileSpeedRiver = 1.5;
var tileSpeedJungles = 0.3;
var jungleWidth = 196;
var riverWidth = 512;
var angleVelocity = 2;
var finalSound;
var remosSound;
var timerBarra;
var estagio;
var showEstagio = true;
var tileRiver;
var tileLeftJungle;
var tileRightJungle;

function preload() {
    //Imagens
    game.load.image('river', 'assets/bg/river_512-1200.jpeg');
    game.load.image('jungleLeft', 'assets/bg/jungleLeft_196-1200.jpg');
    game.load.image('jungleRight', 'assets/bg/jungleRight_196-1200.jpg');
    game.load.image('mainScore', 'assets/botoes/score_900-110.png');
    game.load.image('record', 'assets/botoes/score_250-100.png');
    game.load.image('logo', 'asets/bg/logo.png');
    game.load.image('logoBarra', 'assets/bg/logo_barra-160-64.png');

    //Sprites
    game.load.spritesheet('canoeman', 'assets/sprite/canoeman/canoeman_50-100-20.png', 50, 100, 20);
    game.load.spritesheet('alligator', 'assets/sprite/enemies/alligator_64-43-10.png', 64, 43, 10);
    game.load.spritesheet('boto', 'assets/sprite/enemies/boto_80-67-10.png', 80, 67, 10);
    game.load.spritesheet('sand', 'assets/sprite/enemies/sand_76-25-4.png', 76, 25, 4);
    game.load.spritesheet('trunk', 'assets/sprite/enemies/trunk_64-42-4.png', 64, 42, 4);
    game.load.spritesheet('timer', 'assets/botoes/timer-1500-369.png', 150,369,10);

    // Sons
    game.load.audio('remosound', 'songs/remada.mp3');
    game.load.audio('explodesound', 'songs/explode.mp3');
    game.load.audio('botosound', 'songs/boto.mp3');
    game.load.audio('alligatorsound', 'songs/alligator.wav');
}

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

    tileRiver = game.add.tileSprite(jungleWidth, 0, 512, 1200, 'river');
    tileLeftJungle = game.add.tileSprite(0, 0, 196, 1200, 'jungleLeft');    
    tileRightJungle = game.add.tileSprite(jungleWidth+riverWidth, 0, 196, 1200, 'jungleRight');

    createJungles();
    initEnemies();

    boat = game.add.sprite(game.world.centerX, 600 - 50, 'canoeman');
    boat.animations.add('run', [0,1,2,3,4,5,6,7,8,9], 7, true);
    boat.animations.add('dead', [10,11,12,13,14,15,16,17,18,19], 7, false);
    boat.animations.play('run');
    game.physics.enable(boat, Phaser.Physics.ARCADE);
    boat.body.collideWorldBounds = true;
    boat.body.drag.x = 30;
    boat.anchor.setTo(0.5, 0.5);
    boat.body.allowGravity = 0;
    boat.body.immovable = true

    timerBarra = game.add.sprite(0, 150, 'timer');
    timerBarra.animations.add('fase1', [0], 1, true);
    timerBarra.animations.add('fase2', [1], 1, true);
    timerBarra.animations.add('fase3', [2], 1, true);
    timerBarra.animations.add('fase4', [3], 1, true);
    timerBarra.animations.add('fase5', [4], 1, true);
    timerBarra.animations.add('fase6', [5], 7, true);
    timerBarra.animations.add('fase7', [6], 7, true);
    timerBarra.animations.add('fase8', [7], 7, true);
    timerBarra.animations.add('fase9', [8], 7, true);
    timerBarra.animations.add('fase10', [9], 7, true);
    timerBarra.animations.play('fase1');

    var style = { font: "20px Arial Bold", fill: "#ffffff" };
    var styleBig = { font: "40px Arial Bold", fill: "#ffffff" };

    // Record Score
    var recordScore = game.add.sprite(700, 500, 'record');
    var text = game.add.text(830, 550, 'RECORD', style);
    text.anchor.setTo(0.5, 0.5);
    var text = game.add.text(830, 580, localStorage.getItem("highscore"), styleBig);
    text.anchor.setTo(0.5, 0.5);

    //Main
    var imgScore = game.add.sprite(0, 0, 'mainScore');
    var style = { font: "40px Arial Bold", fill: "#ffffff" };
    this.labelScore = game.add.text(this.game.world.centerX, 50, score + "m", style);
    this.labelScore.anchor.set(0.5, 0);
    game.time.events.loop(150, addEnemies, this);
{'fraction_non_alphanumeric': 0.1852086768996575, 'fraction_numerical': 0.06977039198274769, 'mean_word_length': 4.024856596558317, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2966515', 'n_tokens_mistral': 3442, 'n_tokens_neox': 3034, 'n_words': 535}