This file contains hidden or 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; |
This file contains hidden or 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
//<summary> | |
//Check for user input and switch weapons accordingly | |
//</summary> | |
private void CheckIfSwitchingWeapon() | |
{ | |
if (Input.GetButtonDown("SwitchWeapon")) | |
{ | |
NextWeapon(); | |
} | |
} |
NewerOlder