24 lines
580 B
GDScript
24 lines
580 B
GDScript
class_name DiveAlertState
|
|
extends RefCounted
|
|
|
|
const DiveAlertLevel = preload("res://game/domain/dive/dive_alert_level.gd")
|
|
|
|
var oxygen: DiveAlertLevel.Value
|
|
var battery: DiveAlertLevel.Value
|
|
var hull: DiveAlertLevel.Value
|
|
var depth: DiveAlertLevel.Value
|
|
var maximum: DiveAlertLevel.Value
|
|
|
|
|
|
func _init(
|
|
p_oxygen: DiveAlertLevel.Value,
|
|
p_battery: DiveAlertLevel.Value,
|
|
p_hull: DiveAlertLevel.Value,
|
|
p_depth: DiveAlertLevel.Value
|
|
) -> void:
|
|
oxygen = p_oxygen
|
|
battery = p_battery
|
|
hull = p_hull
|
|
depth = p_depth
|
|
maximum = DiveAlertLevel.highest([oxygen, battery, hull, depth])
|