extends Control var active_type: Block.Type = Block.Type.GRASS func _input(event: InputEvent) -> void: if event.is_action_pressed("inventory_bar_slot_1"): _on_texture_rect_pressed() if event.is_action_pressed("inventory_bar_slot_2"): _on_texture_rect_2_pressed() if event.is_action_pressed("inventory_bar_slot_3"): _on_texture_rect_3_pressed() func _on_texture_rect_pressed() -> void: active_type = Block.Type.GRASS func _on_texture_rect_2_pressed() -> void: active_type = Block.Type.STONE func _on_texture_rect_3_pressed() -> void: active_type = Block.Type.ICE