feat: animate tent anchor lights and curtain reverse on hover out
This commit is contained in:
@@ -63,13 +63,21 @@ func _build() -> void:
|
||||
|
||||
func _add_tent_button(texture: Texture2D, center: Vector2, has_lights := false) -> TextureButton:
|
||||
var button := MenuUI.add_image_button(self, texture, center, Vector2(0.36, 0.59))
|
||||
var star_mat := MenuUI.tent_star_material()
|
||||
button.material = star_mat
|
||||
var mat := MenuUI.tent_material(0.0) if has_lights else MenuUI.tent_star_material()
|
||||
button.material = mat
|
||||
button.tooltip_text = "Apri questo percorso"
|
||||
|
||||
# Glow stella su entrambi i tendoni al passaggio del mouse
|
||||
button.mouse_entered.connect(func(): star_mat.set_shader_parameter("hover_strength", 1.0))
|
||||
button.mouse_exited.connect(func(): star_mat.set_shader_parameter("hover_strength", 0.0))
|
||||
button.mouse_entered.connect(func():
|
||||
mat.set_shader_parameter("hover_strength", 1.0)
|
||||
if has_lights:
|
||||
mat.set_shader_parameter("garland_strength", 1.0)
|
||||
)
|
||||
button.mouse_exited.connect(func():
|
||||
mat.set_shader_parameter("hover_strength", 0.0)
|
||||
if has_lights:
|
||||
mat.set_shader_parameter("garland_strength", 0.0)
|
||||
)
|
||||
|
||||
# Animazione apertura sipario e lucine in hover
|
||||
if has_lights:
|
||||
|
||||
Reference in New Issue
Block a user