quantum-space-buddies/QSB/ModelShip/Messages/RespawnModelShipMessage.cs

20 lines
503 B
C#
Raw Normal View History

2022-06-08 05:07:39 +00:00
using QSB.Messaging;
using QSB.WorldSync;
namespace QSB.ModelShip.Messages;
2023-07-28 18:30:57 +00:00
public class RespawnModelShipMessage : QSBMessage<bool>
2022-06-08 05:07:39 +00:00
{
public RespawnModelShipMessage(bool playEffects) : base(playEffects) { }
public override void OnReceiveRemote()
{
var flightConsole = QSBWorldSync.GetUnityObject<RemoteFlightConsole>();
2022-08-29 05:21:20 +00:00
flightConsole.RespawnModelShip(Data);
if (Data)
{
flightConsole._modelShipBody.GetComponent<OWAudioSource>().PlayOneShot(AudioType.TH_RetrieveModelShip);
}
}
2022-06-08 05:07:39 +00:00
}