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
@@ -96,7 +96,7 @@ namespace Content.Server.GameObjects
|
||||
}
|
||||
|
||||
private const float AUTO_CLOSE_DELAY = 5;
|
||||
public override void Update(float frameTime)
|
||||
public void OnUpdate(float frameTime)
|
||||
{
|
||||
if (!Opened)
|
||||
{
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace Content.Server.GameObjects.Components.Interactable.Tools
|
||||
}
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
public void OnUpdate(float frameTime)
|
||||
{
|
||||
if (!Activated)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Content.Shared.GameObjects.Components.Power;
|
||||
using Content.Shared.GameObjects.Components.Power;
|
||||
using SS14.Server.GameObjects;
|
||||
using SS14.Shared.GameObjects;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Content.Server.GameObjects.Components.Power
|
||||
Appearance = Owner.GetComponent<AppearanceComponent>();
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
public void OnUpdate()
|
||||
{
|
||||
var newState = CalcChargeState();
|
||||
if (newState != LastChargeState)
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Content.Server.GameObjects.Components.Power
|
||||
Appearance = Owner.GetComponent<AppearanceComponent>();
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
public void OnUpdate()
|
||||
{
|
||||
var newLevel = CalcChargeLevel();
|
||||
if (newLevel != LastChargeLevel)
|
||||
|
||||
@@ -45,10 +45,8 @@ namespace Content.Server.GameObjects
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Update(float frameTime)
|
||||
public void OnUpdate(float frameTime)
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
int fireDamage = (int)Math.Floor(Math.Max(0, CurrentTemperature - _fireDamageThreshold) / _fireDamageCoefficient);
|
||||
|
||||
_secondsSinceLastDamageUpdate += frameTime;
|
||||
|
||||
Reference in New Issue
Block a user