Component that allows the weapon to be zeroed to the specified distance.
Use the method SetZeroing(float) to rotate the _affectedTransform to the correct rotation.
More...
|
| UnityEvent< float > | ZeroingChanged |
| | Action that is raised when the zeroing changes.
|
| |
Component that allows the weapon to be zeroed to the specified distance.
Use the method SetZeroing(float) to rotate the _affectedTransform to the correct rotation.
Definition at line 12 of file WeaponZeroing.cs.
◆ Awake()
| virtual void BulletDynamics.Weapons.WeaponZeroing.Awake |
( |
| ) |
|
|
protectedvirtual |
◆ SetRotationOfTheAffectedTransform()
| virtual void BulletDynamics.Weapons.WeaponZeroing.SetRotationOfTheAffectedTransform |
( |
float | rotation | ) |
|
|
virtual |
◆ SetZeroing()
| virtual void BulletDynamics.Weapons.WeaponZeroing.SetZeroing |
( |
float | distance | ) |
|
|
virtual |
Sets the weapon's zeroing based on the BulletData and BulletEnvironmentData of the current Weapon and BulletEnvironment.
- Parameters
-
Definition at line 47 of file WeaponZeroing.cs.
◆ Start()
| virtual void BulletDynamics.Weapons.WeaponZeroing.Start |
( |
| ) |
|
|
protectedvirtual |
◆ _affectedTransform
| Transform BulletDynamics.Weapons.WeaponZeroing._affectedTransform = default |
|
protected |
◆ _currentZeroing
| float BulletDynamics.Weapons.WeaponZeroing._currentZeroing = 0f |
|
protected |
◆ _initialZeroing
| float BulletDynamics.Weapons.WeaponZeroing._initialZeroing = 100f |
|
protected |
◆ _weapon
| Weapon BulletDynamics.Weapons.WeaponZeroing._weapon |
|
protected |
◆ ZeroingChanged
| UnityEvent<float> BulletDynamics.Weapons.WeaponZeroing.ZeroingChanged |
Action that is raised when the zeroing changes.
Definition at line 31 of file WeaponZeroing.cs.
◆ CurrentZeroing
| float BulletDynamics.Weapons.WeaponZeroing.CurrentZeroing |
|
get |