2023-12-15 05:10:23 +08:00
|
|
|
extends Node3D
|
|
|
|
|
|
|
|
@onready var labelVisibleEffects = %LabelVisibleEffects
|
|
|
|
@onready var buttonSmoke = %ButtonSmoke
|
|
|
|
@onready var effectsContainer = %Effects
|
|
|
|
@onready var sideBarMenu = $"CanvasLayer UI/SideBar/SideBar Menu"
|
2023-12-15 22:08:07 +08:00
|
|
|
@onready var camera = %Camera3D
|
2023-12-15 05:10:23 +08:00
|
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
|
|
func _ready():
|
|
|
|
pass # Replace with function body.
|
|
|
|
|
|
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
|
|
func _process(_delta):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
func updateVisibleEffects():
|
|
|
|
var pressedButton = buttonSmoke.button_group.get_pressed_button()
|
|
|
|
var effect = get_node("Effects/" + pressedButton.text.strip_edges())
|
|
|
|
|
|
|
|
for child in effectsContainer.get_children():
|
|
|
|
if child == effect:
|
|
|
|
child.show()
|
|
|
|
else:
|
|
|
|
child.hide()
|
|
|
|
|
|
|
|
labelVisibleEffects.text = "[center]" + pressedButton.text
|
|
|
|
|
|
|
|
|
|
|
|
func toggleSideBar():
|
|
|
|
if sideBarMenu.visible: # Replace with function body.
|
|
|
|
sideBarMenu.hide()
|
|
|
|
else:
|
|
|
|
sideBarMenu.show()
|
|
|
|
|
2023-12-15 22:08:07 +08:00
|
|
|
|
|
|
|
|
|
|
|
func slider_camera_zoom_value_changed(value):
|
|
|
|
camera.size = 10 - value
|