Skip to content
This repository was archived by the owner on Nov 5, 2023. It is now read-only.

Commit

Permalink
VehicleInfo: Quick update on method names
Browse files Browse the repository at this point in the history
  • Loading branch information
CodedOre committed Jun 11, 2021
1 parent 4aba5be commit c0e81d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/hud/VehicleInfo.gd
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const MAX_NEEDLE_DEGREE : int = 125

# -- Properties --

var DisplayedVehicle : Vehicle setget set_debug_vehicle, get_debug_vehicle
var DisplayedVehicle : Vehicle setget set_displayed_vehicle, get_displayed_vehicle

# -- Variables --

Expand Down Expand Up @@ -78,13 +78,13 @@ func _physics_process(_delta):
_turn_right_icon.texture = TURN_RIGHT_OFF_TEXTURE

# - DisplayedVehicle property -
func set_debug_vehicle(object : Vehicle) -> void:
func set_displayed_vehicle(object : Vehicle) -> void:
_displayed_vehicle = object
# Set MaxRPM range
var vehicle_max_rpm : float = float(_displayed_vehicle.MaxEngineRPM)
var max_rpm_ratio : float = (vehicle_max_rpm / float(MAX_DISPLAYED_RPM))
var rpm_range_val : int = int(abs(1 - max_rpm_ratio) * 100) + 10
_rpm_range.value = rpm_range_val

func get_debug_vehicle() -> Vehicle:
func get_displayed_vehicle() -> Vehicle:
return _displayed_vehicle

0 comments on commit c0e81d3

Please sign in to comment.