Skip to content

Instantly share code, notes, and snippets.

View DaveVoyles's full-sized avatar

Dave Voyles DaveVoyles

View GitHub Profile
// This code came from: http://hobbyistcoder.com/product/2d-shooter-bullet-weapon-system-asset-unity3d/
private void BulletPresetChangedHandler()
{
switch (BulletPreset)
{
case BulletPresetType.Simple:
bulletCount = 1;
weaponFireRate = 0.15f;
bulletSpacing = 1f;
bulletSpread = 0.05f;
//<summary>
//Check for user input and switch weapons accordingly
//</summary>
private void CheckIfSwitchingWeapon()
{
if (Input.GetButtonDown("SwitchWeapon"))
{
NextWeapon();
}
}