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