mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
25 lines
604 B
C#
25 lines
604 B
C#
using System.Diagnostics.CodeAnalysis;
|
|
using JetBrains.Annotations;
|
|
|
|
namespace Robust.Shared.GameObjects;
|
|
|
|
public partial class EntityManager
|
|
{
|
|
[Pure]
|
|
public T System<T>() where T : IEntitySystem
|
|
{
|
|
return _entitySystemManager.GetEntitySystem<T>();
|
|
}
|
|
|
|
[Pure]
|
|
public T? SystemOrNull<T>() where T : IEntitySystem
|
|
{
|
|
return _entitySystemManager.GetEntitySystemOrNull<T>();
|
|
}
|
|
|
|
public bool TrySystem<T>([NotNullWhen(true)] out T? entitySystem) where T : IEntitySystem
|
|
{
|
|
return _entitySystemManager.TryGetEntitySystem(out entitySystem);
|
|
}
|
|
}
|