提交修改

This commit is contained in:
2026-04-06 11:52:41 +08:00
parent ae3002a0e2
commit bfebce8827
7 changed files with 244 additions and 329 deletions

View File

@@ -56,6 +56,7 @@ MonoBehaviour:
- NBC.Core
- NBC.Lan
- NBC.UI
- Obi
- OccaSoftware.SuperSimpleSkybox.Demo
- OccaSoftware.SuperSimpleSkybox.Runtime
- StompyRobot.SRDebugger

View File

@@ -9,8 +9,12 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 4439867113915692}
- component: {fileID: 114581403422500557}
- component: {fileID: 991521994724602848}
- component: {fileID: 7512747747558374231}
- component: {fileID: 4152263255956822405}
- component: {fileID: 1834268156193687292}
- component: {fileID: 3172148776129334411}
- component: {fileID: 6036949868262095138}
- component: {fileID: 6177856378563311579}
m_Layer: 19
m_Name: Fishing Line
m_TagString: Untagged
@@ -33,7 +37,7 @@ Transform:
m_Children: []
m_Father: {fileID: 4283454774123242}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &114581403422500557
--- !u!114 &7512747747558374231
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -42,161 +46,113 @@ MonoBehaviour:
m_GameObject: {fileID: 1017528709445045}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 98ba9d435a0e49c9bb527c34cc91894d, type: 3}
m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3}
m_Name:
m_EditorClassIdentifier:
startAnchor: {fileID: 0}
endAnchor: {fileID: 54298866000586118}
LineMultiple: 1
physicsSegmentLen: 0.1
minPhysicsNodes: 2
maxPhysicsNodes: 200
gravityStrength: 6
velocityDampen: 0.95
stiffness: 0.8
iterations: 10
initialLength: 0
lengthSmoothTime: 0.15
lengthChangeVelocityKill: 0.4
minSlack: 0.002
headMinLen: 0.01
nodeHysteresis: 0.05
constrainToGround: 1
groundMask:
serializedVersion: 2
m_Bits: 24
groundRadius: 0.01
groundCastHeight: 1
groundCastDistance: 2.5
groundSampleStep: 3
groundInterpolate: 1
groundUpdateEvery: 1
constrainToWaterSurface: 1
waterLevelY: 0
waterSurfaceOffset: 0.002
waterSampleStep: 2
waterInterpolate: 1
waterUpdateEvery: 1
waterLiftStrength: 0.25
keepStartAdjacentNodeFollow: 1
waterPostConstraintIterations: 2
renderSubdivisionsIdle: 6
renderSubdivisionsMoving: 2
movingSpeedThreshold: 2
smooth: 1
lineWidth: 0.001
airDrag: 0.2
airDragXZ: 0.6
--- !u!120 &991521994724602848
LineRenderer:
serializedVersion: 2
m_EditorClassIdentifier: Obi::Obi.ObiRope
solverIndices:
m_CollisionMaterial: {fileID: 0}
m_SurfaceCollisions: 0
m_SelfCollisions: 0
restLength_: 0
elements: []
m_RopeBlueprint: {fileID: 0}
tearingEnabled: 0
tearResistanceMultiplier: 1000
tearRate: 1
_distanceConstraintsEnabled: 1
_stretchingScale: 1
_stretchCompliance: 0
_maxCompression: 0
_bendConstraintsEnabled: 1
_bendCompliance: 0
_maxBending: 0.025
_plasticYield: 0
_plasticCreep: 0
--- !u!114 &4152263255956822405
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1017528709445045}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 0
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Positions:
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 1}
m_Parameters:
serializedVersion: 3
widthMultiplier: 1
widthCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
colorGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_ColorSpace: -1
m_NumColorKeys: 2
m_NumAlphaKeys: 2
numCornerVertices: 0
numCapVertices: 0
alignment: 0
textureMode: 0
textureScale: {x: 1, y: 1}
shadowBias: 0.5
generateLightingData: 0
m_MaskInteraction: 0
m_UseWorldSpace: 1
m_Loop: 0
m_ApplyActiveColorSpace: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3}
m_Name:
m_EditorClassIdentifier: Obi::Obi.ObiPathSmoother
decimation: 0
smoothing: 0
twist: 0
--- !u!114 &1834268156193687292
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1017528709445045}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3}
m_Name:
m_EditorClassIdentifier: Obi::Obi.ObiParticleAttachment
m_Actor: {fileID: 7512747747558374231}
m_Target: {fileID: 0}
m_ParticleGroup: {fileID: 0}
m_AttachmentType: 0
m_ConstrainOrientation: 0
m_Compliance: 0
m_BreakThreshold: Infinity
--- !u!114 &3172148776129334411
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1017528709445045}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3}
m_Name:
m_EditorClassIdentifier: Obi::Obi.ObiParticleAttachment
m_Actor: {fileID: 7512747747558374231}
m_Target: {fileID: 0}
m_ParticleGroup: {fileID: 0}
m_AttachmentType: 0
m_ConstrainOrientation: 0
m_Compliance: 0
m_BreakThreshold: Infinity
--- !u!114 &6036949868262095138
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1017528709445045}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8285ac97113f74d449053378d0e3a56b, type: 3}
m_Name:
m_EditorClassIdentifier: Obi::Obi.ObiRopeCursor
m_CursorMu: 0
m_SourceMu: 0
direction: 1
--- !u!114 &6177856378563311579
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1017528709445045}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8b7f9ea147004095b3e8390654d061a9, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::NBF.RopeByObi
startAnchor: {fileID: 0}
endAnchor: {fileID: 54298866000586118}
rope: {fileID: 0}
cursor: {fileID: 0}
percentageElasticity: 0.2
--- !u!1 &1035052809208993
GameObject:
m_ObjectHideFlags: 0
@@ -465,11 +421,12 @@ MonoBehaviour:
LineType: 0
isLureConnect: 0
rodLine: {fileID: 4922671409596527468}
fishingRope: {fileID: 114581403422500557}
bobberRope: {fileID: 114504105083509877}
fishingRope: {fileID: 6177856378563311579}
bobberRope: {fileID: 4209459111445781705}
Lure: {fileID: 1923684598771359451}
Bobber: {fileID: 2717383850592950062}
PinchController: {fileID: 2475726686148443307}
LinelenghtDiferent: 0
--- !u!114 &3273975985231415050
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -730,8 +687,12 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 4110509859352936}
- component: {fileID: 114504105083509877}
- component: {fileID: 484878994603287356}
- component: {fileID: 7897685739332669636}
- component: {fileID: 6553475154293413261}
- component: {fileID: 7487208804760399517}
- component: {fileID: 4473550101389607092}
- component: {fileID: 1259514311421060895}
- component: {fileID: 4209459111445781705}
m_Layer: 0
m_Name: Float Line
m_TagString: Untagged
@@ -754,7 +715,7 @@ Transform:
m_Children: []
m_Father: {fileID: 4283454774123242}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &114504105083509877
--- !u!114 &7897685739332669636
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -763,161 +724,113 @@ MonoBehaviour:
m_GameObject: {fileID: 1933124697579601}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 98ba9d435a0e49c9bb527c34cc91894d, type: 3}
m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3}
m_Name:
m_EditorClassIdentifier:
startAnchor: {fileID: 54298866000586118}
endAnchor: {fileID: 54679398375713381}
LineMultiple: 1
physicsSegmentLen: 0.1
minPhysicsNodes: 2
maxPhysicsNodes: 120
gravityStrength: 6
velocityDampen: 0.95
stiffness: 0.8
iterations: 10
initialLength: 0
lengthSmoothTime: 0.15
lengthChangeVelocityKill: 0.4
minSlack: 0.002
headMinLen: 0.01
nodeHysteresis: 0.05
constrainToGround: 1
groundMask:
serializedVersion: 2
m_Bits: 8
groundRadius: 0.01
groundCastHeight: 1
groundCastDistance: 2.5
groundSampleStep: 3
groundInterpolate: 1
groundUpdateEvery: 1
constrainToWaterSurface: 0
waterLevelY: 0
waterSurfaceOffset: 0.002
waterSampleStep: 2
waterInterpolate: 1
waterUpdateEvery: 1
waterLiftStrength: 0.25
keepStartAdjacentNodeFollow: 1
waterPostConstraintIterations: 2
renderSubdivisionsIdle: 6
renderSubdivisionsMoving: 2
movingSpeedThreshold: 2
smooth: 1
lineWidth: 0.001
airDrag: 0.9
airDragXZ: 0.6
--- !u!120 &484878994603287356
LineRenderer:
serializedVersion: 2
m_EditorClassIdentifier: Obi::Obi.ObiRope
solverIndices:
m_CollisionMaterial: {fileID: 0}
m_SurfaceCollisions: 0
m_SelfCollisions: 0
restLength_: 0
elements: []
m_RopeBlueprint: {fileID: 0}
tearingEnabled: 0
tearResistanceMultiplier: 1000
tearRate: 1
_distanceConstraintsEnabled: 1
_stretchingScale: 1
_stretchCompliance: 0
_maxCompression: 0
_bendConstraintsEnabled: 1
_bendCompliance: 0
_maxBending: 0.025
_plasticYield: 0
_plasticCreep: 0
--- !u!114 &6553475154293413261
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1933124697579601}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 0
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Positions:
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 1}
m_Parameters:
serializedVersion: 3
widthMultiplier: 1
widthCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
colorGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_ColorSpace: -1
m_NumColorKeys: 2
m_NumAlphaKeys: 2
numCornerVertices: 0
numCapVertices: 0
alignment: 0
textureMode: 0
textureScale: {x: 1, y: 1}
shadowBias: 0.5
generateLightingData: 0
m_MaskInteraction: 0
m_UseWorldSpace: 1
m_Loop: 0
m_ApplyActiveColorSpace: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3}
m_Name:
m_EditorClassIdentifier: Obi::Obi.ObiPathSmoother
decimation: 0
smoothing: 0
twist: 0
--- !u!114 &7487208804760399517
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1933124697579601}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3}
m_Name:
m_EditorClassIdentifier: Obi::Obi.ObiParticleAttachment
m_Actor: {fileID: 7897685739332669636}
m_Target: {fileID: 0}
m_ParticleGroup: {fileID: 0}
m_AttachmentType: 0
m_ConstrainOrientation: 0
m_Compliance: 0
m_BreakThreshold: Infinity
--- !u!114 &4473550101389607092
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1933124697579601}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3}
m_Name:
m_EditorClassIdentifier: Obi::Obi.ObiParticleAttachment
m_Actor: {fileID: 7897685739332669636}
m_Target: {fileID: 0}
m_ParticleGroup: {fileID: 0}
m_AttachmentType: 0
m_ConstrainOrientation: 0
m_Compliance: 0
m_BreakThreshold: Infinity
--- !u!114 &1259514311421060895
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1933124697579601}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8285ac97113f74d449053378d0e3a56b, type: 3}
m_Name:
m_EditorClassIdentifier: Obi::Obi.ObiRopeCursor
m_CursorMu: 0
m_SourceMu: 0
direction: 1
--- !u!114 &4209459111445781705
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1933124697579601}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8b7f9ea147004095b3e8390654d061a9, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::NBF.RopeByObi
startAnchor: {fileID: 54298866000586118}
endAnchor: {fileID: 54298866000586118}
rope: {fileID: 0}
cursor: {fileID: 0}
percentageElasticity: 0.2
--- !u!1 &1943073364215513
GameObject:
m_ObjectHideFlags: 0
@@ -953,7 +866,7 @@ Transform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!120 &120710333716555736
LineRenderer:
serializedVersion: 2
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@@ -999,6 +912,7 @@ LineRenderer:
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_Positions:
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 1}
@@ -1057,7 +971,6 @@ LineRenderer:
textureScale: {x: 1, y: 1}
shadowBias: 0.5
generateLightingData: 0
m_MaskInteraction: 0
m_UseWorldSpace: 1
m_Loop: 0
m_ApplyActiveColorSpace: 1

View File

@@ -26,12 +26,12 @@ namespace NBF
/// <summary>
/// 主线
/// </summary>
[SerializeField] private Rope fishingRope;
[SerializeField] private RopeBase fishingRope;
/// <summary>
/// 浮漂和鱼钩线
/// </summary>
[SerializeField] private Rope bobberRope;
[SerializeField] private RopeBase bobberRope;
public LureController Lure;
public BobberController Bobber;
@@ -129,13 +129,13 @@ namespace NBF
// value -= 0.2f;
}
fishingRope.SetTargetLength(value);
fishingRope.SetLineLength(value);
}
public void SetLureLength(float value)
{
Log.Error($"SetObiRopeStretch={value}");
bobberRope.SetTargetLength(value);
bobberRope.SetLineLength(value);
}

View File

@@ -1,12 +0,0 @@
using UnityEngine;
namespace NBF
{
/// <summary>
/// 鱼线脚本
/// </summary>
public interface IRope
{
void SetLineLength(float length);
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: e702dc5afb0a467e9e01a920d959a977
timeCreated: 1775445873

View File

@@ -2,21 +2,38 @@
namespace NBF
{
public abstract class RopeBase : MonoBehaviour, IRope
public abstract class RopeBase : MonoBehaviour
{
[Header("Anchors")] [SerializeField] public Rigidbody startAnchor;
[SerializeField] public Rigidbody endAnchor;
public float CurrentLength { get; protected set; }
protected FRod Rod;
public void Init(FRod rod)
{
Rod = rod;
OnInit();
}
public void SetLineLength(float length)
{
CurrentLength = length;
}
public float GetCurrentLength()
{
return CurrentLength;
}
protected virtual void OnInit()
{
}
protected virtual void OnSetLineLength(float length)
{
}
}
}

View File

@@ -13,8 +13,7 @@ namespace NBF
[SerializeField] private ObiRopeCursor cursor;
[SerializeField] private float percentageElasticity = 0.2f;
private float _stretchScale;
private void Awake()