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

20 lines
503 B
C#
Raw Normal View History

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