AirControl  1.3.0
Open Source, Modular, and Extensible Flight Simulator For Deep Learning Research
AirControl.AC_Airplane_FuelGauge Class Reference

Monitor and updates the Fuel level to UI More...

Inheritance diagram for AirControl.AC_Airplane_FuelGauge:
Collaboration diagram for AirControl.AC_Airplane_FuelGauge:

Public Member Functions

void HandleAirplaneUI ()
 Updates to UI More...
 

Public Attributes

RectTransform pointer
 
Vector2 minMaxRotation = new Vector2(-90f, 90f)
 

Detailed Description

Monitor and updates the Fuel level to UI

Definition at line 10 of file AC_Airplane_FuelGauge.cs.

Member Function Documentation

◆ HandleAirplaneUI()

void AirControl.AC_Airplane_FuelGauge.HandleAirplaneUI ( )
inline

Updates to UI

Implements AirControl.IAirplaneUI.

Definition at line 30 of file AC_Airplane_FuelGauge.cs.

31  {
32  if(fuel && pointer)
33  {
34  float wantedRotation = Mathf.Lerp(minMaxRotation.x, minMaxRotation.y, fuel.NormalizedFuel);
35  pointer.rotation = Quaternion.Euler(0f, 0f, -wantedRotation);
36  }
37  }

The documentation for this class was generated from the following file: