Adds several skybox scenes to addon
This commit is contained in:
parent
a4f409f877
commit
b2e3a3957b
74 changed files with 99840 additions and 23 deletions
|
|
@ -7,6 +7,7 @@ var mesh_instances: Array[MeshInstance3D] = []
|
|||
var original_materials: Array[Material] = []
|
||||
var outline_material: Material
|
||||
var is_invisible: bool = false
|
||||
var interact_range: bool = false
|
||||
var fade_tween: Tween
|
||||
|
||||
@onready var area: Area3D = $InteractRange
|
||||
|
|
@ -74,7 +75,7 @@ func fade_out_tree_simple(duration: float = 0.25):
|
|||
last_blocked.stop()
|
||||
last_blocked.start()
|
||||
|
||||
if is_invisible:
|
||||
if is_invisible or interact_range:
|
||||
return
|
||||
|
||||
is_invisible = true
|
||||
|
|
@ -161,13 +162,14 @@ func toggle_tree_visibility(duration: float = 1.0):
|
|||
func _on_player_entered(body: Node3D):
|
||||
if body.is_in_group("player"):
|
||||
# Apply outline to all mesh instances
|
||||
interact_range = true
|
||||
if not is_invisible:
|
||||
for mesh in mesh_instances:
|
||||
mesh.material_overlay = outline_material
|
||||
|
||||
func _on_player_exited(body: Node3D):
|
||||
if body.is_in_group("player"):
|
||||
Log.pr('Out of range...')
|
||||
interact_range = false
|
||||
# Remove outline from all mesh instances
|
||||
if not is_invisible:
|
||||
# Reset the material overlay to null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue