Add objectives listing and all four data disks/tablets.
Track each individual disk and ensure they are loaded in order. Player can collect multiple disks in one run but must present them to the pharaoh in order.
This commit is contained in:
1 parent
fa9ec1e5cd
commit
1aa29a0539
7 files changed
+73
-14
No files matched your search
+20
-6
@@ -19,6 +19,7 @@ var death_threshold = 1000
|
||||
var coins = 0
|
||||
|
||||
var data_disks = []
|
||||
var objectives = {}
|
||||
|
||||
func _ready() -> void:
|
||||
DisplayServer.window_set_title("JUMPS EQUALS JUMPS")
|
||||
@@ -43,12 +44,25 @@ func refresh_jump(new_jumps):
|
||||
func give_disk(disk_num: int) -> void:
|
||||
data_disks.push_back(disk_num)
|
||||
|
||||
func take_disk() -> int:
|
||||
var disk_num = data_disks.pop_back()
|
||||
if disk_num:
|
||||
return disk_num
|
||||
return 0
|
||||
|
||||
func take_disk(disk_num) -> bool:
|
||||
if not has_disk(disk_num):
|
||||
return false
|
||||
|
||||
data_disks.remove_at(data_disks.find(disk_num))
|
||||
return true
|
||||
|
||||
func has_disk(disk_num: int) -> bool:
|
||||
return disk_num in data_disks
|
||||
|
||||
func give_objective(id: String, description: String) -> void:
|
||||
objectives[id] = description
|
||||
|
||||
func has_objective(id: String) -> bool:
|
||||
return objectives.has(id)
|
||||
|
||||
func complete_objective(id: String) -> bool:
|
||||
return objectives.erase(id)
|
||||
|
||||
func on_teleport():
|
||||
refresh_jump(1)
|
||||
teleport_cooldown = 1
|
||||
|
||||
Reference in new issue
Block a user