Base Update() method was removed from components in engine, added some basic ECS systems to update the components. (#79)

This commit is contained in:
Acruid
2018-07-26 14:26:19 -07:00
committed by Pieter-Jan Briers
parent 18ed1041ba
commit 8c874c76dc
12 changed files with 132 additions and 13 deletions

View File

@@ -0,0 +1,22 @@
using SS14.Shared.GameObjects;
using SS14.Shared.GameObjects.System;
namespace Content.Server.GameObjects.EntitySystems
{
class DoorSystem : EntitySystem
{
public override void Initialize()
{
EntityQuery = new TypeEntityQuery(typeof(ServerDoorComponent));
}
public override void Update(float frameTime)
{
foreach (var entity in RelevantEntities)
{
var comp = entity.GetComponent<ServerDoorComponent>();
comp.OnUpdate(frameTime);
}
}
}
}