19 lines
277 B
GDScript
19 lines
277 B
GDScript
class_name DiveAlertLevel
|
|
extends RefCounted
|
|
|
|
enum Value {
|
|
NORMAL,
|
|
ATTENTION,
|
|
RETURN,
|
|
CRITICAL,
|
|
FAILURE,
|
|
}
|
|
|
|
|
|
static func highest(levels: Array[Value]) -> Value:
|
|
var result := Value.NORMAL
|
|
for level: Value in levels:
|
|
if level > result:
|
|
result = level
|
|
return result
|