{"size": 859, "ext": "js", "max_stars_repo_path": "public/javascripts/game/items/weapons/defaultWeapon.js", "max_stars_repo_name": "Hajtosek/ggEasy", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "public/javascripts/game/items/weapons/defaultWeapon.js", "max_issues_repo_name": "Hajtosek/ggEasy", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "public/javascripts/game/items/weapons/defaultWeapon.js", "max_forks_repo_name": "Hajtosek/ggEasy", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 31.8148148148, "max_line_length": 102, "alphanum_fraction": 0.6111757858}
var DefaultWeapon = Class.extend({
    init: function () {
        document.getElementById("weapon").innerHTML = this.name + " " + this.ammo + "/" + this.maxAmmo
    },
    name: "Pew pew gun",
    isIninityAmmo: true,
    maxAmmo: 0,
    ammo: 0,
    damage: 5,
    delay: 15,
    bulletMaterial: new THREE.MeshLambertMaterial({
        side: THREE.DoubleSide,
        map: THREE.ImageUtils.loadTexture(textures.bullets.defaul)
    }),
    shoot: function (direction) {
        var bullet = new Bullet();
        bullet.mesh.material = this.bulletMaterial;
        bullet.damage = this.damage;
        bullet.direction = direction;
        bullet.shoot(basicScene.user.mesh.position);
        this.updateAmmo();
    },
    updateAmmo: function () {
        document.getElementById("weapon").innerHTML = this.name + " " + this.ammo+"/"+this.maxAmmo
    }
});
