Change components to use timer component (#2426)

* Change components to use timer component

* Fix old usages of tokens
This commit is contained in:
DrSmugleaf
2020-10-30 05:02:49 +01:00
committed by GitHub
parent c86c378198
commit 37e97ca89f
24 changed files with 59 additions and 35 deletions

View File

@@ -7,6 +7,7 @@ using Robust.Client.Interfaces.Graphics;
using Robust.Client.Interfaces.Graphics.Overlays;
using Robust.Client.Player;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components.Timers;
using Robust.Shared.Interfaces.Timing;
using Robust.Shared.IoC;
using Robust.Shared.Maths;
@@ -83,7 +84,7 @@ namespace Content.Client.GameObjects.Components.Weapons
}
_cancelToken = new CancellationTokenSource();
Timer.Spawn((int) duration * 1000, DisableOverlay, _cancelToken.Token);
Owner.SpawnTimer((int) duration * 1000, DisableOverlay, _cancelToken.Token);
}
private void DisableOverlay()