Attempt2/src/Interactables/LevelTransition.gd
2025-03-30 12:01:46 -07:00

20 lines
672 B
GDScript3

class_name LevelTransition
extends Interactable
## Things like 'door_right', 'stairs'
## helps the Player object pick an appropriate animation
export var _transition_type := 'door_right'
export var _destination_level_name: String
export var _destination_position_name := 'PlayerStart'
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
func trigger_interaction():
# This is something that should maybe be extended for every differant interactible.
# They could inherit from this base class and implement this function.
print("Okay, I'll transition the level now!")
LevelInfo.change_level(_destination_level_name, _destination_position_name)