test-client-godot/portail.gd

11 lines
342 B
GDScript3
Raw Permalink Normal View History

extends Spatial
export( NodePath ) var scene_path = ""
export( NodePath ) var start_position_path = "start_position"
func _on_area_body_shape_entered(body_id, body, body_shape, area_shape):
if body == character and not scene_path == "":
global.change_level( "game", scene_path, null, global.current_map, start_position_path )