initial commit
This commit is contained in:
commit
79951d8075
22 changed files with 729 additions and 0 deletions
13
gears/gear_pickup.gd
Normal file
13
gears/gear_pickup.gd
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
class_name GearPickup extends Area3D
|
||||
|
||||
@export var one_shot = false
|
||||
|
||||
func _on_body_entered(body):
|
||||
if body is not Player:
|
||||
return
|
||||
var taken = body.equip($Gear)
|
||||
if taken and one_shot:
|
||||
queue_free()
|
||||
|
||||
func _ready():
|
||||
assert($Gear is Gear, "GearPickup instantiated without child Gear!")
|
||||
Loading…
Add table
Add a link
Reference in a new issue