quantum-space-buddies/QSB/ShipSync/Messages/ReactorCountdownMessage.cs
2023-07-28 19:30:57 +01:00

18 lines
424 B
C#

using QSB.Messaging;
using QSB.WorldSync;
namespace QSB.ShipSync.Messages;
public 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;
}
}