mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-03-01 07:13:27 +00:00
roasting sync!
This commit is contained in:
parent
b4232bd09b
commit
3a51911717
@ -3,7 +3,7 @@ CRC: 2815158869
|
||||
Hashes:
|
||||
AssetFileHash:
|
||||
serializedVersion: 2
|
||||
Hash: 5677b7876f2afae05c0920067ef29e8a
|
||||
Hash: 81bbcd8775249928cc67d7ff90ff9047
|
||||
TypeTreeHash:
|
||||
serializedVersion: 2
|
||||
Hash: 4d6a73cb377370ba69c96eb5da1b5028
|
||||
|
Binary file not shown.
@ -1,12 +1,12 @@
|
||||
ManifestFileVersion: 0
|
||||
CRC: 3416116897
|
||||
CRC: 3669040473
|
||||
Hashes:
|
||||
AssetFileHash:
|
||||
serializedVersion: 2
|
||||
Hash: f304be71f6b3202b0c75695ffc81dd4e
|
||||
Hash: 102cbe12b50dffef59e4f393401b86ab
|
||||
TypeTreeHash:
|
||||
serializedVersion: 2
|
||||
Hash: 47ee499ae8022a6b96ca6a5fd541f154
|
||||
Hash: 8b6abf066340f652e25eed06e6b72102
|
||||
HashAppended: 0
|
||||
ClassTypes:
|
||||
- Class: 1
|
||||
@ -15,19 +15,17 @@ ClassTypes:
|
||||
Script: {instanceID: 0}
|
||||
- Class: 114
|
||||
Script: {fileID: 372142912, guid: dc443db3e92b4983b9738c1131f555cb, type: 3}
|
||||
- Class: 114
|
||||
Script: {fileID: -822479833, guid: dc443db3e92b4983b9738c1131f555cb, type: 3}
|
||||
- Class: 114
|
||||
Script: {fileID: 227461547, guid: dc443db3e92b4983b9738c1131f555cb, type: 3}
|
||||
- Class: 114
|
||||
Script: {fileID: -1768714887, guid: dc443db3e92b4983b9738c1131f555cb, type: 3}
|
||||
- Class: 114
|
||||
Script: {fileID: -1267208747, guid: dc443db3e92b4983b9738c1131f555cb, type: 3}
|
||||
- Class: 115
|
||||
Script: {instanceID: 0}
|
||||
Assets:
|
||||
- Assets/NetworkStickPivot.prefab
|
||||
- Assets/NetworkPlayer.prefab
|
||||
- Assets/NetworkCameraRoot.prefab
|
||||
- Assets/NetworkProbe.prefab
|
||||
- Assets/NetworkOrb.prefab
|
||||
- Assets/NetworkManager.prefab
|
||||
- Assets/NetworkShip.prefab
|
||||
Dependencies: []
|
||||
|
@ -3,7 +3,7 @@ using System.Reflection;
|
||||
|
||||
namespace QSB.CampfireSync.WorldObjects
|
||||
{
|
||||
internal class QSBCampfire : WorldObject<Campfire>
|
||||
public class QSBCampfire : WorldObject<Campfire>
|
||||
{
|
||||
public override void Init(Campfire campfire, int id)
|
||||
{
|
||||
|
@ -1,4 +1,5 @@
|
||||
using QSB.Animation;
|
||||
using QSB.CampfireSync.WorldObjects;
|
||||
using QSB.QuantumSync;
|
||||
using QSB.RoastingSync;
|
||||
using QSB.Tools;
|
||||
@ -35,6 +36,7 @@ namespace QSB.Player
|
||||
public Transform WarpCoreSocket => CameraBody.transform.Find("WarpCoreSocket");
|
||||
public Transform VesselCoreSocket => CameraBody.transform.Find("VesselCoreSocket");
|
||||
public QSBMarshmallow Marshmallow { get; set; }
|
||||
public QSBCampfire Campfire { get; set; }
|
||||
|
||||
// Conversation
|
||||
public int CurrentDialogueID { get; set; }
|
||||
|
@ -37,6 +37,7 @@ namespace QSB
|
||||
private GameObject _shipPrefab;
|
||||
private GameObject _cameraPrefab;
|
||||
private GameObject _probePrefab;
|
||||
private GameObject _stickPrefab;
|
||||
private bool _everConnected;
|
||||
|
||||
public new void Awake()
|
||||
@ -79,6 +80,12 @@ namespace QSB
|
||||
OrbPrefab.AddComponent<NomaiOrbTransformSync>();
|
||||
spawnPrefabs.Add(OrbPrefab);
|
||||
|
||||
_stickPrefab = _assetBundle.LoadAsset<GameObject>("assets/networkstickpivot.prefab");
|
||||
SetupNetworkId(_stickPrefab);
|
||||
SetupNetworkTransform(_stickPrefab);
|
||||
_stickPrefab.AddComponent<RoastingStickTransformSync>();
|
||||
spawnPrefabs.Add(_stickPrefab);
|
||||
|
||||
ConfigureNetworkManager();
|
||||
QSBSceneManager.OnUniverseSceneLoaded += OnSceneLoaded;
|
||||
}
|
||||
@ -95,6 +102,12 @@ namespace QSB
|
||||
{
|
||||
var trans = go.AddComponent<QNetworkTransform>();
|
||||
trans.SyncRotationAxis = QNetworkTransform.AxisSyncMode.AxisXYZ;
|
||||
foreach (var item in go.GetComponents<NetworkTransformChild>())
|
||||
{
|
||||
var child = go.AddComponent<QNetworkTransformChild>();
|
||||
child.Target = item.target;
|
||||
Destroy(item);
|
||||
}
|
||||
Destroy(go.GetComponent<NetworkTransform>());
|
||||
Destroy(go.GetComponent<NetworkIdentity>());
|
||||
}
|
||||
@ -145,6 +158,7 @@ namespace QSB
|
||||
QNetworkServer.SpawnWithClientAuthority(Instantiate(_shipPrefab), connection);
|
||||
QNetworkServer.SpawnWithClientAuthority(Instantiate(_cameraPrefab), connection);
|
||||
QNetworkServer.SpawnWithClientAuthority(Instantiate(_probePrefab), connection);
|
||||
QNetworkServer.SpawnWithClientAuthority(Instantiate(_stickPrefab), connection);
|
||||
}
|
||||
|
||||
public override void OnStartClient(QNetworkClient _)
|
||||
|
@ -1,36 +1,67 @@
|
||||
using QSB.Events;
|
||||
using QSB.Messaging;
|
||||
using QSB.CampfireSync.WorldObjects;
|
||||
using QSB.Events;
|
||||
using QSB.Player;
|
||||
using QSB.Utility;
|
||||
using QSB.WorldSync;
|
||||
using QSB.WorldSync.Events;
|
||||
|
||||
namespace QSB.RoastingSync.Events
|
||||
{
|
||||
class EnterExitRoastingEvent : QSBEvent<BoolMessage>
|
||||
internal class EnterExitRoastingEvent : QSBEvent<BoolWorldObjectMessage>
|
||||
{
|
||||
public override EventType Type => EventType.Roasting;
|
||||
|
||||
public override void SetupListener()
|
||||
{
|
||||
GlobalMessenger<Campfire>.AddListener(EventNames.EnterRoastingMode, (Campfire fire) => Handler(true));
|
||||
GlobalMessenger.AddListener(EventNames.ExitRoastingMode, () => Handler(false));
|
||||
GlobalMessenger<Campfire>.AddListener(EventNames.EnterRoastingMode, (Campfire fire) => Handler(fire, true));
|
||||
GlobalMessenger.AddListener(EventNames.ExitRoastingMode, () => Handler(null, false));
|
||||
}
|
||||
|
||||
public override void CloseListener()
|
||||
public override void CloseListener()
|
||||
{
|
||||
GlobalMessenger<Campfire>.RemoveListener(EventNames.EnterRoastingMode, (Campfire fire) => Handler(true));
|
||||
GlobalMessenger.RemoveListener(EventNames.ExitRoastingMode, () => Handler(false));
|
||||
GlobalMessenger<Campfire>.RemoveListener(EventNames.EnterRoastingMode, (Campfire fire) => Handler(fire, true));
|
||||
GlobalMessenger.RemoveListener(EventNames.ExitRoastingMode, () => Handler(null, false));
|
||||
}
|
||||
|
||||
private void Handler(bool roasting) => SendEvent(CreateMessage(roasting));
|
||||
private void Handler(Campfire campfire, bool roasting)
|
||||
{
|
||||
if (campfire == null)
|
||||
{
|
||||
SendEvent(CreateMessage(-1, roasting));
|
||||
return;
|
||||
}
|
||||
var qsbObj = QSBWorldSync.GetWorldFromUnity<QSBCampfire, Campfire>(campfire);
|
||||
SendEvent(CreateMessage(qsbObj.ObjectId, roasting));
|
||||
}
|
||||
|
||||
private BoolMessage CreateMessage(bool roasting) => new BoolMessage
|
||||
private BoolWorldObjectMessage CreateMessage(int objectId, bool roasting) => new BoolWorldObjectMessage
|
||||
{
|
||||
AboutId = LocalPlayerId,
|
||||
Value = roasting
|
||||
State = roasting,
|
||||
ObjectId = objectId
|
||||
};
|
||||
|
||||
public override void OnReceiveRemote(bool server, BoolMessage message)
|
||||
public override void OnReceiveRemote(bool server, BoolWorldObjectMessage message)
|
||||
{
|
||||
DebugLog.DebugWrite($"Get roasting value {message.Value} for {message.AboutId}");
|
||||
if (!QSBCore.HasWokenUp)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (message.State && message.ObjectId == -1)
|
||||
{
|
||||
DebugLog.ToConsole($"Error - Null campfire supplied for start roasting event!", OWML.Common.MessageType.Error);
|
||||
return;
|
||||
}
|
||||
var player = QSBPlayerManager.GetPlayer(message.AboutId);
|
||||
player.RoastingStick.SetActive(message.State);
|
||||
if (message.State)
|
||||
{
|
||||
player.Campfire = QSBWorldSync.GetWorldFromId<QSBCampfire>(message.ObjectId);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.Campfire = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
using QSB.Events;
|
||||
using QSB.Messaging;
|
||||
using QSB.Player;
|
||||
using QSB.Utility;
|
||||
|
||||
namespace QSB.RoastingSync.Events
|
||||
{
|
||||
class MarshmallowEventEvent : QSBEvent<EnumMessage<MarshmallowEventType>>
|
||||
internal class MarshmallowEventEvent : QSBEvent<EnumMessage<MarshmallowEventType>>
|
||||
{
|
||||
public override EventType Type => EventType.MarshmallowEvent;
|
||||
|
||||
@ -21,7 +22,33 @@ namespace QSB.RoastingSync.Events
|
||||
|
||||
public override void OnReceiveRemote(bool server, EnumMessage<MarshmallowEventType> message)
|
||||
{
|
||||
DebugLog.DebugWrite($"Get marshmallow event {message.EnumValue} from {message.AboutId}");
|
||||
var marshmallow = QSBPlayerManager.GetPlayer(message.AboutId).Marshmallow;
|
||||
if (marshmallow == null)
|
||||
{
|
||||
DebugLog.ToConsole($"Warning - Marshmallow is null for player {message.AboutId}.", OWML.Common.MessageType.Warning);
|
||||
return;
|
||||
}
|
||||
switch (message.EnumValue)
|
||||
{
|
||||
case MarshmallowEventType.Burn:
|
||||
marshmallow.Burn();
|
||||
break;
|
||||
case MarshmallowEventType.Extinguish:
|
||||
marshmallow.Extinguish();
|
||||
break;
|
||||
case MarshmallowEventType.Remove:
|
||||
marshmallow.RemoveMallow();
|
||||
break;
|
||||
case MarshmallowEventType.Replace:
|
||||
marshmallow.SpawnMallow();
|
||||
break;
|
||||
case MarshmallowEventType.Shrivel:
|
||||
marshmallow.Shrivel();
|
||||
break;
|
||||
case MarshmallowEventType.Toss:
|
||||
//TODO : implement
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.RoastingSync.Patches
|
||||
{
|
||||
class RoastingPatches : QSBPatch
|
||||
internal class RoastingPatches : QSBPatch
|
||||
{
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||
|
||||
@ -89,7 +89,7 @@ namespace QSB.RoastingSync.Patches
|
||||
{
|
||||
var changePromptText = false;
|
||||
var showRemovePrompt = false;
|
||||
string text = string.Empty;
|
||||
var text = string.Empty;
|
||||
if (____extendFraction == 0f)
|
||||
{
|
||||
if (____marshmallow.IsEdible())
|
||||
|
@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using QSB.Player;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
namespace QSB.RoastingSync
|
||||
@ -25,20 +23,21 @@ namespace QSB.RoastingSync
|
||||
private float _toastedFraction;
|
||||
private float _initBurnTime;
|
||||
private float _initShrivelTime;
|
||||
private SunController _sunController;
|
||||
private PlayerInfo _attachedPlayer;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_smokeParticlesSettings = _smokeParticles.main;
|
||||
_fireRenderer.enabled = false;
|
||||
_smokeParticles.Stop();
|
||||
_attachedPlayer = QSBPlayerManager.PlayerList.First(x => x.Marshmallow == this);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
private void Update()
|
||||
{
|
||||
if (Locator.GetSunTransform() != null)
|
||||
if (_attachedPlayer.Campfire != null)
|
||||
{
|
||||
_sunController = Locator.GetSunTransform().GetComponent<SunController>();
|
||||
UpdateRoast(_attachedPlayer.Campfire.AttachedObject);
|
||||
}
|
||||
}
|
||||
|
||||
@ -77,24 +76,13 @@ namespace QSB.RoastingSync
|
||||
transform.localPosition = Vector3.MoveTowards(transform.localPosition, Vector3.zero, Time.deltaTime);
|
||||
if (_mallowState != Marshmallow.MallowState.Default)
|
||||
{
|
||||
if (_mallowState == Marshmallow.MallowState.Burning)
|
||||
{
|
||||
if (Time.time > _initBurnTime + BURN_DURATION)
|
||||
{
|
||||
Shrivel();
|
||||
}
|
||||
}
|
||||
else if (_mallowState == Marshmallow.MallowState.Shriveling)
|
||||
if (_mallowState == Marshmallow.MallowState.Shriveling)
|
||||
{
|
||||
var shrivelFraction = Mathf.Clamp01((Time.time - _initShrivelTime) / 2f);
|
||||
if (shrivelFraction >= 0.5 && _fireRenderer.enabled)
|
||||
{
|
||||
_fireRenderer.enabled = false;
|
||||
}
|
||||
if (shrivelFraction >= 1f)
|
||||
{
|
||||
RemoveMallow();
|
||||
}
|
||||
transform.localScale = Vector3.one * (1f - shrivelFraction);
|
||||
}
|
||||
}
|
||||
@ -103,22 +91,9 @@ namespace QSB.RoastingSync
|
||||
|
||||
private void UpdateHeatExposure(Campfire campfire)
|
||||
{
|
||||
if (_sunController != null)
|
||||
{
|
||||
var distanceToSupernova = Vector3.Distance(transform.position, _sunController.transform.position) - _sunController.GetSupernovaRadius();
|
||||
if (distanceToSupernova < 2000f)
|
||||
{
|
||||
Burn();
|
||||
return;
|
||||
}
|
||||
}
|
||||
_heatPerSecond = campfire.GetHeatAtPosition(transform.position);
|
||||
_toastedFraction += _heatPerSecond * Time.deltaTime / HEAT_CAPACITY;
|
||||
_toastedFraction = Mathf.Clamp01(_toastedFraction);
|
||||
if (_heatPerSecond > BURN_THRESHOLD)
|
||||
{
|
||||
Burn();
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateVisuals()
|
||||
@ -152,7 +127,7 @@ namespace QSB.RoastingSync
|
||||
_smokeParticles.transform.forward = Locator.GetPlayerTransform().up;
|
||||
}
|
||||
|
||||
private void Burn()
|
||||
public void Burn()
|
||||
{
|
||||
if (_mallowState == Marshmallow.MallowState.Default)
|
||||
{
|
||||
@ -163,7 +138,7 @@ namespace QSB.RoastingSync
|
||||
}
|
||||
}
|
||||
|
||||
private void Shrivel()
|
||||
public void Shrivel()
|
||||
{
|
||||
if (_mallowState == Marshmallow.MallowState.Burning)
|
||||
{
|
||||
@ -172,7 +147,7 @@ namespace QSB.RoastingSync
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveMallow()
|
||||
public void RemoveMallow()
|
||||
{
|
||||
_smokeParticles.Stop();
|
||||
_fireRenderer.enabled = false;
|
||||
|
@ -1,11 +1,77 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using OWML.Utils;
|
||||
using QSB.Player;
|
||||
using QSB.RoastingSync;
|
||||
using QSB.Utility;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
namespace QSB.TransformSync
|
||||
{
|
||||
class RoastingStickTransformSync
|
||||
internal class RoastingStickTransformSync : TransformSync
|
||||
{
|
||||
private Transform _stickTip;
|
||||
private Transform _networkStickTip => gameObject.transform.GetChild(0);
|
||||
|
||||
private Transform GetPivot()
|
||||
=> Resources.FindObjectsOfTypeAll<RoastingStickController>().First().transform.Find("Stick_Root/Stick_Pivot");
|
||||
|
||||
protected override Transform InitLocalTransform()
|
||||
{
|
||||
var pivot = GetPivot();
|
||||
Player.RoastingStick = pivot.gameObject;
|
||||
_stickTip = pivot.Find("Stick_Tip");
|
||||
return pivot;
|
||||
}
|
||||
|
||||
protected override Transform InitRemoteTransform()
|
||||
{
|
||||
var newPivot = Instantiate(GetPivot());
|
||||
newPivot.parent = null;
|
||||
newPivot.gameObject.SetActive(false);
|
||||
Destroy(newPivot.Find("Stick_Tip/Props_HEA_RoastingStick/RoastingStick_Arm").gameObject);
|
||||
Destroy(newPivot.Find("Stick_Tip/Props_HEA_RoastingStick/RoastingStick_Arm_NoSuit").gameObject);
|
||||
var mallowRoot = newPivot.Find("Stick_Tip/Mallow_Root");
|
||||
mallowRoot.gameObject.SetActive(false);
|
||||
var oldMarshmallow = mallowRoot.GetComponent<Marshmallow>();
|
||||
var newMarshmallow = mallowRoot.gameObject.AddComponent<QSBMarshmallow>();
|
||||
newMarshmallow._fireRenderer = oldMarshmallow.GetValue<MeshRenderer>("_fireRenderer");
|
||||
newMarshmallow._smokeParticles = oldMarshmallow.GetValue<ParticleSystem>("_smokeParticles");
|
||||
newMarshmallow._mallowRenderer = oldMarshmallow.GetValue<MeshRenderer>("_mallowRenderer");
|
||||
newMarshmallow._rawColor = oldMarshmallow.GetValue<Color>("_rawColor");
|
||||
newMarshmallow._toastedColor = oldMarshmallow.GetValue<Color>("_toastedColor");
|
||||
newMarshmallow._burntColor = oldMarshmallow.GetValue<Color>("_burntColor");
|
||||
Destroy(oldMarshmallow);
|
||||
Player.RoastingStick = newPivot.gameObject;
|
||||
Player.Marshmallow = newMarshmallow;
|
||||
mallowRoot.gameObject.SetActive(true);
|
||||
_stickTip = newPivot.Find("Stick_Tip");
|
||||
return newPivot;
|
||||
}
|
||||
|
||||
protected override void UpdateTransform()
|
||||
{
|
||||
base.UpdateTransform();
|
||||
if (_stickTip == null)
|
||||
{
|
||||
DebugLog.ToConsole($"Warning - _stickTip is null for player {PlayerId}", OWML.Common.MessageType.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (HasAuthority)
|
||||
{
|
||||
_networkStickTip.localPosition = _stickTip.localPosition;
|
||||
_networkStickTip.localRotation = _stickTip.localRotation;
|
||||
return;
|
||||
}
|
||||
|
||||
_stickTip.localPosition = _networkStickTip.localPosition;
|
||||
_stickTip.localRotation = _networkStickTip.localRotation;
|
||||
}
|
||||
|
||||
public override bool IsReady => Locator.GetPlayerTransform() != null
|
||||
&& Player != null
|
||||
&& QSBPlayerManager.PlayerExists(Player.PlayerId)
|
||||
&& NetId.Value != uint.MaxValue
|
||||
&& NetId.Value != 0U;
|
||||
}
|
||||
}
|
||||
}
|
@ -64,6 +64,20 @@ namespace QSB.TransformSync
|
||||
_isVisible = true;
|
||||
}
|
||||
|
||||
public void OnRenderObject()
|
||||
{
|
||||
if (!QSBCore.HasWokenUp || !QSBCore.DebugMode || !QSBCore.ShowLinesInDebug || !IsReady)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Popcron.Gizmos.Cube(SyncedTransform.position, SyncedTransform.rotation, Vector3.one / 2, Color.green);
|
||||
Popcron.Gizmos.Cube(transform.position, transform.rotation, Vector3.one / 2, Color.red);
|
||||
Popcron.Gizmos.Line(SyncedTransform.position, transform.position, Color.magenta);
|
||||
Popcron.Gizmos.Cube(ReferenceSector.Position, ReferenceSector.Transform.rotation, Vector3.one, Color.cyan);
|
||||
Popcron.Gizmos.Line(SyncedTransform.position, ReferenceSector.Position, Color.blue);
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (!_isInitialized && IsReady)
|
||||
|
422
QuantumUNET/Components/QNetworkTransformChild.cs
Normal file
422
QuantumUNET/Components/QNetworkTransformChild.cs
Normal file
@ -0,0 +1,422 @@
|
||||
using QuantumUNET.Messages;
|
||||
using QuantumUNET.Transport;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
namespace QuantumUNET.Components
|
||||
{
|
||||
public class QNetworkTransformChild : QNetworkBehaviour
|
||||
{
|
||||
public Transform Target
|
||||
{
|
||||
get => m_Target;
|
||||
set
|
||||
{
|
||||
m_Target = value;
|
||||
OnValidate();
|
||||
}
|
||||
}
|
||||
|
||||
public uint ChildIndex => m_ChildIndex;
|
||||
|
||||
public float SendInterval
|
||||
{
|
||||
get => m_SendInterval;
|
||||
set => m_SendInterval = value;
|
||||
}
|
||||
|
||||
public QNetworkTransform.AxisSyncMode SyncRotationAxis
|
||||
{
|
||||
get => m_SyncRotationAxis;
|
||||
set => m_SyncRotationAxis = value;
|
||||
}
|
||||
|
||||
public QNetworkTransform.CompressionSyncMode RotationSyncCompression
|
||||
{
|
||||
get => m_RotationSyncCompression;
|
||||
set => m_RotationSyncCompression = value;
|
||||
}
|
||||
|
||||
public float MovementThreshold
|
||||
{
|
||||
get => m_MovementThreshold;
|
||||
set => m_MovementThreshold = value;
|
||||
}
|
||||
|
||||
public float InterpolateRotation
|
||||
{
|
||||
get => m_InterpolateRotation;
|
||||
set => m_InterpolateRotation = value;
|
||||
}
|
||||
|
||||
public float InterpolateMovement
|
||||
{
|
||||
get => m_InterpolateMovement;
|
||||
set => m_InterpolateMovement = value;
|
||||
}
|
||||
|
||||
public QNetworkTransform.ClientMoveCallback3D ClientMoveCallback3D
|
||||
{
|
||||
get => m_ClientMoveCallback3D;
|
||||
set => m_ClientMoveCallback3D = value;
|
||||
}
|
||||
|
||||
public float LastSyncTime { get; private set; }
|
||||
public Vector3 TargetSyncPosition => m_TargetSyncPosition;
|
||||
public Quaternion TargetSyncRotation3D => m_TargetSyncRotation3D;
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
if (m_Target != null)
|
||||
{
|
||||
var parent = m_Target.parent;
|
||||
if (parent == null)
|
||||
{
|
||||
Debug.LogError("NetworkTransformChild target cannot be the root transform.");
|
||||
m_Target = null;
|
||||
return;
|
||||
}
|
||||
while (parent.parent != null)
|
||||
{
|
||||
parent = parent.parent;
|
||||
}
|
||||
m_Root = parent.gameObject.GetComponent<QNetworkTransform>();
|
||||
if (m_Root == null)
|
||||
{
|
||||
Debug.LogError("NetworkTransformChild root must have NetworkTransform");
|
||||
m_Target = null;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (m_Root != null)
|
||||
{
|
||||
m_ChildIndex = uint.MaxValue;
|
||||
var components = m_Root.GetComponents<QNetworkTransformChild>();
|
||||
var num = 0U;
|
||||
while (num < (ulong)components.Length)
|
||||
{
|
||||
if (components[(int)(UIntPtr)num] == this)
|
||||
{
|
||||
m_ChildIndex = num;
|
||||
break;
|
||||
}
|
||||
num += 1U;
|
||||
}
|
||||
if (m_ChildIndex == 4294967295U)
|
||||
{
|
||||
Debug.LogError("QNetworkTransformChild component must be a child in the same hierarchy");
|
||||
m_Target = null;
|
||||
}
|
||||
}
|
||||
if (m_SendInterval < 0f)
|
||||
{
|
||||
m_SendInterval = 0f;
|
||||
}
|
||||
if (m_SyncRotationAxis < QNetworkTransform.AxisSyncMode.None || m_SyncRotationAxis > QNetworkTransform.AxisSyncMode.AxisXYZ)
|
||||
{
|
||||
m_SyncRotationAxis = QNetworkTransform.AxisSyncMode.None;
|
||||
}
|
||||
if (MovementThreshold < 0f)
|
||||
{
|
||||
MovementThreshold = 0f;
|
||||
}
|
||||
if (InterpolateRotation < 0f)
|
||||
{
|
||||
InterpolateRotation = 0.01f;
|
||||
}
|
||||
if (InterpolateRotation > 1f)
|
||||
{
|
||||
InterpolateRotation = 1f;
|
||||
}
|
||||
if (InterpolateMovement < 0f)
|
||||
{
|
||||
InterpolateMovement = 0.01f;
|
||||
}
|
||||
if (InterpolateMovement > 1f)
|
||||
{
|
||||
InterpolateMovement = 1f;
|
||||
}
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
m_PrevPosition = m_Target.localPosition;
|
||||
m_PrevRotation = m_Target.localRotation;
|
||||
if (LocalPlayerAuthority)
|
||||
{
|
||||
m_LocalTransformWriter = new QNetworkWriter();
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnSerialize(QNetworkWriter writer, bool initialState)
|
||||
{
|
||||
if (!initialState)
|
||||
{
|
||||
if (SyncVarDirtyBits == 0U)
|
||||
{
|
||||
writer.WritePackedUInt32(0U);
|
||||
return false;
|
||||
}
|
||||
writer.WritePackedUInt32(1U);
|
||||
}
|
||||
SerializeModeTransform(writer);
|
||||
return true;
|
||||
}
|
||||
|
||||
private void SerializeModeTransform(QNetworkWriter writer)
|
||||
{
|
||||
writer.Write(m_Target.localPosition);
|
||||
if (m_SyncRotationAxis != QNetworkTransform.AxisSyncMode.None)
|
||||
{
|
||||
QNetworkTransform.SerializeRotation3D(writer, m_Target.localRotation, SyncRotationAxis, RotationSyncCompression);
|
||||
}
|
||||
m_PrevPosition = m_Target.localPosition;
|
||||
m_PrevRotation = m_Target.localRotation;
|
||||
}
|
||||
|
||||
public override void OnDeserialize(QNetworkReader reader, bool initialState)
|
||||
{
|
||||
if (!IsServer || !QNetworkServer.localClientActive)
|
||||
{
|
||||
if (!initialState)
|
||||
{
|
||||
if (reader.ReadPackedUInt32() == 0U)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
UnserializeModeTransform(reader, initialState);
|
||||
LastSyncTime = Time.time;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000488 RID: 1160 RVA: 0x00019B44 File Offset: 0x00017D44
|
||||
private void UnserializeModeTransform(QNetworkReader reader, bool initialState)
|
||||
{
|
||||
if (HasAuthority)
|
||||
{
|
||||
reader.ReadVector3();
|
||||
if (SyncRotationAxis != QNetworkTransform.AxisSyncMode.None)
|
||||
{
|
||||
QNetworkTransform.UnserializeRotation3D(reader, SyncRotationAxis, RotationSyncCompression);
|
||||
}
|
||||
}
|
||||
else if (IsServer && m_ClientMoveCallback3D != null)
|
||||
{
|
||||
var targetSyncPosition = reader.ReadVector3();
|
||||
var zero = Vector3.zero;
|
||||
var targetSyncRotation3D = Quaternion.identity;
|
||||
if (SyncRotationAxis != QNetworkTransform.AxisSyncMode.None)
|
||||
{
|
||||
targetSyncRotation3D = QNetworkTransform.UnserializeRotation3D(reader, SyncRotationAxis, RotationSyncCompression);
|
||||
}
|
||||
if (m_ClientMoveCallback3D(ref targetSyncPosition, ref zero, ref targetSyncRotation3D))
|
||||
{
|
||||
m_TargetSyncPosition = targetSyncPosition;
|
||||
if (SyncRotationAxis != QNetworkTransform.AxisSyncMode.None)
|
||||
{
|
||||
m_TargetSyncRotation3D = targetSyncRotation3D;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_TargetSyncPosition = reader.ReadVector3();
|
||||
if (SyncRotationAxis != QNetworkTransform.AxisSyncMode.None)
|
||||
{
|
||||
m_TargetSyncRotation3D = QNetworkTransform.UnserializeRotation3D(reader, SyncRotationAxis, RotationSyncCompression);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000489 RID: 1161 RVA: 0x00019C4B File Offset: 0x00017E4B
|
||||
private void FixedUpdate()
|
||||
{
|
||||
if (IsServer)
|
||||
{
|
||||
FixedUpdateServer();
|
||||
}
|
||||
if (IsClient)
|
||||
{
|
||||
FixedUpdateClient();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600048A RID: 1162 RVA: 0x00019C74 File Offset: 0x00017E74
|
||||
private void FixedUpdateServer()
|
||||
{
|
||||
if (SyncVarDirtyBits == 0U)
|
||||
{
|
||||
if (QNetworkServer.active)
|
||||
{
|
||||
if (IsServer)
|
||||
{
|
||||
if (GetNetworkSendInterval() != 0f)
|
||||
{
|
||||
var num = (m_Target.localPosition - m_PrevPosition).sqrMagnitude;
|
||||
if (num < MovementThreshold)
|
||||
{
|
||||
num = Quaternion.Angle(m_PrevRotation, m_Target.localRotation);
|
||||
if (num < MovementThreshold)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
SetDirtyBit(1U);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600048B RID: 1163 RVA: 0x00019D24 File Offset: 0x00017F24
|
||||
private void FixedUpdateClient()
|
||||
{
|
||||
if (LastSyncTime != 0f)
|
||||
{
|
||||
if (QNetworkServer.active || QNetworkClient.active)
|
||||
{
|
||||
if (IsServer || IsClient)
|
||||
{
|
||||
if (GetNetworkSendInterval() != 0f)
|
||||
{
|
||||
if (!HasAuthority)
|
||||
{
|
||||
if (LastSyncTime != 0f)
|
||||
{
|
||||
m_Target.localPosition = m_InterpolateMovement > 0f
|
||||
? Vector3.Lerp(m_Target.localPosition, m_TargetSyncPosition, m_InterpolateMovement)
|
||||
: m_TargetSyncPosition;
|
||||
m_Target.localRotation = m_InterpolateRotation > 0f
|
||||
? Quaternion.Slerp(m_Target.localRotation, m_TargetSyncRotation3D, m_InterpolateRotation)
|
||||
: m_TargetSyncRotation3D;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (HasAuthority)
|
||||
{
|
||||
if (LocalPlayerAuthority)
|
||||
{
|
||||
if (!QNetworkServer.active)
|
||||
{
|
||||
if (Time.time - m_LastClientSendTime > GetNetworkSendInterval())
|
||||
{
|
||||
SendTransform();
|
||||
m_LastClientSendTime = Time.time;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool HasMoved()
|
||||
{
|
||||
var num = (m_Target.localPosition - m_PrevPosition).sqrMagnitude;
|
||||
bool result;
|
||||
if (num > 1E-05f)
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
num = Quaternion.Angle(m_Target.localRotation, m_PrevRotation);
|
||||
result = num > 1E-05f;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
[Client]
|
||||
private void SendTransform()
|
||||
{
|
||||
if (HasMoved() && QClientScene.readyConnection != null)
|
||||
{
|
||||
m_LocalTransformWriter.StartMessage(16);
|
||||
m_LocalTransformWriter.Write(NetId);
|
||||
m_LocalTransformWriter.WritePackedUInt32(m_ChildIndex);
|
||||
SerializeModeTransform(m_LocalTransformWriter);
|
||||
m_PrevPosition = m_Target.localPosition;
|
||||
m_PrevRotation = m_Target.localRotation;
|
||||
m_LocalTransformWriter.FinishMessage();
|
||||
QClientScene.readyConnection.SendWriter(m_LocalTransformWriter, GetNetworkChannel());
|
||||
}
|
||||
}
|
||||
|
||||
internal static void HandleChildTransform(QNetworkMessage netMsg)
|
||||
{
|
||||
var networkInstanceId = netMsg.Reader.ReadNetworkId();
|
||||
var num = netMsg.Reader.ReadPackedUInt32();
|
||||
var gameObject = QNetworkServer.FindLocalObject(networkInstanceId);
|
||||
if (gameObject == null)
|
||||
{
|
||||
Debug.LogError("Received NetworkTransformChild data for GameObject that doesn't exist");
|
||||
}
|
||||
else
|
||||
{
|
||||
var components = gameObject.GetComponents<QNetworkTransformChild>();
|
||||
if (components == null || components.Length == 0)
|
||||
{
|
||||
Debug.LogError("HandleChildTransform no children");
|
||||
}
|
||||
else if (num >= (ulong)components.Length)
|
||||
{
|
||||
Debug.LogError("HandleChildTransform childIndex invalid");
|
||||
}
|
||||
else
|
||||
{
|
||||
var networkTransformChild = components[(int)(UIntPtr)num];
|
||||
if (networkTransformChild == null)
|
||||
{
|
||||
Debug.LogError("HandleChildTransform null target");
|
||||
}
|
||||
else if (!networkTransformChild.LocalPlayerAuthority)
|
||||
{
|
||||
Debug.LogError("HandleChildTransform no localPlayerAuthority");
|
||||
}
|
||||
else if (!netMsg.Connection.ClientOwnedObjects.Contains(networkInstanceId))
|
||||
{
|
||||
Debug.LogWarning("NetworkTransformChild netId:" + networkInstanceId + " is not for a valid player");
|
||||
}
|
||||
else
|
||||
{
|
||||
networkTransformChild.UnserializeModeTransform(netMsg.Reader, false);
|
||||
networkTransformChild.LastSyncTime = Time.time;
|
||||
if (!networkTransformChild.IsClient)
|
||||
{
|
||||
networkTransformChild.m_Target.localPosition = networkTransformChild.m_TargetSyncPosition;
|
||||
networkTransformChild.m_Target.localRotation = networkTransformChild.m_TargetSyncRotation3D;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override int GetNetworkChannel() => 1;
|
||||
public override float GetNetworkSendInterval() => m_SendInterval;
|
||||
public Transform m_Target;
|
||||
public uint m_ChildIndex;
|
||||
public QNetworkTransform m_Root;
|
||||
public float m_SendInterval = 0.1f;
|
||||
public QNetworkTransform.AxisSyncMode m_SyncRotationAxis = QNetworkTransform.AxisSyncMode.AxisXYZ;
|
||||
public QNetworkTransform.CompressionSyncMode m_RotationSyncCompression = QNetworkTransform.CompressionSyncMode.None;
|
||||
public float m_MovementThreshold = 0.001f;
|
||||
public float m_InterpolateRotation = 0.5f;
|
||||
public float m_InterpolateMovement = 0.5f;
|
||||
public QNetworkTransform.ClientMoveCallback3D m_ClientMoveCallback3D;
|
||||
private Vector3 m_TargetSyncPosition;
|
||||
private Quaternion m_TargetSyncRotation3D;
|
||||
private float m_LastClientSendTime;
|
||||
private Vector3 m_PrevPosition;
|
||||
private Quaternion m_PrevRotation;
|
||||
private const float k_LocalMovementThreshold = 1E-05f;
|
||||
private const float k_LocalRotationThreshold = 1E-05f;
|
||||
private QNetworkWriter m_LocalTransformWriter;
|
||||
}
|
||||
}
|
@ -111,8 +111,8 @@ namespace QuantumUNET
|
||||
{
|
||||
m_SimpleServerSimple.RegisterHandlerSafe(QMsgType.Ready, OnClientReadyMessage);
|
||||
m_SimpleServerSimple.RegisterHandlerSafe(QMsgType.Command, OnCommandMessage);
|
||||
m_SimpleServerSimple.RegisterHandlerSafe(QMsgType.LocalPlayerTransform, Components.QNetworkTransform.HandleTransform);
|
||||
//m_SimpleServerSimple.RegisterHandlerSafe((short)16, new QSBNetworkMessageDelegate(NetworkTransformChild.HandleChildTransform));
|
||||
m_SimpleServerSimple.RegisterHandlerSafe(QMsgType.LocalPlayerTransform, QNetworkTransform.HandleTransform);
|
||||
m_SimpleServerSimple.RegisterHandlerSafe(QMsgType.LocalChildTransform, QNetworkTransformChild.HandleChildTransform);
|
||||
m_SimpleServerSimple.RegisterHandlerSafe(QMsgType.RemovePlayer, OnRemovePlayerMessage);
|
||||
m_SimpleServerSimple.RegisterHandlerSafe(QMsgType.Animation, QNetworkAnimator.OnAnimationServerMessage);
|
||||
m_SimpleServerSimple.RegisterHandlerSafe(QMsgType.AnimationParameters, QNetworkAnimator.OnAnimationParametersServerMessage);
|
||||
|
@ -58,6 +58,7 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Components\QNetworkTransformChild.cs" />
|
||||
<Compile Include="Messages\QMsgType.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Messages\QAddPlayerMessage.cs" />
|
||||
|
@ -1,139 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 1132703936793558}
|
||||
m_IsPrefabParent: 1
|
||||
--- !u!1 &1132703936793558
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4924905353373072}
|
||||
- component: {fileID: 114621667906538424}
|
||||
- component: {fileID: 114828621977405986}
|
||||
m_Layer: 0
|
||||
m_Name: NetworkManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4924905353373072
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1132703936793558}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &114621667906538424
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1132703936793558}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -822479833, guid: dc443db3e92b4983b9738c1131f555cb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_NetworkPort: 7777
|
||||
m_ServerBindToIP: 0
|
||||
m_ServerBindAddress:
|
||||
m_NetworkAddress: localhost
|
||||
m_DontDestroyOnLoad: 1
|
||||
m_RunInBackground: 1
|
||||
m_ScriptCRCCheck: 1
|
||||
m_MaxDelay: 0.01
|
||||
m_LogLevel: 2
|
||||
m_PlayerPrefab: {fileID: 0}
|
||||
m_AutoCreatePlayer: 1
|
||||
m_PlayerSpawnMethod: 0
|
||||
m_OfflineScene:
|
||||
m_OnlineScene:
|
||||
m_SpawnPrefabs: []
|
||||
m_CustomConfig: 0
|
||||
m_MaxConnections: 4
|
||||
m_ConnectionConfig:
|
||||
m_PacketSize: 1440
|
||||
m_FragmentSize: 500
|
||||
m_ResendTimeout: 1200
|
||||
m_DisconnectTimeout: 2000
|
||||
m_ConnectTimeout: 2000
|
||||
m_MinUpdateTimeout: 10
|
||||
m_PingTimeout: 500
|
||||
m_ReducedPingTimeout: 100
|
||||
m_AllCostTimeout: 20
|
||||
m_NetworkDropThreshold: 5
|
||||
m_OverflowDropThreshold: 5
|
||||
m_MaxConnectionAttempt: 10
|
||||
m_AckDelay: 33
|
||||
m_SendDelay: 10
|
||||
m_MaxCombinedReliableMessageSize: 100
|
||||
m_MaxCombinedReliableMessageCount: 10
|
||||
m_MaxSentMessageQueueSize: 512
|
||||
m_AcksType: 1
|
||||
m_UsePlatformSpecificProtocols: 0
|
||||
m_InitialBandwidth: 0
|
||||
m_BandwidthPeakFactor: 2
|
||||
m_WebSocketReceiveBufferMaxSize: 0
|
||||
m_UdpSocketReceiveBufferMaxSize: 0
|
||||
m_SSLCertFilePath:
|
||||
m_SSLPrivateKeyFilePath:
|
||||
m_SSLCAFilePath:
|
||||
m_Channels: []
|
||||
m_GlobalConfig:
|
||||
m_ThreadAwakeTimeout: 1
|
||||
m_ReactorModel: 0
|
||||
m_ReactorMaximumReceivedMessages: 1024
|
||||
m_ReactorMaximumSentMessages: 1024
|
||||
m_MaxPacketSize: 2000
|
||||
m_MaxHosts: 16
|
||||
m_ThreadPoolSize: 1
|
||||
m_MinTimerTimeout: 1
|
||||
m_MaxTimerTimeout: 12000
|
||||
m_MinNetSimulatorTimeout: 1
|
||||
m_MaxNetSimulatorTimeout: 12000
|
||||
m_Channels:
|
||||
m_UseWebSockets: 0
|
||||
m_UseSimulator: 0
|
||||
m_SimulatedLatency: 1
|
||||
m_PacketLossPercentage: 0
|
||||
m_MaxBufferedPackets: 16
|
||||
m_AllowFragmentation: 1
|
||||
m_MatchHost: mm.unet.unity3d.com
|
||||
m_MatchPort: 443
|
||||
matchName: default
|
||||
matchSize: 4
|
||||
isNetworkActive: 0
|
||||
matchMaker: {fileID: 0}
|
||||
--- !u!114 &114828621977405986
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1132703936793558}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 227461547, guid: dc443db3e92b4983b9738c1131f555cb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
manager: {fileID: 0}
|
||||
showGUI: 1
|
||||
offsetX: 0
|
||||
offsetY: 0
|
145
UnityProject/Assets/NetworkStickPivot.prefab
Normal file
145
UnityProject/Assets/NetworkStickPivot.prefab
Normal file
@ -0,0 +1,145 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 1090234045396036}
|
||||
m_IsPrefabParent: 1
|
||||
--- !u!1 &1090234045396036
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4861908766607676}
|
||||
- component: {fileID: 114776716490827172}
|
||||
- component: {fileID: 114707895602265710}
|
||||
- component: {fileID: 114066784277533506}
|
||||
m_Layer: 0
|
||||
m_Name: NetworkStickPivot
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1398554461463986
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4255213334802058}
|
||||
m_Layer: 0
|
||||
m_Name: NetworkStickTip
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4255213334802058
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1398554461463986}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 2}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4861908766607676}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!4 &4861908766607676
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1090234045396036}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 4255213334802058}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &114066784277533506
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1090234045396036}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -1267208747, guid: dc443db3e92b4983b9738c1131f555cb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Target: {fileID: 4255213334802058}
|
||||
m_ChildIndex: 0
|
||||
m_SendInterval: 0.1
|
||||
m_SyncRotationAxis: 7
|
||||
m_RotationSyncCompression: 0
|
||||
m_MovementThreshold: 0.001
|
||||
m_InterpolateRotation: 0.5
|
||||
m_InterpolateMovement: 0.5
|
||||
--- !u!114 &114707895602265710
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1090234045396036}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -1768714887, guid: dc443db3e92b4983b9738c1131f555cb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_TransformSyncMode: 1
|
||||
m_SendInterval: 0.1
|
||||
m_SyncRotationAxis: 7
|
||||
m_RotationSyncCompression: 0
|
||||
m_SyncSpin: 0
|
||||
m_MovementTheshold: 0.001
|
||||
m_VelocityThreshold: 0.0001
|
||||
m_SnapThreshold: 5
|
||||
m_InterpolateRotation: 1
|
||||
m_InterpolateMovement: 1
|
||||
--- !u!114 &114776716490827172
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1090234045396036}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 372142912, guid: dc443db3e92b4983b9738c1131f555cb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_SceneId:
|
||||
m_Value: 0
|
||||
m_AssetId:
|
||||
i0: 204
|
||||
i1: 169
|
||||
i2: 17
|
||||
i3: 113
|
||||
i4: 188
|
||||
i5: 6
|
||||
i6: 94
|
||||
i7: 84
|
||||
i8: 155
|
||||
i9: 12
|
||||
i10: 94
|
||||
i11: 184
|
||||
i12: 234
|
||||
i13: 184
|
||||
i14: 51
|
||||
i15: 69
|
||||
m_ServerOnly: 0
|
||||
m_LocalPlayerAuthority: 1
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6705c39db589b85468dc38f95f4010b7
|
||||
guid: cca91171bc065e549b0c5eb8eab83345
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
Loading…
x
Reference in New Issue
Block a user