///////////////////////////////////////////////////////////
// in 'Start' we do things that potentially depend on all
// other components first having run their 'Awake' calls
///////////////////////////////////////////////////////////
void Start()
{
// set up weapon availability. if a weapon is not in this
// list the script won't allow the player to use it. all
// weapons are available by default.
// NOTE: this is just a placeholder for your game's actual
// inventory system (as is ammo availability, which is set
// on every vp_FPSShooter individually)
foreach (GameObject weapon in Camera.Weapons)
{
m_AvailableWeapons.Add(weapon);
}
// use the 'SetWeaponAvailable' method to give or take weapons
// from the player, and check 'WeaponAvailable' to see if the player
// has a certain weapon. all weapons can be taken away by doing:
// 'm_AvailableWeapons.Clear();'
// attempt to set weapon 1
if (WeaponCount > 0)
{
Camera.SetWeapon(1);
}
}