mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-26 09:35:26 +00:00
28 lines
855 B
C#
28 lines
855 B
C#
|
using QSB.EchoesOfTheEye.Ghosts.WorldObjects;
|
|||
|
using QSB.Messaging;
|
|||
|
using QSB.Utility;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
|||
|
|
|||
|
internal class MoveToLocalPositionMessage : QSBWorldObjectMessage<QSBGhostController, (Vector3 localPosition, float speed, float acceleration)>
|
|||
|
{
|
|||
|
public MoveToLocalPositionMessage(Vector3 localPos, float speed, float accel) : base((localPos, speed, accel)) { }
|
|||
|
|
|||
|
public override void OnReceiveRemote()
|
|||
|
{
|
|||
|
if (QSBCore.IsHost)
|
|||
|
{
|
|||
|
DebugLog.ToConsole("Error - Received MoveToLocalPosition on host. Something has gone horribly wrong!", OWML.Common.MessageType.Error);
|
|||
|
return;
|
|||
|
}
|
|||
|
|
|||
|
WorldObject.MoveToLocalPosition(Data.localPosition, Data.speed, Data.acceleration, true);
|
|||
|
}
|
|||
|
}
|