Skip to content

Commit

Permalink
Attempt to fix random testing exception
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagomvas committed Jun 10, 2024
1 parent 35f7d32 commit 707dc85
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Basalt/Engine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,23 @@ public bool Running

private Dictionary<Type, ComponentHolder> Components { get; set; } = new();

private EntityManager _entityManager;

/// <summary>
/// The entity manager that holds all the entities.
/// </summary>
public EntityManager EntityManager { get; private set; }
public EntityManager EntityManager
{
get
{
if(_entityManager == null)
{
_entityManager = new();
}
return _entityManager;
}
private set { _entityManager = value; }
}
private ILogger? _logger;

/// <summary>
Expand Down

0 comments on commit 707dc85

Please sign in to comment.