Base Update() method was removed from components in engine, added some basic ECS systems to update the components. (#79)
This commit is contained in:
committed by
Pieter-Jan Briers
parent
18ed1041ba
commit
8c874c76dc
23
Content.Server/GameObjects/EntitySystems/WelderSystem.cs
Normal file
23
Content.Server/GameObjects/EntitySystems/WelderSystem.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Content.Server.GameObjects.Components.Interactable.Tools;
|
||||
using SS14.Shared.GameObjects;
|
||||
using SS14.Shared.GameObjects.System;
|
||||
|
||||
namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
class WelderSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
EntityQuery = new TypeEntityQuery(typeof(WelderComponent));
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var entity in RelevantEntities)
|
||||
{
|
||||
var comp = entity.GetComponent<WelderComponent>();
|
||||
comp.OnUpdate(frameTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user