namespace BP
{
	namespace Weapon
	{
		array<ScriptWeapon@> Scripts(MAX_WEAPONS); //all weapon scriptobjects
		
		abstract class ScriptWeapon : ScriptObject
		{
			kWeapon @self;
			int id;
			//------------------------------------------------------------------------------------------------------------------------
			ScriptWeapon(kWeapon @actor)
			{
				@self = actor;
				
				#ifdef BP_DEBUG
				if (!BP::Array::IndexInRange(Scripts.length(), id))
				{
					DebugError("[ScriptWeapon .ctor] Weapon ID of " + id + " is not in range from 0 to " + (MAX_WEAPONS - 1));
					return;
				}
				#endif
				
				@Scripts[id] = @this;
			}
			//------------------------------------------------------------------------------------------------------------------------
			void OnTick()
			{
				// self.AnimTrackComponent().ChangeSpeed(0.5f);
			}
			//------------------------------------------------------------------------------------------------------------------------
			void OnSpawn()
			{
				
			}
			//------------------------------------------------------------------------------------------------------------------------
			void OnBeginFire()
			{
				
			}
			//------------------------------------------------------------------------------------------------------------------------
			void OnFire()
			{
				
			}
			//------------------------------------------------------------------------------------------------------------------------
			void OnEndFire()
			{
				
			}
			//------------------------------------------------------------------------------------------------------------------------
			void OnLower()
			{
				
			}
			//------------------------------------------------------------------------------------------------------------------------
			void OnRaise()
			{
				
			}
			//------------------------------------------------------------------------------------------------------------------------
			void OnHoldster()
			{
				
			}
			//------------------------------------------------------------------------------------------------------------------------
			void OnFiredParticleFromAnim(kParticle@ particle)
			{
				
			}
			//------------------------------------------------------------------------------------------------------------------------
			// Called as soon as the weapon is equipped
			//------------------------------------------------------------------------------------------------------------------------
			void OnEquipped()
			{
				
			}
			//------------------------------------------------------------------------------------------------------------------------
			// Called every game tick even if not equipped
			//------------------------------------------------------------------------------------------------------------------------
			void OnGameTick()
			{
				
			}
			//------------------------------------------------------------------------------------------------------------------------
		};
	}
}
