         return magazineSize > 0 && justReloading == false && justFiring == false
     }
     
-    /// tells you if it is allowed to fire. depending if weapon is just firing or just reloading
+    /// tells you if it is allowed to fire. depending if weapon is just firing or just reloading. If infiniteAmmo is true it will return true even if ammoOfCurrentMagazine is 0
     /// - Returns: Bool
     func allowedToFire()->Bool {
-        return justFiring == false && justReloading == false && ammoOfCurrentMagazine > 0
+        return justFiring == false && justReloading == false && (infiniteAmmo == true || ammoOfCurrentMagazine > 0)
     }
     
     /// reloads the weapon. it discards current ammoOfCurrentMagazine and use a new magazine to refill it

}

protocol SKWeapon:Weapon{
   
}

/* Implements SpriteKit specific wait methods for weapon protocol */
extension SKWeapon where Self:SKNode {
    
    /// Fires and disallow fire for rateOfFirePerSecond seconds
    /// - Parameter afterFired: Optional block closure that is executed after the weapon fired

    /// Time that should be waited for before it is allowed to fire again
    var rateOfFirePerSecond:NSTimeInterval { get set }
    
    /** If set to true syncedFireAndReload() does not subtract any ammo and allowedToFire() returns true even if ammo is 0. As a result reload() is never called on syncedFireAndReload().
     */
    var infiniteAmmo:Bool { get set }
    
    /// Ammo of the current magazine, set to 0 when infiniteAmmo is true
    var ammoOfCurrentMagazine:Int { get set }
    
    /// Ammo capacity of one magazine, set to 0 when infiniteAmmo is true
    var magazineSize:Int { get set }
    
    /// Remaining available magazines, set to 0 when infiniteAmmo is true
    var remainingMagazines:Int { get set }
    
    /// Time it should take to reload the weapon
