frame-of-mind/src/dev-util/room_template.gd

52 lines
848 B
GDScript3
Raw Normal View History

class_name RoomTemplate extends Node3D
2024-10-18 16:10:51 +00:00
var initialised: bool = false
var id: State.rooms = State.rooms.NULL
2024-10-18 16:10:51 +00:00
2026-01-12 17:39:34 +00:00
var is_active: bool:
2024-10-18 16:10:51 +00:00
set(value):
2026-01-12 17:39:34 +00:00
is_active = value
if is_active and not initialised:
2024-10-18 16:10:51 +00:00
start_room()
var save_game:SaveGame = null
signal proceed(next_scene_path: String)
func _ready() -> void:
State.room = self
State.current_room = id
2025-12-15 16:57:26 +00:00
func disable()-> void:
2026-01-12 17:39:34 +00:00
is_active = false
2025-12-15 16:57:26 +00:00
set_process_input(false)
set_process(false)
2026-01-05 17:18:48 +00:00
func get_ready():
pass
func load():
# Override this function to load the state of the chapter from State.save_game
pass
func play() -> String:
start_room()
return await proceed
2024-10-18 16:10:51 +00:00
func start_room():
pass
2025-12-13 10:14:10 +00:00
func pull_save_state(_save: SaveGame) -> void:
pass
func save_room():
2025-03-25 21:34:13 +00:00
save_game.save_to_file(get_tree().root.get_texture())
2025-06-03 21:17:29 +00:00
func prepare_transition():
pass
func unload():
pass