Change components to use timer component (#2426)
* Change components to use timer component * Fix old usages of tokens
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user