Files
OldThink/Content.Client/GameObjects/EntitySystems/InstrumentSystem.cs

30 lines
815 B
C#
Raw Normal View History

2020-05-20 17:13:49 +02:00
using Content.Client.GameObjects.Components.Instruments;
2020-05-29 22:50:41 +02:00
using JetBrains.Annotations;
2020-05-18 13:29:31 +02:00
using Robust.Shared.GameObjects.Systems;
2020-05-29 22:50:41 +02:00
using Robust.Shared.Interfaces.Timing;
using Robust.Shared.IoC;
2020-05-18 13:29:31 +02:00
2020-05-20 17:13:49 +02:00
namespace Content.Client.GameObjects.EntitySystems
2020-05-18 13:29:31 +02:00
{
2020-05-29 22:50:41 +02:00
[UsedImplicitly]
2020-05-18 13:29:31 +02:00
public class InstrumentSystem : EntitySystem
{
2020-06-08 14:44:11 +02:00
[Dependency] private readonly IGameTiming _gameTiming = default;
2020-05-29 22:50:41 +02:00
2020-05-18 13:29:31 +02:00
public override void Update(float frameTime)
{
base.Update(frameTime);
2020-05-29 22:50:41 +02:00
if (!_gameTiming.IsFirstTimePredicted)
{
return;
}
foreach (var instrumentComponent in EntityManager.ComponentManager.EntityQuery<InstrumentComponent>())
2020-05-18 13:29:31 +02:00
{
instrumentComponent.Update(frameTime);
2020-05-18 13:29:31 +02:00
}
}
}
}