quantum-space-buddies/QSB/MeteorSync/Messages/MeteorLaunchMessage.cs

19 lines
535 B
C#
Raw Normal View History

2022-03-10 19:17:06 -08:00
using QSB.Messaging;
2021-12-23 01:24:57 -08:00
using QSB.MeteorSync.WorldObjects;
2022-03-10 19:17:06 -08:00
using QSB.WorldSync;
2021-11-11 02:08:03 -08:00
2022-03-02 19:46:33 -08:00
namespace QSB.MeteorSync.Messages;
2021-12-23 01:24:57 -08:00
2022-03-10 19:17:06 -08:00
public class MeteorLaunchMessage : QSBWorldObjectMessage<QSBMeteorLauncher, (int MeteorId, float LaunchSpeed)>
2022-03-02 19:46:33 -08:00
{
2022-03-10 19:17:06 -08:00
public MeteorLaunchMessage(MeteorController meteor, float launchSpeed) : base((
meteor.GetWorldObject<QSBMeteor>().ObjectId,
launchSpeed
)) { }
2021-12-23 01:50:09 -08:00
2022-03-10 19:17:06 -08:00
public override void OnReceiveRemote() => WorldObject.LaunchMeteor(
Data.MeteorId.GetWorldObject<QSBMeteor>().AttachedObject,
Data.LaunchSpeed
);
}