fixed killzone bug
This commit is contained in:
parent
d65e88fffc
commit
1c3d21abec
1 changed files with 11 additions and 1 deletions
|
|
@ -113,7 +113,7 @@ func _process(delta):
|
||||||
fail_room()
|
fail_room()
|
||||||
gui.show_lose_screen("Fell out of world", 2)
|
gui.show_lose_screen("Fell out of world", 2)
|
||||||
|
|
||||||
|
check_player_killzone()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -193,6 +193,16 @@ func _player_area_entered(area : Area3D):
|
||||||
fail_room()
|
fail_room()
|
||||||
gui.show_lose_screen("Touched a reset block", 2)
|
gui.show_lose_screen("Touched a reset block", 2)
|
||||||
|
|
||||||
|
func check_player_killzone():
|
||||||
|
var hitbox : Area3D = player.area
|
||||||
|
if(hitbox.get_overlapping_areas().size() > 0):
|
||||||
|
for area in hitbox.get_overlapping_areas():
|
||||||
|
if "kill" in area:
|
||||||
|
if not player.collider.disabled:
|
||||||
|
if(room_started):
|
||||||
|
fail_room()
|
||||||
|
gui.show_lose_screen("Touched a reset block", 2)
|
||||||
|
|
||||||
func pause():
|
func pause():
|
||||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||||
gui.open_pause()
|
gui.open_pause()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue