mirror of
https://github.com/Relintai/broken_seals.git
synced 2025-01-22 02:17:18 +01:00
Deactivate / activate the world on teleporting to a dungeon.
This commit is contained in:
parent
5dc0ed2daf
commit
c6ae7518c0
@ -56,6 +56,7 @@ func teleport():
|
|||||||
_dungeon.hide()
|
_dungeon.hide()
|
||||||
|
|
||||||
#turn back on world
|
#turn back on world
|
||||||
|
world.active = true
|
||||||
|
|
||||||
p.get_body().teleport(teleport_to)
|
p.get_body().teleport(teleport_to)
|
||||||
# p.get_body().transform.origin = teleport_to
|
# p.get_body().transform.origin = teleport_to
|
||||||
|
@ -78,6 +78,7 @@ func teleport():
|
|||||||
get_parent().add_child(_dungeon_back_teleporter)
|
get_parent().add_child(_dungeon_back_teleporter)
|
||||||
|
|
||||||
#turn off world
|
#turn off world
|
||||||
|
world.active = false
|
||||||
#turn on dungeon
|
#turn on dungeon
|
||||||
_dungeon.show()
|
_dungeon.show()
|
||||||
|
|
||||||
|
@ -91,6 +91,9 @@ func generate():
|
|||||||
|
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
|
if !active:
|
||||||
|
return
|
||||||
|
|
||||||
if initial_generation:
|
if initial_generation:
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -290,7 +293,8 @@ func spawn(start_x : int, start_z : int) -> void:
|
|||||||
if l > chunk_spawn_range:
|
if l > chunk_spawn_range:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
chunk_create(x, z)
|
if !chunk_get(x, z):
|
||||||
|
chunk_create(x, z)
|
||||||
|
|
||||||
# add_prop(Transform().translated(Vector3(0, 2, 0)), test_prop)
|
# add_prop(Transform().translated(Vector3(0, 2, 0)), test_prop)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user