Files
mmo/scenes/player/init.gd
Marek Lenczewski f1d34ebf1d update
2026-04-04 00:00:15 +02:00

13 lines
363 B
GDScript

extends CharacterBody3D
@export var stats: PlayerStats
func _ready() -> void:
add_to_group("player")
PlayerData.init_from_resource(stats)
if PlayerData.returning_from_dungeon:
global_position = PlayerData.portal_position + Vector3(0, 1, -5)
PlayerData.returning_from_dungeon = false
elif PlayerData.dungeon_cleared:
PlayerData.clear_cache()