<commit_before>//Variveis de JOGO
var screen = null;

//Variveis do ASTEROID
var asteroidSprite;
var angularVelocity = 0.05;
var velocityX = 3;
var velocityY = 3;

var angle = 0;


var AsteroidLayer = cc.Layer.extend({
	spriteFrameCache: cc.SpriteFrameCache.getInstance(),
	
    init:function()
    {
		var i;

		//Pega o tamanho da tela
	    screen = cc.Director.getInstance().getWinSize();
	    //Cria o Layer do jogo
		this.layerGame = cc.LayerColor.create(new cc.Color4B(0, 0, 0, 255), 800, 480);    
	    
        //Coloca GameSpriteSheet na memria
        this.spriteFrameCache.addSpriteFrames("res/spritesheets/GameSpriteSheet.plist", "res/spritesheets/GameSpriteSheet.png");

        //Movimenta os asteroids aleatoriamente
		for(i=0; i<7; i++){
			var asteroidSprite = cc.Sprite.createWithSpriteFrameName("asteroid2_118-118.png");
			var randomDir = Math.random()*2*Math.PI;
			
			asteroidSprite.xSpeed = velocityX*Math.cos(randomDir);
			asteroidSprite.ySpeed = velocityY*Math.sin(randomDir);
			this.layerGame.addChild(asteroidSprite);
			
			asteroidSprite.setPosition(new cc.Point(Math.random()*500, Math.random()*500));
			
			asteroidSprite.schedule(function(){
				angle += angularVelocity;
				this.setRotation(angle);
                if(angle > 360)
                    angle = 0;
				
     			this.setPosition(new cc.Point(this.getPosition().x + this.xSpeed, this.getPosition().y + this.ySpeed));
     			if(this.getPosition().x > screen.width){
					this.setPosition(new cc.Point(this.getPosition().x - screen.width, this.getPosition().y));
				}
				if(this.getPosition().x < 0){
					this.setPosition(new cc.Point(this.getPosition().x + screen.width, this.getPosition().y));
				}
				if(this.getPosition().y > screen.width){
					this.setPosition(new cc.Point(this.getPosition().x, this.getPosition().y - screen.width));
				}
				if(this.getPosition().y < 0){
					this.setPosition(new cc.Point(this.getPosition().x, this.getPosition().y + screen.width));
				}
			});
		}
		
     	this.addChild(this.layerGame);
		return true;
    }
});

var AsteroidScene = cc.Scene.extend({
    onEnter:function(){
        this._super();
        var layer = new AsteroidLayer();
        layer.init();
        this.addChild(layer);
    }
});<commit_msg>Ajustando arquvo para ser chamado por outro<commit_after>var Asteroid = cc.Sprite.extend({
	spriteFrameCache: cc.SpriteFrameCache.getInstance(),
	asteroidSprite: null,
	velocityX: 3,
	velocityY: 3,
	msg:null,

    	initBigAsteroid:function()
    	{
		for(i=0; i<7; i++){
			//var asteroidSprite = cc.Sprite.createWithSpriteFrameName("asteroid2_118-118.png");
			var randomDir = Math.random()*2*Math.PI;
			
			asteroidSprite.xSpeed = velocityX*Math.cos(randomDir);
			asteroidSprite.ySpeed = velocityY*Math.sin(randomDir);
			this.layerGame.addChild(asteroidSprite);
			
			asteroidSprite.setPosition(new cc.Point(Math.random()*500, Math.random()*500));
			
			asteroidSprite.schedule(function(){		
	  			this.setPosition(new cc.Point(this.getPosition().x + this.xSpeed, this.getPosition().y + this.ySpeed));
	     			if(this.getPosition().x > screen.width){
					this.setPosition(new cc.Point(this.getPosition().x - screen.width,this.getPosition().y));
				}
				if(this.getPosition().x < 0){
					this.setPosition(new cc.Point(this.getPosition().x + screen.width,this.getPosition().y));
				}
				if(this.getPosition().y > screen.width){
					this.setPosition(new cc.Point(this.getPosition().x ,this.getPosition().y - screen.width));
				}
				if(this.getPosition().y < 0){
					this.setPosition(new cc.Point(this.getPosition().x ,this.getPosition().y + screen.width));
				}
			});
		}
    }
});
{'fraction_non_alphanumeric': 0.15514886642993717, 'fraction_numerical': 0.01666211417645452, 'mean_word_length': 3.406738868832732, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 8, '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': '225788', 'n_tokens_mistral': 1439, 'n_tokens_neox': 1243, 'n_words': 193}