Player owner

This commit is contained in:
Marco 2025-03-06 11:42:45 +01:00
commit 3064a0a5a0
3 changed files with 9 additions and 6 deletions

View file

@ -164,8 +164,11 @@ public partial class GameManager : Node2D
//_player = this.CreateChild<PlayerMovement>(PlayerTemplate, PlayerSpawnMarker.Position );
_player = PlayerTemplate.Instantiate<PlayerFSMProxy>();
this.CallDeferred("add_child", _player);
//this.CallDeferred("add_child", _player);
this.AddChild(_player);
_player.Owner = this;
_player.Transform = this.GlobalTransform;
_player.GlobalPosition = GetStartPosition();