plant pick menu
This commit is contained in:
parent
73a2fe42ad
commit
32453f2e9d
18 changed files with 121 additions and 39 deletions
15
scripts/gui/plant_pick/seedpacket_generator.gd
Normal file
15
scripts/gui/plant_pick/seedpacket_generator.gd
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
extends Node
|
||||
|
||||
const SEEDPACKET_SCENE := preload("res://scenes/gui/seedpacket.tscn")
|
||||
|
||||
func _ready() -> void:
|
||||
var plants = GameRegistry.load_resources("res://resources/")
|
||||
|
||||
for plant in plants:
|
||||
var seedpacket = SEEDPACKET_SCENE.instantiate()
|
||||
seedpacket.held_resource = plant
|
||||
add_child(seedpacket)
|
||||
|
||||
var handler = PickableHandler.new(seedpacket)
|
||||
seedpacket.set_handler(handler)
|
||||
|
||||
1
scripts/gui/plant_pick/seedpacket_generator.gd.uid
Normal file
1
scripts/gui/plant_pick/seedpacket_generator.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://crlumefuo1biu
|
||||
Loading…
Add table
Add a link
Reference in a new issue