diff --git a/DungeonShooting_Godot/src/framework/map/DungeonTile.cs b/DungeonShooting_Godot/src/framework/map/DungeonTile.cs index 270af72..1ff05b9 100644 --- a/DungeonShooting_Godot/src/framework/map/DungeonTile.cs +++ b/DungeonShooting_Godot/src/framework/map/DungeonTile.cs @@ -105,7 +105,8 @@ { activityMark.GetParent().RemoveChild(activityMark); var pos = activityMark.GlobalPosition - offset; - _tileRoot.AddChild(activityMark); + activityMark.Owner = null; + //_tileRoot.AddChild(activityMark); activityMark.Position = roomInfo.GetWorldPosition() + pos; activityMark.TileRoot = _tileRoot; } diff --git a/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs b/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs index 47c852e..4eb45d0 100644 --- a/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs +++ b/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs @@ -206,6 +206,11 @@ /// public void SetActive(bool flag) { + // SetProcess(flag); + // SetPhysicsProcess(flag); + // SetProcessInput(flag); + // Visible = flag; + var parent = GetParent(); if (flag) { @@ -218,12 +223,14 @@ parent.RemoveChild(this); TileRoot.AddChild(this); } + Owner = TileRoot; } else { if (parent != null) { parent.RemoveChild(this); + Owner = null; } } }