A mod that makes use of the built in charge system for the Gun class, and makes it viable.
To use, simply set gun.Charge = true; in your card's SetupCard.
Change log
- GunChargePatch will now search for modded prefab bullets when a card is picked.
- Patches an issue with not properly recognizing other bullet types.
- Added the ability to RPC a bullet charge to bullets.
- Initial Release
Gun Fields
### useCharge() ```cs bool useCharge ``` #### Description Tells a gun that it's a charged weapon now.float chargeDamageMultiplierThe multiplier for a gun's damage based on its charge. Default value of 1.
float chargeSpeedToThe multiplier for a gun's bullet speed based on its charge. Default value of 1.
Extension Methods
float GetBulletCharge(this ProjectileHit instance)Returns the charge of the bullet instance.
float charge = this.gameObject.GetComponent<ProjectileHit>().GetBulletCharge().charge;GunAdditionalData GetAdditionalData(this Gun instance)Returns the additional data associated with a gun object.
gun.GetAdditionalData().chargeTime = 1f;Classes
class GunAdditionalData- float chargeTime - default 1. How long it takes to charge a weapon.
- bool useDefaultChargingMethod - default true. Only change if you know what you're doing.
Information associated with the Gun object for a player.
gun.GetAdditionalData().chargeTime = 1f;