Skip to content

Commit

Permalink
Engine - ECS: cleanup TreeNode
Browse files Browse the repository at this point in the history
  • Loading branch information
friflo committed Jul 19, 2024
1 parent 06dbf6c commit ce5b014
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Engine/src/ECS/Components/TreeNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@
// ReSharper disable once CheckNamespace
namespace Friflo.Engine.ECS;

// TODO make internal, rename: TreeNodeComponent -> TreeNode
[ComponentKey(null)]
public struct TreeNode : IComponent // todo should be internal
public struct TreeNode : IComponent
{
public int ChildCount => childIds.count;
public override string ToString() => $"ChildCount: {childIds.count}";
public int ChildCount => childIds.count;
public override string ToString() => $"ChildCount: {childIds.count}";

// [Browse(Never)] internal int parentId; // 4 0 if entity has no parent
internal IdArray childIds; // 8
// [Browse(Never)] internal int parentId; // 4 0 if entity has no parent
internal IdArray childIds; // 8

/// same as <see cref="IdArrayExtensions.GetSpan"/>
public ReadOnlySpan<int> GetChildIds(EntityStore store)
Expand Down

0 comments on commit ce5b014

Please sign in to comment.