quantum-space-buddies/QSB/ShipSync/Messages/ReactorCountdownMessage.cs
2022-05-14 14:04:49 +01:00

18 lines
426 B
C#

using QSB.Messaging;
using QSB.WorldSync;
namespace QSB.ShipSync.Messages;
internal class ReactorCountdownMessage : QSBMessage<float>
{
public ReactorCountdownMessage(float countdown) : base(countdown) { }
public override void OnReceiveRemote()
{
var reactor = QSBWorldSync.GetUnityObject<ShipReactorComponent>();
reactor._criticalCountdown = Data;
reactor._criticalTimer = Data;
reactor.enabled = true;
}
}