Add Entity<>.IsEnabled

main
copygirl 2 years ago
parent c575046a61
commit 1dca1e7988
  1. 3
      src/gaemstone.ECS/Entity.cs

@ -76,7 +76,8 @@ public unsafe readonly partial struct Entity<TContext>
public Entity<TContext> ChildOf(Entity parent) public Entity<TContext> ChildOf(Entity parent)
=> Add(FlecsBuiltIn.ChildOf, parent); => Add(FlecsBuiltIn.ChildOf, parent);
public bool IsDisabled => Has(FlecsBuiltIn.Disabled); public bool IsDisabled => Has(FlecsBuiltIn.Disabled);
public bool IsEnabled => !Has(FlecsBuiltIn.Disabled);
public Entity<TContext> Disable() => Add(FlecsBuiltIn.Disabled); public Entity<TContext> Disable() => Add(FlecsBuiltIn.Disabled);
public Entity<TContext> Enable() => Remove(FlecsBuiltIn.Disabled); public Entity<TContext> Enable() => Remove(FlecsBuiltIn.Disabled);

Loading…
Cancel
Save