New screens, new hud, new intro menu, some UI element changes
This commit is contained in:
+8
-5
@@ -387,12 +387,15 @@ func _reconcile(delta: float) -> void:
|
||||
if scene != null:
|
||||
_collect(scene, col, hit, bone, anim, wanted)
|
||||
|
||||
# Drop overlays whose shape is gone or no longer wanted.
|
||||
# Drop overlays whose shape is gone or no longer wanted. The overlay is a child of
|
||||
# the collision shape, so it's freed with it — hold it as Variant, since assigning a
|
||||
# freed instance to any *typed* var (even Object) throws before is_instance_valid()
|
||||
# can filter it out.
|
||||
for id: int in _overlays.keys():
|
||||
var mi: MeshInstance3D = _overlays[id]
|
||||
var mi: Variant = _overlays[id]
|
||||
if not wanted.has(id) or not is_instance_valid(mi):
|
||||
if is_instance_valid(mi):
|
||||
mi.queue_free()
|
||||
(mi as Node).queue_free()
|
||||
_overlays.erase(id)
|
||||
# Add overlays for newly seen shapes.
|
||||
for id: int in wanted:
|
||||
@@ -442,9 +445,9 @@ func _attach(cs: CollisionShape3D, is_area: bool) -> MeshInstance3D:
|
||||
|
||||
func _clear_overlays() -> void:
|
||||
for id: int in _overlays:
|
||||
var mi: MeshInstance3D = _overlays[id]
|
||||
var mi: Variant = _overlays[id]
|
||||
if is_instance_valid(mi):
|
||||
mi.queue_free()
|
||||
(mi as Node).queue_free()
|
||||
_overlays.clear()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user