plant pick menu
This commit is contained in:
parent
73a2fe42ad
commit
32453f2e9d
18 changed files with 121 additions and 39 deletions
|
|
@ -5,6 +5,18 @@ class_name LevelData
|
|||
static var state : LevelStates = LevelStates.NotInGame
|
||||
static var sun_count : float
|
||||
|
||||
var hotbar_seedpackets : Array[SeedpacketResource]
|
||||
|
||||
func _ready() -> void:
|
||||
LevelEventBus.packet_selected.connect(on_seedpacket_clicked)
|
||||
|
||||
func on_seedpacket_clicked(seedpacket : SeedpacketResource):
|
||||
if hotbar_seedpackets.has(seedpacket):
|
||||
hotbar_seedpackets.erase(seedpacket)
|
||||
else:
|
||||
hotbar_seedpackets.append(seedpacket)
|
||||
LevelEventBus.hotbar_packets_update.emit(hotbar_seedpackets)
|
||||
|
||||
## Possible states of level
|
||||
enum LevelStates {
|
||||
## The game is during plant pick stage
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue