plant pick menu
This commit is contained in:
parent
73a2fe42ad
commit
32453f2e9d
18 changed files with 121 additions and 39 deletions
|
|
@ -6,11 +6,11 @@ class_name HotbarHandler
|
|||
|
||||
## Is current state valid for use?
|
||||
|
||||
var valid_state : bool = false
|
||||
var valid_state : bool = true
|
||||
var enough_sun : bool = true
|
||||
|
||||
func _init(seedpacket : Seedpacket) -> void:
|
||||
super._init(seedpacket)
|
||||
func _init(packet : Seedpacket) -> void:
|
||||
super._init(packet)
|
||||
LevelEventBus.state_changed.connect(on_level_state_changed)
|
||||
LevelEventBus.sun_count_updated.connect(on_sun_count_updated)
|
||||
|
||||
|
|
@ -29,4 +29,4 @@ func on_level_state_changed(state : LevelData.LevelStates):
|
|||
|
||||
func on_sun_count_updated(to : float):
|
||||
enough_sun = to >= seedpacket.held_resource.cost
|
||||
seedpacket.update_contents()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue