1 using System.Collections;
2 using System.Collections.Generic;
13 [Header(
"Fuel Guage Properties")]
16 public RectTransform pointer;
17 public Vector2 minMaxRotation =
new Vector2(-90f, 90f);
20 #region Builtin methods
22 fuel = GameObject.Find(CommonFunctions.ActiveAirplane).GetComponent<
AC_Airplane_Fuel>();
26 #region Custom Methods
34 float wantedRotation = Mathf.Lerp(minMaxRotation.x, minMaxRotation.y, fuel.NormalizedFuel);
35 pointer.rotation = Quaternion.Euler(0f, 0f, -wantedRotation);