Proof of concept data disks, pharaoh character
This commit is contained in:
1 parent
f6d6e287f1
commit
5dd4c27430
14 files changed
+188
-6
No files matched your search
+22
@@ -0,0 +1,22 @@
|
||||
extends Interactable
|
||||
|
||||
var disks_wanted = [1, 2, 3, 4, 5]
|
||||
var disks_loaded = []
|
||||
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
func load_disk(disk_num: int) -> bool:
|
||||
if !disk_num or (disk_num in disks_loaded):
|
||||
return false
|
||||
|
||||
disks_loaded.push_back(disk_num)
|
||||
disks_wanted.remove_at(disks_wanted.find(disk_num))
|
||||
return true
|
||||
|
||||
func _on_interacted() -> void:
|
||||
var disk_num = %Player2D.take_disk()
|
||||
if not load_disk(disk_num):
|
||||
return
|
||||
|
||||
print("Loaded up disk ", disk_num)
|
||||
Reference in new issue
Block a user