mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-17 19:11:32 +00:00
cleanup
This commit is contained in:
parent
b1b35c58f8
commit
e2f1d63d6b
@ -12,7 +12,6 @@ namespace QSB.Animation.Player.Thrusters
|
||||
private float _belowMaxThrustScalar = 1f;
|
||||
private MeshRenderer _thrusterRenderer;
|
||||
private Vector3 _thrusterFilter;
|
||||
private bool _thrustersFiring;
|
||||
private float _baseLightRadius;
|
||||
private float _currentScale;
|
||||
|
||||
@ -37,7 +36,6 @@ namespace QSB.Animation.Player.Thrusters
|
||||
{
|
||||
_thrusterRenderer = GetComponent<MeshRenderer>();
|
||||
_thrusterFilter = OWUtilities.GetShipThrusterFilter(_thruster);
|
||||
_thrustersFiring = false;
|
||||
_baseLightRadius = _light.range;
|
||||
_currentScale = 0f;
|
||||
_thrusterRenderer.enabled = false;
|
||||
@ -68,15 +66,15 @@ namespace QSB.Animation.Player.Thrusters
|
||||
_currentScale = 0f;
|
||||
_scaleSpring.ResetVelocity();
|
||||
}
|
||||
if ((!_thrustersFiring) && _currentScale <= 0.001f)
|
||||
if (_currentScale <= 0.001f)
|
||||
{
|
||||
_currentScale = 0f;
|
||||
_scaleSpring.ResetVelocity();
|
||||
}
|
||||
transform.localScale = Vector3.one * _currentScale;
|
||||
_light.range = _baseLightRadius * _currentScale;
|
||||
_thrusterRenderer.enabled = (_currentScale > 0f);
|
||||
_light.enabled = (_currentScale > 0f);
|
||||
_thrusterRenderer.enabled = _currentScale > 0f;
|
||||
_light.enabled = _currentScale > 0f;
|
||||
}
|
||||
|
||||
private float GetThrustFraction() => Vector3.Dot(_attachedPlayer.JetpackAcceleration.LocalAcceleration, _thrusterFilter);
|
||||
|
@ -57,11 +57,9 @@ namespace QSB.Animation.Player.Thrusters
|
||||
}
|
||||
}
|
||||
|
||||
private static void CreatePlayerParticlesController(GameObject root)
|
||||
{
|
||||
private static void CreatePlayerParticlesController(GameObject root) =>
|
||||
// TODO : Implement this. (Footsteps / Landing)
|
||||
Object.Destroy(root.GetComponent<PlayerParticlesController>());
|
||||
}
|
||||
|
||||
private static void CreateThrusterParticlesBehaviour(GameObject root, PlayerInfo player)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user