diff --git a/Ghost.Entities.Test/ArcEntityTest.cs b/Ghost.Entities.Test/ArcEntityTest.cs index 6107043..eb847b3 100644 --- a/Ghost.Entities.Test/ArcEntityTest.cs +++ b/Ghost.Entities.Test/ArcEntityTest.cs @@ -2,7 +2,6 @@ using Ghost.Test.Core; using Misaki.HighPerformance.Jobs; using Misaki.HighPerformance.LowLevel.Buffer; using Misaki.HighPerformance.Mathematics; -using System; namespace Ghost.Entities.Test; diff --git a/Ghost.Entities/EntityManager.cs b/Ghost.Entities/EntityManager.cs index 26f4d9f..af68cda 100644 --- a/Ghost.Entities/EntityManager.cs +++ b/Ghost.Entities/EntityManager.cs @@ -2,7 +2,6 @@ using Ghost.Core; using Misaki.HighPerformance.LowLevel.Buffer; using Misaki.HighPerformance.LowLevel.Collections; using Misaki.HighPerformance.LowLevel.Utilities; -using System; using System.Diagnostics; namespace Ghost.Entities; diff --git a/Ghost.Entities/World.cs b/Ghost.Entities/World.cs index 36bf077..2f1c19b 100644 --- a/Ghost.Entities/World.cs +++ b/Ghost.Entities/World.cs @@ -2,16 +2,15 @@ using Ghost.Core; using Misaki.HighPerformance.LowLevel.Buffer; using Misaki.HighPerformance.LowLevel.Collections; using System.Runtime.CompilerServices; -using TerraFX.Interop.Windows; namespace Ghost.Entities; public partial class World { - private static List s_worlds = new(4); - private static Queue> s_freeWorldSlots = new(); + private static readonly List s_worlds = new(4); + private static readonly Queue> s_freeWorldSlots = new(); - internal static Identifier EmptyArchetypeID => new Identifier(0); + internal static Identifier EmptyArchetypeID => new (0); public static int WorldCount => s_worlds.Count - s_freeWorldSlots.Count; @@ -43,10 +42,7 @@ public partial class World } var world = s_worlds[id.value]; - if (world is not null) - { - world.Dispose(); - } + world?.Dispose(); } } @@ -72,8 +68,8 @@ public partial class World : IIdentifierType, IDisposable, IEquatable { private readonly Identifier _id; - private EntityManager _entityManager; - private EntityCommandBuffer _entityCommandBuffer; + private readonly EntityManager _entityManager; + private readonly EntityCommandBuffer _entityCommandBuffer; private UnsafeList _archetypes; private UnsafeList _entityQueries; diff --git a/omnisharp.json b/omnisharp.json new file mode 100644 index 0000000..b052e3d --- /dev/null +++ b/omnisharp.json @@ -0,0 +1,6 @@ +{ + "Logging": + { + "LogLevel": "Error" + } +}