Improved component system

This commit is contained in:
2024-02-07 23:04:19 +01:00
parent 97087ad03e
commit c4a9da0880
22 changed files with 263 additions and 188 deletions

View File

@ -41,12 +41,11 @@ func spawn_player(id: String) -> Player:
player.id = id
if id == Global.account_id:
player.controller = PlayerController.new()
player.controller = PlayerController.new(player)
Global.player = player
main_player_spawned.emit(player)
else:
player.controller = ProxyController.new()
player.controller = ProxyController.new(player)
player.controller.character = player
player.add_child(player.controller)
return player