disable minimap lighting and wait for vertex-lighting feature

This commit is contained in:
Nitwel 2024-05-29 10:18:31 +02:00
parent 0fee21ccdb
commit f3e2d2e9ff
2 changed files with 10 additions and 14 deletions

View File

@ -10,7 +10,7 @@ const TOUCH_LONG = 400.0
@onready var collision = $CollisionShape3D @onready var collision = $CollisionShape3D
@onready var area = $Area3D/CollisionShape3D2 @onready var area = $Area3D/CollisionShape3D2
@onready var snap_sound = $SnapSound @onready var snap_sound = $SnapSound
@onready var light = $OmniLight3D # @onready var light: OmniLight3D = $OmniLight3D
@onready var label = $Label3D @onready var label = $Label3D
var active = R.state(false) var active = R.state(false)
var disabled = null var disabled = null
@ -19,14 +19,15 @@ var moved_ran = false
var touch_ran = false var touch_ran = false
func _ready(): func _ready():
if entity is Light: # Wait until https://github.com/godotengine/godot/pull/83360 is merged for faster vertex lighting
R.effect(func(_arg): # if entity is Light:
light.light_energy=1 if entity.active.value else 0 # R.effect(func(_arg):
light.light_color=entity.color.value # light.light_energy=1 if entity.active.value else 0
) # light.light_color=entity.color.value
else: # )
remove_child(light) # else:
light.queue_free() # remove_child(light)
# light.queue_free()
R.effect(func(_arg): R.effect(func(_arg):
label.text=entity.icon.value label.text=entity.icon.value

View File

@ -37,8 +37,3 @@ shape = SubResource("SphereShape3D_y1ne8")
[node name="SnapSound" type="AudioStreamPlayer" parent="."] [node name="SnapSound" type="AudioStreamPlayer" parent="."]
stream = ExtResource("3_04fcm") stream = ExtResource("3_04fcm")
volume_db = -20.0 volume_db = -20.0
[node name="OmniLight3D" type="OmniLight3D" parent="."]
layers = 2
light_color = Color(0.537607, 0.0297858, 0.226152, 1)
omni_range = 0.5