beta-1.3/restructure-files (#2)
Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
extends Area2D
|
||||
|
||||
@export var to_alpha := 0.38
|
||||
@export var fade_out_duration := 0.2
|
||||
@export var fade_in_duration := 0.2
|
||||
@export var nodes_to_occlude: Array[Node2D]
|
||||
|
||||
func _on_area_entered(_area: Area2D) -> void:
|
||||
for node in nodes_to_occlude:
|
||||
get_tree().create_tween().tween_property(node, "self_modulate:a", to_alpha, fade_out_duration)
|
||||
|
||||
|
||||
func _on_area_exited(_area: Area2D) -> void:
|
||||
for node in nodes_to_occlude:
|
||||
get_tree().create_tween().tween_property(node, "self_modulate:a", 1.0, fade_in_duration)
|
||||
Reference in New Issue
Block a user