otherworldly_simulation/scene/class/door.gd
2024-11-01 23:23:07 +08:00

25 lines
383 B
GDScript

extends EInteractionItem
class_name Door
@export var map_id:String
@export var map_born_pos:int=0
func E_pressed():
if Global.main_scene!=null and is_instance_valid(Global.main_scene):
Global.main_scene.change_map(map_id,map_born_pos)
pass
func _on_highlight():
$Sprite2D2.modulate=Color.GREEN
pass
func _exit_highlight():
$Sprite2D2.modulate=Color.WHITE
pass