godot-plateformer/_shared/room_entrance.gd

10 lines
272 B
GDScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@tool
class_name RoomEntrance extends Area2D
@export var restart_node: Node2D
##如果没有手动绑定Start节点则自动绑定到Room的default
func init_room_entrance(room: CameraRoom) -> void:
if restart_node == null:
restart_node = room.default_start_point