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

17 lines
432 B
C#

using QSB.Messaging;
using QSB.WorldSync;
namespace QSB.ModelShip.Messages;
public class CrashModelShipMessage : QSBMessage
{
public CrashModelShipMessage() { }
public override void OnReceiveRemote()
{
var crashBehaviour = QSBWorldSync.GetUnityObject<ModelShipCrashBehavior>();
crashBehaviour._crashEffect.Play();
crashBehaviour.gameObject.GetComponent<OWAudioSource>().PlayOneShot(AudioType.TH_ModelShipCrash);
}
}