new lines between methods

This commit is contained in:
JohnCorby 2021-11-10 01:20:16 -08:00
parent b3f0a6ba30
commit 71cba8cca3
4 changed files with 7 additions and 0 deletions

View File

@ -13,6 +13,7 @@ namespace QSB.Anglerfish.Events
public override EventType Type => EventType.AnglerChangeState; public override EventType Type => EventType.AnglerChangeState;
public override void SetupListener() => GlobalMessenger<QSBAngler>.AddListener(EventNames.QSBAnglerChangeState, Handler); public override void SetupListener() => GlobalMessenger<QSBAngler>.AddListener(EventNames.QSBAnglerChangeState, Handler);
public override void CloseListener() => GlobalMessenger<QSBAngler>.RemoveListener(EventNames.QSBAnglerChangeState, Handler); public override void CloseListener() => GlobalMessenger<QSBAngler>.RemoveListener(EventNames.QSBAnglerChangeState, Handler);
private void Handler(QSBAngler qsbAngler) => private void Handler(QSBAngler qsbAngler) =>
SendEvent(new AnglerChangeStateMessage 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 OnReceiveLocal(bool isHost, AnglerChangeStateMessage message) => OnReceive(isHost, message);
public override void OnReceiveRemote(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) private static void OnReceive(bool isHost, AnglerChangeStateMessage message)
{ {
var qsbAngler = QSBWorldSync.GetWorldFromId<QSBAngler>(message.ObjectId); var qsbAngler = QSBWorldSync.GetWorldFromId<QSBAngler>(message.ObjectId);
@ -51,6 +53,7 @@ namespace QSB.Anglerfish.Events
} }
return QSBPlayerManager.LocalPlayerId; return QSBPlayerManager.LocalPlayerId;
} }
private static Transform IdToTarget(uint id) private static Transform IdToTarget(uint id)
{ {
if (id == uint.MaxValue) if (id == uint.MaxValue)

View File

@ -15,6 +15,7 @@ namespace QSB.Anglerfish.Events
targetId = reader.ReadUInt32(); targetId = reader.ReadUInt32();
localDisturbancePos = reader.ReadVector3(); localDisturbancePos = reader.ReadVector3();
} }
public override void Serialize(QNetworkWriter writer) public override void Serialize(QNetworkWriter writer)
{ {
base.Serialize(writer); base.Serialize(writer);

View File

@ -14,11 +14,13 @@ namespace QSB.Anglerfish.TransformSync
private QSBAngler _qsbAngler; private QSBAngler _qsbAngler;
private static readonly List<AnglerTransformSync> _instances = new List<AnglerTransformSync>(); private static readonly List<AnglerTransformSync> _instances = new List<AnglerTransformSync>();
public override void Start() public override void Start()
{ {
_instances.Add(this); _instances.Add(this);
base.Start(); base.Start();
} }
protected override void OnDestroy() protected override void OnDestroy()
{ {
_instances.Remove(this); _instances.Remove(this);

View File

@ -54,6 +54,7 @@ namespace QSB.Anglerfish.WorldObjects
public Transform targetTransform; public Transform targetTransform;
public Vector3 TargetVelocity { get; private set; } public Vector3 TargetVelocity { get; private set; }
private Vector3 _lastTargetPosition; private Vector3 _lastTargetPosition;
public void FixedUpdate() public void FixedUpdate()
{ {
if (targetTransform == null) if (targetTransform == null)