update
This commit is contained in:
12
scenes/player/init.gd
Normal file
12
scenes/player/init.gd
Normal file
@@ -0,0 +1,12 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user