mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-04-16 14:42:35 +00:00
I HATE JELLYFISH
This commit is contained in:
parent
40fd34c7cb
commit
4e9fe0616d
@ -84,6 +84,7 @@ public class JellyfishTransformSync : UnsectoredRigidbodySync, ILinkedNetworkBeh
|
|||||||
AttachedRigidbody.SetRotation(ReferenceTransform.FromRelRot(transform.rotation));
|
AttachedRigidbody.SetRotation(ReferenceTransform.FromRelRot(transform.rotation));
|
||||||
AttachedRigidbody.SetVelocity(ReferenceRigidbody.FromRelVel(Velocity, pos));
|
AttachedRigidbody.SetVelocity(ReferenceRigidbody.FromRelVel(Velocity, pos));
|
||||||
AttachedRigidbody.SetAngularVelocity(ReferenceRigidbody.FromRelAngVel(AngularVelocity));
|
AttachedRigidbody.SetAngularVelocity(ReferenceRigidbody.FromRelAngVel(AngularVelocity));
|
||||||
|
DebugLog.DebugWrite($"{this} APPLY TO ATTACHED");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnRenderObject()
|
protected override void OnRenderObject()
|
||||||
|
@ -1,13 +1,27 @@
|
|||||||
using QSB.JellyfishSync.Messages;
|
using Cysharp.Threading.Tasks;
|
||||||
|
using QSB.JellyfishSync.Messages;
|
||||||
using QSB.JellyfishSync.TransformSync;
|
using QSB.JellyfishSync.TransformSync;
|
||||||
using QSB.Messaging;
|
using QSB.Messaging;
|
||||||
|
using QSB.Utility;
|
||||||
using QSB.Utility.LinkedWorldObject;
|
using QSB.Utility.LinkedWorldObject;
|
||||||
|
using System.Threading;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace QSB.JellyfishSync.WorldObjects;
|
namespace QSB.JellyfishSync.WorldObjects;
|
||||||
|
|
||||||
public class QSBJellyfish : LinkedWorldObject<JellyfishController, JellyfishTransformSync>
|
public class QSBJellyfish : LinkedWorldObject<JellyfishController, JellyfishTransformSync>
|
||||||
{
|
{
|
||||||
|
public override async UniTask Init(CancellationToken ct)
|
||||||
|
{
|
||||||
|
await base.Init(ct);
|
||||||
|
|
||||||
|
if (QSBCore.IsHost)
|
||||||
|
{
|
||||||
|
AttachedObject._upwardsAcceleration *= 10;
|
||||||
|
AttachedObject._downwardsAcceleration *= 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override bool ShouldDisplayDebug() => false;
|
public override bool ShouldDisplayDebug() => false;
|
||||||
|
|
||||||
protected override GameObject NetworkObjectPrefab => QSBNetworkManager.singleton.JellyfishPrefab;
|
protected override GameObject NetworkObjectPrefab => QSBNetworkManager.singleton.JellyfishPrefab;
|
||||||
@ -25,5 +39,6 @@ public class QSBJellyfish : LinkedWorldObject<JellyfishController, JellyfishTran
|
|||||||
|
|
||||||
AttachedObject._isRising = value;
|
AttachedObject._isRising = value;
|
||||||
AttachedObject._attractiveFluidVolume.SetVolumeActivation(!value);
|
AttachedObject._attractiveFluidVolume.SetVolumeActivation(!value);
|
||||||
|
DebugLog.DebugWrite($"{this} SET IS RISING");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user