From 0b14efee60765701f439b5174e56c0cf0639d20c Mon Sep 17 00:00:00 2001 From: Lucas Fryzek Date: Sun, 29 Sep 2024 14:28:57 +0100 Subject: player,bsp_level_generator: Add lockers and interaction --- scripts/locker.gd | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 scripts/locker.gd (limited to 'scripts/locker.gd') diff --git a/scripts/locker.gd b/scripts/locker.gd new file mode 100644 index 0000000..b19d23a --- /dev/null +++ b/scripts/locker.gd @@ -0,0 +1,11 @@ +extends Area3D + +var contents: int = 0 +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + contents = randi_range(0, 20) + +func get_contents() -> int: + var con = contents + contents = 0 + return con -- cgit