quantum-space-buddies/QSB/MeteorSync/Messages/MeteorLaunchMessage.cs
2022-03-10 19:17:06 -08:00

19 lines
535 B
C#

using QSB.Messaging;
using QSB.MeteorSync.WorldObjects;
using QSB.WorldSync;
namespace QSB.MeteorSync.Messages;
public class MeteorLaunchMessage : QSBWorldObjectMessage<QSBMeteorLauncher, (int MeteorId, float LaunchSpeed)>
{
public MeteorLaunchMessage(MeteorController meteor, float launchSpeed) : base((
meteor.GetWorldObject<QSBMeteor>().ObjectId,
launchSpeed
)) { }
public override void OnReceiveRemote() => WorldObject.LaunchMeteor(
Data.MeteorId.GetWorldObject<QSBMeteor>().AttachedObject,
Data.LaunchSpeed
);
}