/**
 * Created with JetBrains WebStorm.
 * User: administrator
 * Date: 10/25/12
 * Time: 7:44 PM
 * To change this template use File | Settings | File Templates.
 */


ig.module(
    'game.entities.reward_second'
)
    .requires(
    'impact.entity'
)
    .defines(function () {
        Entityreward_two = ig.Entity.extend({
		collides:ig.Entity.COLLIDES.NEVER,
            type:ig.Entity.TYPE.NONE,
			checkAgainst:ig.Entity.TYPE.NONE,
            size:{x:183, y:183},
            animSheet:new ig.AnimationSheet('media/Animation_edge_glow.png',183,183),
            zIndex:10000,
            init:function (x,y,settings) {
                this.parent(x, y, settings);
                this.addAnim('reward1', 0.2, [0], true);

                this.addAnim('reward2', 0.2, [1], true);

                this.addAnim('reward3', 0.2,[2], true);

                this.addAnim('reward4', 0.2, [3], true);

                this.addAnim('reward5', 0.2, [4], true);

                this.addAnim('reward6', 0.2, [5], true);

                this.addAnim('reward7', 0.2, [6], true);


                this.addAnim('reward8', 0.2, [7], true);

                this.addAnim('reward9', 0.2, [8], true);

                this.addAnim('reward10', 0.2, [9], true);

                this.addAnim('reward20', 0.2, [10], true);

                this.addAnim('reward30', 0.2,[11], true);

                this.addAnim('reward40', 0.2, [12], true);

                this.addAnim('reward50', 0.2, [13], true);

                this.addAnim('reward60', 0.2, [14], true);

                this.addAnim('reward70', 0.2, [15], true);

                this.addAnim('reward80', 0.2, [16], true);

                this.addAnim('reward90', 0.2, [17],true);
                this.vel.x=0;
                this.vel.y=0;
            },
            changeRewardAnimationSheet:function(number,obj){
               var aa=parseInt(number/global_score_control.multiplicationFactor);
                switch (aa) {
                    case 1:
                        return obj.anims.reward1;
                        break;
                    case 2:
                        return obj.anims.reward2;
                        break;
                    case 3:
                        return obj.anims.reward3;
                        break;
                    case 4:
                        return obj.anims.reward4;
                        break;
                    case 5:
                        return obj.anims.reward5;
                        break;
                    case 6:
                        return obj.anims.reward6;
                        break;
                    case 7:
                        return obj.anims.reward7;
                        break;
                    case 8:
                        return obj.anims.reward8;
                        break;

                    case 9:
                        return obj.anims.reward9;
                        break;

                    case 10:case 11:  case 12:case 13:  case 14:case 15:  case 16:case 17:  case 18:case 19:
                    return obj.anims.reward10;
                    break;

                    case 20:  case 21:  case 22:case 23:  case 24:case 25:  case 26:case 27:  case 28:case 29:
                    return obj.anims.reward20;
                    break;

                    case 30:case 31:  case 32:case 33:  case 34:case 35:  case 36:case 37:  case 38:case 39:
                    return obj.anims.reward30;
                    break;

                    case 40:case 41:  case 42:case 43:  case 44:case 45:  case 46:case 47:  case 48:case 49:
                    return obj.anims.reward40;
                    break;

                    case 50:case 51:  case 52:case 53:  case 54:case 55:  case 56:case 57:  case 58:case 59:
                    return obj.anims.reward50;
                    break;

                    case 60:case 61:  case 62:case 63:  case 64:case 65:  case 66:case 67:  case 68:case 69:
                    return obj.anims.reward60;
                    break;

                    case 70:case 71:  case 72:case 73:  case 74:case 75:  case 76:case 77:  case 78:case 79:
                    return obj.anims.reward70;
                    break;

                    case 80:case 81:  case 82:case 83:  case 84:case 85:  case 86:case 87:  case 88:case 89:
                    return obj.anims.reward80;
                    break;

                    case 90:case 91:  case 92:case 93:  case 94:case 95:  case 96:case 97:  case 98:case 99:
                    return obj.anims.reward90;
                    break;

                    default:
                        return obj.anims.reward1;
                }
            },
            check:function (other) {
                return false;
            },
            update:function () {
                this.parent();
            }

        });
    });