mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2024-12-29 12:21:25 +00:00
20 lines
503 B
C#
20 lines
503 B
C#
using QSB.Messaging;
|
|
using QSB.WorldSync;
|
|
|
|
namespace QSB.ModelShip.Messages;
|
|
|
|
public class RespawnModelShipMessage : QSBMessage<bool>
|
|
{
|
|
public RespawnModelShipMessage(bool playEffects) : base(playEffects) { }
|
|
|
|
public override void OnReceiveRemote()
|
|
{
|
|
var flightConsole = QSBWorldSync.GetUnityObject<RemoteFlightConsole>();
|
|
flightConsole.RespawnModelShip(Data);
|
|
if (Data)
|
|
{
|
|
flightConsole._modelShipBody.GetComponent<OWAudioSource>().PlayOneShot(AudioType.TH_RetrieveModelShip);
|
|
}
|
|
}
|
|
}
|