quantum-space-buddies/QSB/ShipSync/Messages/ReactorCountdownMessage.cs

18 lines
424 B
C#
Raw Normal View History

2022-05-14 13:04:49 +00:00
using QSB.Messaging;
using QSB.WorldSync;
namespace QSB.ShipSync.Messages;
2023-07-28 18:30:57 +00:00
public class ReactorCountdownMessage : QSBMessage<float>
2022-05-14 13:04:49 +00:00
{
public ReactorCountdownMessage(float countdown) : base(countdown) { }
public override void OnReceiveRemote()
{
var reactor = QSBWorldSync.GetUnityObject<ShipReactorComponent>();
reactor._criticalCountdown = Data;
reactor._criticalTimer = Data;
reactor.enabled = true;
}
}