quantum-space-buddies/QSB/EchoesOfTheEye/Ghosts/Messages/ContactTriggerMessage.cs
2022-05-01 17:03:00 +01:00

21 lines
570 B
C#

using QSB.EchoesOfTheEye.Ghosts.WorldObjects;
using QSB.Messaging;
using QSB.Player;
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
internal class ContactTriggerMessage : QSBWorldObjectMessage<QSBGhostSensors, bool>
{
public ContactTriggerMessage(bool inContact) : base(inContact) { }
public override void OnReceiveRemote()
{
var player = QSBPlayerManager.GetPlayer(From);
if (WorldObject._data.players[player] != null && WorldObject._data.players[player].sensor != null)
{
WorldObject._data.players[player].sensor.inContactWithPlayer = Data;
}
}
}