![]() |
Bullet Dynamics v1.0.0
|
Component that allows the object to shoot the Bullets using Shoot method.
It supports fire rate setting which limits the Shoot method until the FireRate delay has been met.
More...
Public Member Functions | |
| virtual void | Shoot () |
Method that will create a new Bullet and shoot it from the OutputPoint. It will raise the OnShoot action after the bullet has been created. | |
| virtual void | SetIsShootingEnabled (bool isEnabled) |
| Sets the flag that blocks the Shoot method if the flag is set to false. | |
| virtual void | SetFireRate (float newFireRate) |
| Sets the newFireRate to the weapon. | |
Public Attributes | |
| UnityEvent< Bullet > | OnShoot |
| Event that is raised when this weapon has shot a Bullet. | |
Protected Member Functions | |
| virtual IEnumerator | FireRateLimitCoroutine () |
| Coroutine that delays the ability to shoot by setting _fireRateDelayActive to false until the _fireRate delay doesn't pass. | |
| void | StartFireRateLimitCoroutine () |
| Starts the FireRateLimitCoroutine in a safe way (by stopping current coroutine). | |
| void | StopFireRateLimitCoroutine () |
| Stops the FireRateLimitCoroutine. | |
Protected Attributes | |
| float | _fireRate = 10f |
| Transform | _outputPoint = default |
| BulletData | _bulletData = default |
| bool | _fireRateDelayActive = true |
| bool | _isShootingEnabled = true |
| Coroutine | _fireRateLimitCoroutine = null |
Properties | |
| virtual float | FireRate [get] |
| Fire rate of this weapon (Bullets per second). | |
| virtual Transform | OutputPoint [get] |
| Output point from which the Bullet will be instantiated when the Shoot is called. | |
| virtual BulletData | BulletData [get] |
| Data of the Bullet that is used by this Weapon. | |
| virtual bool | IsShootingEnabled [get] |
| Flag that blocks the Shoot method from firing a bullet if it is set to false. | |
Component that allows the object to shoot the Bullets using Shoot method.
It supports fire rate setting which limits the Shoot method until the FireRate delay has been met.
|
protectedvirtual |
Coroutine that delays the ability to shoot by setting _fireRateDelayActive to false until the _fireRate delay doesn't pass.
|
virtual |
|
virtual |
|
virtual |
Method that will create a new Bullet and shoot it from the OutputPoint.
It will raise the OnShoot action after the bullet has been created.
|
protected |
Starts the FireRateLimitCoroutine in a safe way (by stopping current coroutine).
|
protected |
Stops the FireRateLimitCoroutine.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| UnityEvent<Bullet> BulletDynamics.Weapons.Weapon.OnShoot |
|
get |
|
get |
|
get |