/**
 * @class kWeapon
 * @brief Weapon functions
 */
 
class kWeapon : kActor
{
public:

	/**
	 * @brief The player that has this weapon
	 */
	kPlayer &Owner();
	
	/**
	 * @brief Enables/Disables weapon switching for the player.
	 * @param lock If true will prevent the player from being able to switch weapons. If false will reenable weapon switching for the player.
	 */
	void LockControls(const bool lock);
	
	/**
	 * @brief Returns true if this weapon can use scope and the player enables it with alt fire
	 */
	const bool ScopeReady();
	
	/**
	 * @brief Fire a projectile from the weapon. Consumes ammo based on weaponInfo.txt defs ammoConsumption property
	 */
	kParticle @FireProjectile(const kStr &in particlePath, const kVec3 &in localOrigin);
	
	/**
	 * @brief Called on first frame of weapon firing
	 */
	void OnBeginFire();
	
	/**
	 * @brief Called every tick while the weapon is firing
	 */
	void OnFire();
	
	/**
	 * @brief Called when the weapon is no longer firing
	 */
	void OnEndFire();
	
	/**
	 * @brief Called after the weapons lower animation is done playing which happens on a weapon switch
	 */
	void OnLower();
	
	/**
	 * @brief Called after the weapons raise animation is done playing which happens on a weapon switch
	 */
	void OnRaise();
	
	/**
	 * @brief Called after the weapon is done playing lowering animation which is done while climbing
	 */
	void OnHoldster();
	
	/**
	 * @brief Called when kWeapon::FireProjectile is called or when the weapons animation events calls it.
	 * @param particle The particle that is being fired from the weapon
	 */
	void OnFiredParticleFromAnim(kParticle@ particle);

};
