ig.module(
	'game.entities.craked'
)
.requires(
	'game.entities.finalData',
	'impact.entity'
)
.defines(function(){

EntityCraked = ig.Entity.extend({
	name: null,

//---------------------------------------------------------------------------------------------------------------------------------------------
	init: function( x, y, settings ) {
		this.parent( x, y, settings );
		switch(this.name) {
			case '1tabpenguin':
			case '2tabpenguin':
			case '3tabpenguin':
			case '4tabpenguin':
				this.animSheet = new ig.AnimationSheet(FinalData.img_penguin_craked, FinalData.CRAKED_SIZE.x, FinalData.CRAKED_SIZE.y);
				break;
			case '2tabfish':
			case '3tabfish':
				this.animSheet = new ig.AnimationSheet(FinalData.img_fish_craked, FinalData.CRAKED_SIZE.x, FinalData.CRAKED_SIZE.y);
				break;
			case '1tabigloo':
			case '2tabigloo':
				this.animSheet = new ig.AnimationSheet(FinalData.img_igloo_craked, FinalData.CRAKED_SIZE.x, FinalData.CRAKED_SIZE.y);
				break;
		}

		this.addAnim('wave', 0.15, [0, 1, 2, 3, 4, 5, 5 ]);
	},
//---------------------------------------------------------------------------------------------------------------------------------------------
	update: function() {
		
		if( this.currentAnim.frame == 6 ) {
			this.kill();
		}
		
		this.parent();
	}
//-----------------------------------------------------------------------------------------------------------------------------------
});
});