<commit_before>ig.module('game.entities.enemyBedbug').requires('game.entities.enemy'/*,'plugins.perpixel' */).defines(function() {
	EntityEnemyBedbug = EntityEnemy.extend({
		collides: ig.Entity.COLLIDES.PASSIVE,
		
		maxVel: {x: 400, y: 400},
		friction: {x: 300, y: 0},
		size:{x:64,y:64},
		offset:{x:0,y:0},
		speed:100,
		
		health:50,
		
		animSheet: new ig.AnimationSheet( 'media/images/sprites/bedbug.png', 64, 64 ),
		
		init: function(x,y,settings) {
			this.parent(x,y,settings);
			
			this.addAnim('idle', 1, [0]);
			this.addAnim('walk', .3, [0,1]);
			this.currentAnim = this.anims.walk;
		},
		
		update: function() {
			if( !ig.game.collisionMap.getTile(
					this.pos.x + (this.flip ? +4 : this.size.x -4),
					this.pos.y + this.size.y+1
				)
			) {
				this.flip = !this.flip;
			}
			if(ig.game.collisionMap.getTile(this.pos.x + (this.flip ?- 4 : this.size.x+4),this.pos.y + 10)) {
				this.flip = !this.flip;
			}
			
			var xdir = this.flip ? -1 : 1;
			this.vel.x = this.speed * xdir;
			
			this.parent();
		},
		
		receiveSunDamage: function(damage, other) {
			this.receiveDamage(damage, other);
			for (i = 0; i < 1; i++) {
				ig.game.spawnEntity(EntityAshParticle, this.pos.x, this.pos.y, {width: this.size.x, height: this.size.y});
			}
		},
		
		check: function( other ) {
			other.receiveDamage( 10, this );
			this.kill();
		}
	});
});<commit_msg>Commented bedbug.  #19<commit_after>//Bedbug entity.  Used primarily on level 1.  Bedbugs are both placed on the level initially and spawned by couches.  They move side to side and hurt the player if they touch them.  Killed by the flamethrower on level 1.

ig.module('game.entities.enemyBedbug').requires('game.entities.enemy'/*,'plugins.perpixel' */).defines(function() {
	EntityEnemyBedbug = EntityEnemy.extend({
		collides: ig.Entity.COLLIDES.PASSIVE,
		
		maxVel: {x: 400, y: 400},
		friction: {x: 300, y: 0},
		size:{x:64,y:64},
		offset:{x:0,y:0},
		speed:100,
		
		health:50,
		
		animSheet: new ig.AnimationSheet( 'media/images/sprites/bedbug.png', 64, 64 ),
		
		init: function(x,y,settings) {
			this.parent(x,y,settings);
			
			this.addAnim('idle', 1, [0]);
			this.addAnim('walk', .3, [0,1]);
			this.currentAnim = this.anims.walk;
		},
		
		update: function() {
			//If the bedbug has reached the edge of a platform or has hit a wall and needs to turn around
			if(!ig.game.collisionMap.getTile(this.pos.x + (this.flip ? +4 : this.size.x -4), this.pos.y + this.size.y+1))
				this.flip = !this.flip;
			if(ig.game.collisionMap.getTile(this.pos.x + (this.flip ?- 4 : this.size.x+4),this.pos.y + 10))
				this.flip = !this.flip;
			
			//Go left or right
			var xdir = this.flip ? -1 : 1;
			this.vel.x = this.speed * xdir;
			
			this.parent();
		},
		
		//If the bedbug hits Entity.TYPE.A, it deals 10 damage to it and kills itself.
		check: function( other ) {
			other.receiveDamage( 10, this );
			this.kill();
		}
	});
});
{'fraction_non_alphanumeric': 0.17789941840574752, 'fraction_numerical': 0.030790283954840916, 'mean_word_length': 3.055478502080444, 'pattern_counts': {'":': 0, '<': 4, '<?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': '2474731', 'n_tokens_mistral': 1380, 'n_tokens_neox': 1124, 'n_words': 241}