2020-08-29 06:05:44 -05:00
|
|
|
|
using Content.Server.GameObjects.Components.Power.AME;
|
|
|
|
|
|
using JetBrains.Annotations;
|
2021-02-11 01:13:03 -08:00
|
|
|
|
using Robust.Shared.GameObjects;
|
2020-08-29 06:05:44 -05:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.GameObjects.EntitySystems
|
|
|
|
|
|
{
|
|
|
|
|
|
[UsedImplicitly]
|
|
|
|
|
|
public class AntimatterEngineSystem : EntitySystem
|
|
|
|
|
|
{
|
|
|
|
|
|
private float _accumulatedFrameTime;
|
|
|
|
|
|
|
|
|
|
|
|
public override void Update(float frameTime)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Update(frameTime);
|
|
|
|
|
|
_accumulatedFrameTime += frameTime;
|
|
|
|
|
|
if (_accumulatedFrameTime >= 10)
|
|
|
|
|
|
{
|
2021-02-04 00:20:48 +11:00
|
|
|
|
foreach (var comp in ComponentManager.EntityQuery<AMEControllerComponent>(true))
|
2020-08-29 06:05:44 -05:00
|
|
|
|
{
|
|
|
|
|
|
comp.OnUpdate(frameTime);
|
|
|
|
|
|
}
|
|
|
|
|
|
_accumulatedFrameTime -= 10;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|