quantum-space-buddies/QSB/EchoesOfTheEye/Ghosts/Messages/ContactTriggerMessage.cs

21 lines
570 B
C#
Raw Normal View History

2022-05-01 16:03:00 +00:00
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;
}
}
}