mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-18 13:23:05 +00:00
new lines between methods
This commit is contained in:
parent
b3f0a6ba30
commit
71cba8cca3
@ -13,6 +13,7 @@ namespace QSB.Anglerfish.Events
|
||||
public override EventType Type => EventType.AnglerChangeState;
|
||||
public override void SetupListener() => GlobalMessenger<QSBAngler>.AddListener(EventNames.QSBAnglerChangeState, Handler);
|
||||
public override void CloseListener() => GlobalMessenger<QSBAngler>.RemoveListener(EventNames.QSBAnglerChangeState, Handler);
|
||||
|
||||
private void Handler(QSBAngler qsbAngler) =>
|
||||
SendEvent(new AnglerChangeStateMessage
|
||||
{
|
||||
@ -24,6 +25,7 @@ namespace QSB.Anglerfish.Events
|
||||
|
||||
public override void OnReceiveLocal(bool isHost, AnglerChangeStateMessage message) => OnReceive(isHost, message);
|
||||
public override void OnReceiveRemote(bool isHost, AnglerChangeStateMessage message) => OnReceive(isHost, message);
|
||||
|
||||
private static void OnReceive(bool isHost, AnglerChangeStateMessage message)
|
||||
{
|
||||
var qsbAngler = QSBWorldSync.GetWorldFromId<QSBAngler>(message.ObjectId);
|
||||
@ -51,6 +53,7 @@ namespace QSB.Anglerfish.Events
|
||||
}
|
||||
return QSBPlayerManager.LocalPlayerId;
|
||||
}
|
||||
|
||||
private static Transform IdToTarget(uint id)
|
||||
{
|
||||
if (id == uint.MaxValue)
|
||||
|
@ -15,6 +15,7 @@ namespace QSB.Anglerfish.Events
|
||||
targetId = reader.ReadUInt32();
|
||||
localDisturbancePos = reader.ReadVector3();
|
||||
}
|
||||
|
||||
public override void Serialize(QNetworkWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
@ -14,11 +14,13 @@ namespace QSB.Anglerfish.TransformSync
|
||||
|
||||
private QSBAngler _qsbAngler;
|
||||
private static readonly List<AnglerTransformSync> _instances = new List<AnglerTransformSync>();
|
||||
|
||||
public override void Start()
|
||||
{
|
||||
_instances.Add(this);
|
||||
base.Start();
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
_instances.Remove(this);
|
||||
|
@ -54,6 +54,7 @@ namespace QSB.Anglerfish.WorldObjects
|
||||
public Transform targetTransform;
|
||||
public Vector3 TargetVelocity { get; private set; }
|
||||
private Vector3 _lastTargetPosition;
|
||||
|
||||
public void FixedUpdate()
|
||||
{
|
||||
if (targetTransform == null)
|
||||
|
Loading…
x
Reference in New Issue
Block a user