Created
December 16, 2014 14:08
-
-
Save DaveVoyles/53304134ab01227ce1b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; | |
bulletSpeed = 12f; | |
bulletRandomness = 0.15f; | |
break; | |
case BulletPresetType.GatlingGun: | |
bulletCount = 3; | |
weaponFireRate = 0.05f; | |
bulletSpacing = 0.25f; | |
bulletSpread = 0.0f; | |
bulletSpeed = 20f; | |
bulletRandomness = 0.35f; | |
break; | |
default: | |
// BulletPresetType.Simple | |
bulletCount = 1; | |
weaponFireRate = 0.15f; | |
bulletSpacing = 1f; | |
bulletSpread = 0.05f; | |
bulletSpeed = 12f; | |
bulletRandomness = 0.15f; | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment