Added survivor detection of entering the elevator.
This commit is contained in:
parent
d914608980
commit
ecd79e66e3
2 changed files with 11 additions and 2 deletions
|
|
@ -12,6 +12,7 @@ func _physics_process(delta):
|
||||||
velocity.z -= speed * delta
|
velocity.z -= speed * delta
|
||||||
move_and_slide()
|
move_and_slide()
|
||||||
|
|
||||||
|
|
||||||
func _on_area_3d_area_entered(area: Area3D) -> void:
|
func _on_area_3d_area_entered(area: Area3D) -> void:
|
||||||
pass # Replace with function body.
|
var safety = %ElevatorSafeZone
|
||||||
|
if area == safety:
|
||||||
|
print("Safe!")
|
||||||
|
|
|
||||||
|
|
@ -18,3 +18,11 @@ billboard = 1
|
||||||
double_sided = false
|
double_sided = false
|
||||||
texture_filter = 0
|
texture_filter = 0
|
||||||
texture = ExtResource("1_dvhww")
|
texture = ExtResource("1_dvhww")
|
||||||
|
|
||||||
|
[node name="Area3D" type="Area3D" parent="." unique_id=1121777394]
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D" unique_id=1505010263]
|
||||||
|
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0)
|
||||||
|
shape = SubResource("CapsuleShape3D_q7pxf")
|
||||||
|
|
||||||
|
[connection signal="area_entered" from="Area3D" to="." method="_on_area_3d_area_entered"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue