MF_B_Gun : MF_AbstractWeapon
Place this at the root level of a weapon GameObject. This controls all the properties of a weapon.
Inherited Variables
shotSound, inaccuracy, shotSpeed, maxRange, shotDuration, cycleTime, burstAmount, burstResetTime, shotsPerRound, maxAmmoCount, unlimitedAmmo, reloadTime, dontReload, active, aimTolerance, aimTime, requireRange, requireAngle, requireVelocity, requirePrecision, exits, platformVelocity, curAmmoCount, curBurstCount, curExit, curInaccuracy, bursting, delay
Inherited Methods
Shoot(), ShootBurst(), ReadyCheck(), AimCheck()
Override DoFire : void ()
Use if you’ve already called ReadyCheck(), and want the weapon to fire without first checking if it’s ready. This will cause the weapon to shoot even if it shouldn’t be able to fire, such as being out of ammo.
Override RangeCheck : bool ( target : Transform )
Override RangeCheck : bool ( target : Transform, mult : float )
Determines if a target is within the maxRange * mult of this weapon. If this weapon’s shot prefab’s rigidbody useGravity is true, then the ballistic arc will be considered in the range calculation.
Public Variables
shot : MF_B_Projectile
The prefab of your projectile to be fired. This should have a rigidbody component in its root object.
gravity : gravityUsage enum { Default, Gravity, No_Gravity }
Provides an easy way to change shot gravity usage.
Default: The gravity setting of the projectile rigidbody won’t be changed.
Gravity: Projectile rigidbody gravity setting will be set to true.
No_Gravity: Projectile rigidbody gravity setting will be set to false.
Place this at the root level of a weapon GameObject. This controls all the properties of a weapon.
Inherited Variables
shotSound, inaccuracy, shotSpeed, maxRange, shotDuration, cycleTime, burstAmount, burstResetTime, shotsPerRound, maxAmmoCount, unlimitedAmmo, reloadTime, dontReload, active, aimTolerance, aimTime, requireRange, requireAngle, requireVelocity, requirePrecision, exits, platformVelocity, curAmmoCount, curBurstCount, curExit, curInaccuracy, bursting, delay
Inherited Methods
Shoot(), ShootBurst(), ReadyCheck(), AimCheck()
Override DoFire : void ()
Use if you’ve already called ReadyCheck(), and want the weapon to fire without first checking if it’s ready. This will cause the weapon to shoot even if it shouldn’t be able to fire, such as being out of ammo.
Override RangeCheck : bool ( target : Transform )
Override RangeCheck : bool ( target : Transform, mult : float )
Determines if a target is within the maxRange * mult of this weapon. If this weapon’s shot prefab’s rigidbody useGravity is true, then the ballistic arc will be considered in the range calculation.
Public Variables
shot : MF_B_Projectile
The prefab of your projectile to be fired. This should have a rigidbody component in its root object.
gravity : gravityUsage enum { Default, Gravity, No_Gravity }
Provides an easy way to change shot gravity usage.
Default: The gravity setting of the projectile rigidbody won’t be changed.
Gravity: Projectile rigidbody gravity setting will be set to true.
No_Gravity: Projectile rigidbody gravity setting will be set to false.