Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void ThrusterCheck()
- {
- if (_thrustMax <= _thrustMin)
- {
- _thrustMax = _thrustMin;
- _canThrust = false;
- if (_thrustMin == _thrustMax)
- {
- StartCoroutine(ResettingThruster());
- }
- }
- }
- IEnumerator ResettingThruster()
- {
- yield return new WaitForSeconds(5);
- _thruster.ResetThrusters(_thrustMax = Mathf.Lerp(_min, _max, _fillTime));
- _fillTime += 0.375f * Time.deltaTime;
- _canThrust = true;
- _thrustMin = 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement