Implement production vertical slice foundation
This commit is contained in:
1 parent
9d4a89f355
commit
a18e82eb44
104 files changed
+10595
-268
No files matched your search
@@ -0,0 +1,22 @@
|
||||
class_name OxygenSnapshot
|
||||
extends RefCounted
|
||||
|
||||
var remaining_l: float
|
||||
var maximum_l: float
|
||||
var ratio: float
|
||||
var consumption_l_per_min: float
|
||||
var endurance_minutes: float
|
||||
|
||||
|
||||
func _init(
|
||||
p_remaining_l: float,
|
||||
p_maximum_l: float,
|
||||
p_consumption_l_per_min: float
|
||||
) -> void:
|
||||
remaining_l = p_remaining_l
|
||||
maximum_l = p_maximum_l
|
||||
ratio = remaining_l / maximum_l if maximum_l > 0.0 else 0.0
|
||||
consumption_l_per_min = p_consumption_l_per_min
|
||||
endurance_minutes = (
|
||||
remaining_l / consumption_l_per_min if consumption_l_per_min > 0.0 else INF
|
||||
)
|
||||
Reference in new issue
Block a user