Files
tbd-station-14/Content.Server/AME/AntimatterEngineSystem.cs
2021-09-28 13:35:29 +02:00

28 lines
722 B
C#

using Content.Server.AME.Components;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.AME
{
[UsedImplicitly]
public class AntimatterEngineSystem : EntitySystem
{
private float _accumulatedFrameTime;
public override void Update(float frameTime)
{
base.Update(frameTime);
_accumulatedFrameTime += frameTime;
if (_accumulatedFrameTime >= 10)
{
foreach (var comp in EntityManager.EntityQuery<AMEControllerComponent>(true))
{
comp.OnUpdate(frameTime);
}
_accumulatedFrameTime -= 10;
}
}
}
}