Add food dispensers to shop.

This commit is contained in:
JonShard
2026-08-05 09:46:19 +02:00
parent c7840d3cc7
commit 3646992e35
43 changed files with 629 additions and 453 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
class_name GameManager
extends Node
static var money: int = 100
static var money: int = 1000
static var meals_in_play: Array[String]
static var sides_in_play: Array[String]
+14
View File
@@ -22,6 +22,20 @@ static func find_first_child_of_type(node: Node, type: Variant) -> Node:
return nested
return null
# Returns true if decendant is a decendant node of root, false otherwise. Returns false if either node is null.
static func is_node_decendant_of(decendant: Node, root: Node) -> bool:
if not decendant or not root:
print("Helper.is_node_decendant_of: decendant or root is null")
return false
var current: Node = decendant
while current:
if current == root:
print("Helper.is_node_decendant_of: decendant %s is a descendant of root %s" % [decendant.name, root.name])
return true
current = current.get_parent()
print("Helper.is_node_decendant_of: decendant %s is NOT a descendant of root %s" % [decendant.name, root.name])
return false
# Returns a transform with position snapped to the 0.6 grid and rotation snapped to 90 degrees.
static func get_snapped_transform(node: Node3D) -> Transform3D: