ig.module(
    'game.entities.foodconsumed10'
)
    .requires(
    'impact.entity'
 
   // 'plugins.scale'
)
    .defines(function () {
        EntityFoodConsumed10 = ig.Entity.extend({
            collides:ig.Entity.COLLIDES.NEVER,
            type:ig.Entity.TYPE.NONE,
			checkAgainst:ig.Entity.TYPE.NONE,
            pixcaltype:"ignore",
            size:{x:125,y:110},
            animSheet:new ig.AnimationSheet('media/10-90.png',125,110),
            bounciness:1,
            temp:0,
            init:function (x, y, settings) {
                this.parent(x, y, settings);
                this.addAnim('score1', 1, [0]);
                this.addAnim('score2', 1, [1]);
                this.addAnim('score3', 1, [2]);
                this.addAnim('score4', 1, [3]);
                this.addAnim('score5', 1, [4]);
                this.addAnim('score6', 1, [5]);
                this.addAnim('score7', 1, [6]);
                this.addAnim('score8', 1, [7]);
                this.addAnim('score9', 1, [8]);
                this.maxVel.x = 500;
                this.maxVel.y = 500;

              },
              update:function () {
               this.temp = ig.game.getEntityByName("player_organism");
                if(typeof this.temp!='undefined' && this.temp!=null && this.temp!='undefined'){
                    this.vel.x = this.temp.vel.x;
                    this.vel.y = this.temp.vel.y;
                    this.pos.x = this.temp.pos.x + Math.floor(((this.temp.size.x - this.size.x) / 2));
                    this.pos.y = this.temp.pos.y + Math.floor(((this.temp.size.y - this.size.y) / 2));
                }
                this.parent();
         }

        });
    });