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

18 lines
426 B
C#
Raw Normal View History

2022-05-14 13:04:49 +00:00
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;
}
}