2021-06-09 22:19:39 +02:00
|
|
|
|
using Content.Server.AME.Components;
|
2020-08-29 06:05:44 -05:00
|
|
|
|
using JetBrains.Annotations;
|
2021-02-11 01:13:03 -08:00
|
|
|
|
using Robust.Shared.GameObjects;
|
2020-08-29 06:05:44 -05:00
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
|
namespace Content.Server.AME
|
2020-08-29 06:05:44 -05:00
|
|
|
|
{
|
|
|
|
|
|
[UsedImplicitly]
|
|
|
|
|
|
public class AntimatterEngineSystem : EntitySystem
|
|
|
|
|
|
{
|
|
|
|
|
|
private float _accumulatedFrameTime;
|
|
|
|
|
|
|
|
|
|
|
|
public override void Update(float frameTime)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Update(frameTime);
|
|
|
|
|
|
_accumulatedFrameTime += frameTime;
|
|
|
|
|
|
if (_accumulatedFrameTime >= 10)
|
|
|
|
|
|
{
|
2021-10-18 14:58:34 +02:00
|
|
|
|
foreach (var comp in EntityManager.EntityQuery<AMEControllerComponent>())
|
2020-08-29 06:05:44 -05:00
|
|
|
|
{
|
|
|
|
|
|
comp.OnUpdate(frameTime);
|
|
|
|
|
|
}
|
|
|
|
|
|
_accumulatedFrameTime -= 10;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|