mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-10 15:53:19 +00:00
21 lines
651 B
C#
21 lines
651 B
C#
|
using QSB.EchoesOfTheEye.Ghosts.WorldObjects;
|
|||
|
using QSB.Messaging;
|
|||
|
using QSB.WorldSync;
|
|||
|
|
|||
|
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
|||
|
|
|||
|
internal class ChangeNodeMapMessage : QSBWorldObjectMessage<QSBGhostController, int>
|
|||
|
{
|
|||
|
public ChangeNodeMapMessage(int nodeMapIndex) : base(nodeMapIndex) { }
|
|||
|
|
|||
|
public override void OnReceiveRemote()
|
|||
|
{
|
|||
|
var nodeMap = Data.GetWorldObject<QSBGhostNodeMap>().AttachedObject;
|
|||
|
|
|||
|
WorldObject.AttachedObject._nodeMap = nodeMap;
|
|||
|
WorldObject.AttachedObject.transform.parent = nodeMap.transform;
|
|||
|
WorldObject.AttachedObject._nodeRoot = nodeMap.transform;
|
|||
|
WorldObject.AttachedObject.OnNodeMapChanged.Invoke();
|
|||
|
}
|
|||
|
}
|