blob: ae97a10785abeae1306506b9a6a1cc7e3318b16f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
class_name Version
## Byte Type: u8
## Byte Length: 1
var major: int
## Byte Type: u8
## Byte Length: 1
var minor: int
func lower_than(compare_major: int, compare_minor: int) -> bool:
if (major > compare_major):
return false
if (major == compare_major):
return minor < compare_minor
return true
func higher_than(compare_major: int, compare_minor: int) -> bool:
if (major > compare_major):
return true
if (major == compare_major):
return minor > compare_minor
return false
func _to_string() -> String:
return "%s.%s" % [major, minor]
|