diff --git a/Assets/Animated Trees Package/DemoSceneContent/controls.png.meta b/Assets/Animated Trees Package/DemoSceneContent/controls.png.meta index 15f5d002a..2fe55b14a 100644 --- a/Assets/Animated Trees Package/DemoSceneContent/controls.png.meta +++ b/Assets/Animated Trees Package/DemoSceneContent/controls.png.meta @@ -3,7 +3,7 @@ guid: 16045556d23cce541aaa11b5f7ae8d4e TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 10 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +20,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +34,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -54,11 +57,17 @@ TextureImporter: textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 2048 resizeAlgorithm: 0 @@ -68,9 +77,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 @@ -80,10 +90,11 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Windows Store Apps + - serializedVersion: 4 + buildTarget: WindowsStoreApps maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -92,9 +103,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: tvOS maxTextureSize: 2048 resizeAlgorithm: 0 @@ -104,10 +116,11 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: iPhone + - serializedVersion: 4 + buildTarget: iOS maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -116,9 +129,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Lumin maxTextureSize: 2048 resizeAlgorithm: 0 @@ -128,9 +142,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 2048 resizeAlgorithm: 0 @@ -140,9 +155,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: WebGL maxTextureSize: 2048 resizeAlgorithm: 0 @@ -152,12 +168,14 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -167,9 +185,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Assets/Animated Trees Package/DemoSceneContent/cursorZone.png.meta b/Assets/Animated Trees Package/DemoSceneContent/cursorZone.png.meta index 1c9fc46a3..03c050505 100644 --- a/Assets/Animated Trees Package/DemoSceneContent/cursorZone.png.meta +++ b/Assets/Animated Trees Package/DemoSceneContent/cursorZone.png.meta @@ -3,7 +3,7 @@ guid: 857bcc75498f5cc44b3630460316425c TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 10 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -20,9 +20,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +34,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -54,11 +57,17 @@ TextureImporter: textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 2048 resizeAlgorithm: 0 @@ -68,9 +77,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 @@ -80,10 +90,11 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: Windows Store Apps + - serializedVersion: 4 + buildTarget: WindowsStoreApps maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -92,9 +103,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: tvOS maxTextureSize: 2048 resizeAlgorithm: 0 @@ -104,10 +116,11 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 - buildTarget: iPhone + - serializedVersion: 4 + buildTarget: iOS maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 @@ -116,9 +129,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Lumin maxTextureSize: 2048 resizeAlgorithm: 0 @@ -128,9 +142,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Android maxTextureSize: 2048 resizeAlgorithm: 0 @@ -140,9 +155,10 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: WebGL maxTextureSize: 2048 resizeAlgorithm: 0 @@ -152,12 +168,14 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -167,9 +185,11 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] - spritePackingTag: + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Assets/Plugins/Easy Save 3/Resources/ES3/ES3Defaults.asset b/Assets/Plugins/Easy Save 3/Resources/ES3/ES3Defaults.asset index 7e52a6dc9..28dde97b4 100644 --- a/Assets/Plugins/Easy Save 3/Resources/ES3/ES3Defaults.asset +++ b/Assets/Plugins/Easy Save 3/Resources/ES3/ES3Defaults.asset @@ -60,14 +60,11 @@ MonoBehaviour: - NBC.Core - NBC.Lan - NBC.UI - - Obious.Soap.Example - - Obvious.Soap - OccaSoftware.SuperSimpleSkybox.Demo - OccaSoftware.SuperSimpleSkybox.Runtime - Rowlan.MicroVerse.Presets.Runtime - Rowlan.MicroVerse.Presets_2.Runtime - Rowlan.MicroVerse.Presets_3.Runtime - - sc.terrain.painter.runtime - StompyRobot.SRDebugger - StompyRobot.SRF - Unity.InputSystem.RebindingUI diff --git a/Assets/Scenes/BobberTest.unity b/Assets/Scenes/BobberTest.unity index 6b6ef7717..98168cbad 100644 --- a/Assets/Scenes/BobberTest.unity +++ b/Assets/Scenes/BobberTest.unity @@ -119,6 +119,11 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!4 &28933281 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4046715926785936, guid: da82677cd9d390e4e81995edcb703557, type: 3} + m_PrefabInstance: {fileID: 1591368047} + m_PrefabAsset: {fileID: 0} --- !u!1 &203844586 GameObject: m_ObjectHideFlags: 0 @@ -246,6 +251,11 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!4 &207925356 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4916128310923789, guid: c04ce4d92e8236f4d92e9dded282fe4f, type: 3} + m_PrefabInstance: {fileID: 1384521324} + m_PrefabAsset: {fileID: 0} --- !u!1 &961739749 GameObject: m_ObjectHideFlags: 0 @@ -377,13 +387,70 @@ Transform: m_GameObject: {fileID: 961739749} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0.03, z: -0.31} + m_LocalPosition: {x: 0, y: 0, z: -1.95} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &2113762189 +--- !u!1001 &1384521324 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 8114758377478902151} + m_Modifications: + - target: {fileID: 1951849957809749, guid: c04ce4d92e8236f4d92e9dded282fe4f, type: 3} + propertyPath: m_Name + value: c_hook_20789 + objectReference: {fileID: 0} + - target: {fileID: 4916128310923789, guid: c04ce4d92e8236f4d92e9dded282fe4f, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4916128310923789, guid: c04ce4d92e8236f4d92e9dded282fe4f, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4916128310923789, guid: c04ce4d92e8236f4d92e9dded282fe4f, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4916128310923789, guid: c04ce4d92e8236f4d92e9dded282fe4f, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4916128310923789, guid: c04ce4d92e8236f4d92e9dded282fe4f, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4916128310923789, guid: c04ce4d92e8236f4d92e9dded282fe4f, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4916128310923789, guid: c04ce4d92e8236f4d92e9dded282fe4f, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4916128310923789, guid: c04ce4d92e8236f4d92e9dded282fe4f, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4916128310923789, guid: c04ce4d92e8236f4d92e9dded282fe4f, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4916128310923789, guid: c04ce4d92e8236f4d92e9dded282fe4f, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c04ce4d92e8236f4d92e9dded282fe4f, type: 3} +--- !u!1 &1518432884 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -391,24 +458,54 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 2113762193} - - component: {fileID: 2113762192} - - component: {fileID: 2113762191} - - component: {fileID: 2113762190} + - component: {fileID: 1518432889} + - component: {fileID: 1518432888} + - component: {fileID: 1518432887} + - component: {fileID: 1518432886} + - component: {fileID: 1518432885} + - component: {fileID: 1518432890} + - component: {fileID: 1518432891} m_Layer: 0 - m_Name: Sphere + m_Name: Tip m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!135 &2113762190 +--- !u!54 &1518432885 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1518432884} + serializedVersion: 5 + m_Mass: 1 + m_LinearDamping: 0 + m_AngularDamping: 0.05 + m_CenterOfMass: {x: 0, y: 0, z: 0} + m_InertiaTensor: {x: 1, y: 1, z: 1} + m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ImplicitCom: 1 + m_ImplicitTensor: 1 + m_UseGravity: 0 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!135 &1518432886 SphereCollider: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2113762189} + m_GameObject: {fileID: 1518432884} m_Material: {fileID: 0} m_IncludeLayers: serializedVersion: 2 @@ -423,13 +520,13 @@ SphereCollider: serializedVersion: 3 m_Radius: 0.5 m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &2113762191 +--- !u!23 &1518432887 MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2113762189} + m_GameObject: {fileID: 1518432884} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 @@ -471,29 +568,227 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &2113762192 +--- !u!33 &1518432888 MeshFilter: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2113762189} + m_GameObject: {fileID: 1518432884} m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &2113762193 +--- !u!4 &1518432889 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2113762189} + m_GameObject: {fileID: 1518432884} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.0198, y: -0.0075, z: 0.0278} + m_LocalPosition: {x: 0, y: 0.3, z: 0} m_LocalScale: {x: 0.01, y: 0.01, z: 0.01} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1518432890 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1518432884} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5e21f6b9b3c2483e92fdf2f3dfdcce62, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::Test.BobberTest + rb: {fileID: 1518432885} + line: {fileID: 8144283643417267672} + lineLength: 1 + floatLength: 0.5 +--- !u!114 &1518432891 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1518432884} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a1300e9b5a5c347408708087176324c0, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::FlatWaterHeightProvider + waterY: 0 +--- !u!1001 &1591368047 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 8107394097429219735} + m_Modifications: + - target: {fileID: 1818732215012226, guid: da82677cd9d390e4e81995edcb703557, type: 3} + propertyPath: m_Name + value: bob_25002 + objectReference: {fileID: 0} + - target: {fileID: 4046715926785936, guid: da82677cd9d390e4e81995edcb703557, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4046715926785936, guid: da82677cd9d390e4e81995edcb703557, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4046715926785936, guid: da82677cd9d390e4e81995edcb703557, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4046715926785936, guid: da82677cd9d390e4e81995edcb703557, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4046715926785936, guid: da82677cd9d390e4e81995edcb703557, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4046715926785936, guid: da82677cd9d390e4e81995edcb703557, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4046715926785936, guid: da82677cd9d390e4e81995edcb703557, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4046715926785936, guid: da82677cd9d390e4e81995edcb703557, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4046715926785936, guid: da82677cd9d390e4e81995edcb703557, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4046715926785936, guid: da82677cd9d390e4e81995edcb703557, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: da82677cd9d390e4e81995edcb703557, type: 3} +--- !u!1 &1683191724 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1683191728} + - component: {fileID: 1683191727} + - component: {fileID: 1683191726} + - component: {fileID: 1683191725} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!64 &1683191725 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1683191724} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 0 + serializedVersion: 5 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1683191726 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1683191724} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + 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: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + 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_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1683191727 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1683191724} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1683191728 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1683191724} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &2709071706889968141 BoxCollider: m_ObjectHideFlags: 0 @@ -634,7 +929,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &3065509872725565573 Transform: m_ObjectHideFlags: 0 @@ -917,6 +1212,995 @@ MonoBehaviour: uprightDamping: 1.2 layDownThreshold: 0.15 layDownUprightMultiplier: 0.2 +--- !u!114 &3802146767125466631 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8112602444043959218} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5625b86b9e4b4482b82d83b962d0c873, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::RodLine +--- !u!114 &6135364979465448005 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8112599368562234729} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8e9411b5edc6466a8014c59e3821bbaa, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::NBF.BobberController + _rbody: {fileID: 8094040829892155629} + joint: {fileID: 8264424693587136966} +--- !u!114 &7647511515837834160 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8111135382106896842} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ed5bbbc032ec4ca1bb56991d9141e311, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::NBF.LureController + rBody: {fileID: 8093361435069273870} + joint: {fileID: 8264839114692736908} +--- !u!54 &8093361435069273870 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8111135382106896842} + serializedVersion: 5 + m_Mass: 0.01 + m_LinearDamping: 1 + m_AngularDamping: 0.1 + m_CenterOfMass: {x: 0, y: 0, z: 0} + m_InertiaTensor: {x: 0.001, y: 0.001, z: 0.001} + m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ImplicitCom: 1 + m_ImplicitTensor: 0 + m_UseGravity: 0 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 2 +--- !u!54 &8094040829892155629 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8112599368562234729} + serializedVersion: 5 + m_Mass: 0.1 + m_LinearDamping: 1 + m_AngularDamping: 0.1 + m_CenterOfMass: {x: 0, y: 0, z: 0} + m_InertiaTensor: {x: 0.001, y: 0.001, z: 0.001} + m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ImplicitCom: 1 + m_ImplicitTensor: 0 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 2 +--- !u!4 &8107363338062326325 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8112602444043959218} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8114378222086924161} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &8107394097429219735 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8112599368562234729} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 28933281} + m_Father: {fileID: 8114378222086924161} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &8111135382106896842 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8114758377478902151} + - component: {fileID: 8093361435069273870} + - component: {fileID: 8264839114692736908} + - component: {fileID: 8174519546569408267} + - component: {fileID: 7647511515837834160} + m_Layer: 7 + m_Name: Lure + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &8111188160045074654 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8114608907164186695} + - component: {fileID: 8143692206562876326} + - component: {fileID: 9030209593537121931} + m_Layer: 19 + m_Name: Fishing Line + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &8112599368562234729 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8107394097429219735} + - component: {fileID: 8094040829892155629} + - component: {fileID: 8264424693587136966} + - component: {fileID: 6135364979465448005} + - component: {fileID: 8264424693587136967} + m_Layer: 16 + m_Name: Float + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &8112602444043959218 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8107363338062326325} + - component: {fileID: 8160521079362017971} + - component: {fileID: 3802146767125466631} + m_Layer: 0 + m_Name: Rod Line + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &8112665101933665594 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8114850716269546499} + - component: {fileID: 8144174056997036318} + - component: {fileID: 8514482975972367959} + m_Layer: 0 + m_Name: Float Line + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!1 &8113175342759564802 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8114378222086924161} + - component: {fileID: 8144283643417267672} + m_Layer: 0 + m_Name: fishing line float set + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8114378222086924161 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8113175342759564802} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8107363338062326325} + - {fileID: 8114608907164186695} + - {fileID: 8114850716269546499} + - {fileID: 8114758377478902151} + - {fileID: 8107394097429219735} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &8114608907164186695 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8111188160045074654} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8114378222086924161} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &8114758377478902151 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8111135382106896842} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -1.5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 207925356} + m_Father: {fileID: 8114378222086924161} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &8114850716269546499 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8112665101933665594} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: -1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8114378222086924161} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &8143692206562876326 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8111188160045074654} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 98ba9d435a0e49c9bb527c34cc91894d, type: 3} + m_Name: + m_EditorClassIdentifier: + startAnchor: {fileID: 1518432885} + endAnchor: {fileID: 8094040829892155629} + LineMultiple: 2 + 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: 2 + renderSubdivisionsIdle: 6 + renderSubdivisionsMoving: 2 + movingSpeedThreshold: 2 + smooth: 1 + lineWidth: 0.001 + airDrag: 0.2 + airDragXZ: 0.6 +--- !u!114 &8144174056997036318 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8112665101933665594} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 98ba9d435a0e49c9bb527c34cc91894d, type: 3} + m_Name: + m_EditorClassIdentifier: + startAnchor: {fileID: 8094040829892155629} + endAnchor: {fileID: 8093361435069273870} + LineMultiple: 2 + physicsSegmentLen: 0.2 + minPhysicsNodes: 2 + maxPhysicsNodes: 120 + gravityStrength: 6 + velocityDampen: 0.95 + stiffness: 0.8 + iterations: 10 + initialLength: 0 + lengthSmoothTime: 0.15 + lengthChangeVelocityKill: 0.6 + 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: 2 + renderSubdivisionsIdle: 6 + renderSubdivisionsMoving: 2 + movingSpeedThreshold: 2 + smooth: 1 + lineWidth: 0.001 + airDrag: 0.9 + airDragXZ: 0.6 +--- !u!114 &8144283643417267672 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8113175342759564802} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c0403ffd74ce46fab8bd4ef057e51432, type: 3} + m_Name: + m_EditorClassIdentifier: + isLureConnect: 0 + rodLine: {fileID: 3802146767125466631} + fishingRope: {fileID: 8143692206562876326} + bobberRope: {fileID: 8144174056997036318} + Lure: {fileID: 7647511515837834160} + Bobber: {fileID: 6135364979465448005} +--- !u!120 &8160521079362017971 +LineRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8112602444043959218} + m_Enabled: 0 + 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: 2100000, guid: 4be07647ecdb4b845a9e0fbc74bb0e0a, type: 2} + 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: 0 + 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 +--- !u!135 &8174519546569408267 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8111135382106896842} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Radius: 0.003 + m_Center: {x: 0, y: -0.0015, z: 0} +--- !u!153 &8264424693587136966 +ConfigurableJoint: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8112599368562234729} + serializedVersion: 4 + m_ConnectedBody: {fileID: 0} + m_ConnectedArticulationBody: {fileID: 0} + m_Anchor: {x: 0, y: -0.01, z: 0} + m_Axis: {x: 0, y: 0, z: 0} + m_AutoConfigureConnectedAnchor: 0 + m_ConnectedAnchor: {x: 0, y: 0, z: 0} + m_SecondaryAxis: {x: 0, y: 0, z: 0} + m_XMotion: 1 + m_YMotion: 1 + m_ZMotion: 1 + m_AngularXMotion: 2 + m_AngularYMotion: 2 + m_AngularZMotion: 2 + m_LinearLimitSpring: + spring: 0 + damper: 0 + m_LinearLimit: + limit: 0.5 + bounciness: 0 + contactDistance: 0 + m_AngularXLimitSpring: + spring: 0 + damper: 0 + m_LowAngularXLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_HighAngularXLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_AngularYZLimitSpring: + spring: 0 + damper: 0 + m_AngularYLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_AngularZLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_TargetPosition: {x: 0, y: 0, z: 0} + m_TargetVelocity: {x: 0, y: 0, z: 0} + m_XDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_YDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_ZDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_TargetRotation: {x: 0, y: 0, z: 0, w: 1} + m_TargetAngularVelocity: {x: 0, y: 0, z: 0} + m_RotationDriveMode: 0 + m_AngularXDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_AngularYZDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_SlerpDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_ProjectionMode: 1 + m_ProjectionDistance: 0 + m_ProjectionAngle: 0 + m_ConfiguredInWorldSpace: 0 + m_SwapBodies: 0 + m_BreakForce: Infinity + m_BreakTorque: Infinity + m_EnableCollision: 0 + m_EnablePreprocessing: 0 + m_MassScale: 1 + m_ConnectedMassScale: 1 +--- !u!114 &8264424693587136967 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8112599368562234729} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0d2d3d7643d84524b8841fcf62193a04, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::BobberBuoyancy + waterLevel: 0 + waterFlow: {x: 0, y: 0, z: 0} + bobberHeight: 0.18 + maxBuoyancy: 12 + buoyancyMultiplier: 1 + waterDrag: 0.7 + waterAngularDrag: 0.4 + verticalDamping: 4 + uprightStrength: 8 + uprightDamping: 1.2 + layDownThreshold: 0.15 + layDownUprightMultiplier: 0.2 +--- !u!153 &8264839114692736908 +ConfigurableJoint: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8111135382106896842} + serializedVersion: 4 + m_ConnectedBody: {fileID: 8094040829892155629} + m_ConnectedArticulationBody: {fileID: 0} + m_Anchor: {x: 0, y: 0, z: 0} + m_Axis: {x: 0, y: 0, z: 0} + m_AutoConfigureConnectedAnchor: 0 + m_ConnectedAnchor: {x: 0, y: 0, z: 0} + m_SecondaryAxis: {x: 0, y: 0, z: 0} + m_XMotion: 1 + m_YMotion: 1 + m_ZMotion: 1 + m_AngularXMotion: 2 + m_AngularYMotion: 2 + m_AngularZMotion: 2 + m_LinearLimitSpring: + spring: 0 + damper: 0 + m_LinearLimit: + limit: 0.5 + bounciness: 0 + contactDistance: 0 + m_AngularXLimitSpring: + spring: 0 + damper: 0 + m_LowAngularXLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_HighAngularXLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_AngularYZLimitSpring: + spring: 0 + damper: 0 + m_AngularYLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_AngularZLimit: + limit: 0 + bounciness: 0 + contactDistance: 0 + m_TargetPosition: {x: 0, y: 0, z: 0} + m_TargetVelocity: {x: 0, y: 0, z: 0} + m_XDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_YDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_ZDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_TargetRotation: {x: 0, y: 0, z: 0, w: 1} + m_TargetAngularVelocity: {x: 0, y: 0, z: 0} + m_RotationDriveMode: 0 + m_AngularXDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_AngularYZDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_SlerpDrive: + serializedVersion: 4 + positionSpring: 0 + positionDamper: 0 + maximumForce: 3.4028233e+38 + useAcceleration: 0 + m_ProjectionMode: 1 + m_ProjectionDistance: 0 + m_ProjectionAngle: 0 + m_ConfiguredInWorldSpace: 0 + m_SwapBodies: 0 + m_BreakForce: Infinity + m_BreakTorque: Infinity + m_EnableCollision: 0 + m_EnablePreprocessing: 0 + m_MassScale: 1 + m_ConnectedMassScale: 1 +--- !u!120 &8514482975972367959 +LineRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8112665101933665594} + 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: 2100000, guid: 95a26dca51ebe9c4da5949631fa36027, type: 2} + 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 +--- !u!120 &9030209593537121931 +LineRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8111188160045074654} + 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: 2100000, guid: 95a26dca51ebe9c4da5949631fa36027, type: 2} + 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 --- !u!1660057539 &9223372036854775807 SceneRoots: m_ObjectHideFlags: 0 @@ -924,4 +2208,6 @@ SceneRoots: - {fileID: 961739753} - {fileID: 203844589} - {fileID: 3065509872725565573} - - {fileID: 2113762193} + - {fileID: 8114378222086924161} + - {fileID: 1518432889} + - {fileID: 1683191728} diff --git a/Assets/Scripts/Editor/FloatBobberControllerEditor.cs b/Assets/Scripts/Editor/FloatBobberControllerEditor.cs index 87b998144..1e1f2cbc6 100644 --- a/Assets/Scripts/Editor/FloatBobberControllerEditor.cs +++ b/Assets/Scripts/Editor/FloatBobberControllerEditor.cs @@ -1,40 +1,40 @@ -using UnityEditor; -using UnityEngine; - -namespace NBF -{ - [CustomEditor(typeof(FloatBobberController))] - public class FloatBobberControllerEditor : Editor - { - private FloatBobberController _target; - void OnEnable() - { - _target = target as FloatBobberController; - // lookAtPoint = serializedObject.FindProperty("lookAtPoint"); - } - - public override void OnInspectorGUI() - { - base.OnInspectorGUI(); - if (GUILayout.Button("TriggerDownPulse")) - { - _target.TriggerDownPulse(); - } - if (GUILayout.Button("TriggerUpPulse")) - { - _target.TriggerUpPulse(); - } - if (GUILayout.Button("AddFishPull")) - { - _target.AddFishPull(0.5f); - } - if (GUILayout.Button("AddFishPull")) - { - _target.ReleaseFishPull(0.5f); - } - // serializedObject.Update(); - // EditorGUILayout.PropertyField(lookAtPoint); - // serializedObject.ApplyModifiedProperties(); - } - } -} \ No newline at end of file +// using UnityEditor; +// using UnityEngine; +// +// namespace NBF +// { +// [CustomEditor(typeof(FloatBobberController))] +// public class FloatBobberControllerEditor : Editor +// { +// private FloatBobberController _target; +// void OnEnable() +// { +// _target = target as FloatBobberController; +// // lookAtPoint = serializedObject.FindProperty("lookAtPoint"); +// } +// +// public override void OnInspectorGUI() +// { +// base.OnInspectorGUI(); +// if (GUILayout.Button("TriggerDownPulse")) +// { +// _target.TriggerDownPulse(); +// } +// if (GUILayout.Button("TriggerUpPulse")) +// { +// _target.TriggerUpPulse(); +// } +// if (GUILayout.Button("AddFishPull")) +// { +// _target.AddFishPull(0.5f); +// } +// if (GUILayout.Button("AddFishPull")) +// { +// _target.ReleaseFishPull(0.5f); +// } +// // serializedObject.Update(); +// // EditorGUILayout.PropertyField(lookAtPoint); +// // serializedObject.ApplyModifiedProperties(); +// } +// } +// } \ No newline at end of file diff --git a/Assets/Scripts/Editor/FloatBobberControllerProEditor.cs b/Assets/Scripts/Editor/FloatBobberControllerProEditor.cs index 725fce82b..00b977750 100644 --- a/Assets/Scripts/Editor/FloatBobberControllerProEditor.cs +++ b/Assets/Scripts/Editor/FloatBobberControllerProEditor.cs @@ -1,40 +1,40 @@ -using UnityEditor; -using UnityEngine; - -namespace NBF -{ - [CustomEditor(typeof(FloatBobberControllerPro))] - public class FloatBobberControllerProEditor : Editor - { - private FloatBobberControllerPro _target; - void OnEnable() - { - _target = target as FloatBobberControllerPro; - // lookAtPoint = serializedObject.FindProperty("lookAtPoint"); - } - - public override void OnInspectorGUI() - { - base.OnInspectorGUI(); - if (GUILayout.Button("TriggerDownPulse")) - { - _target.TriggerDownPulse(); - } - if (GUILayout.Button("TriggerUpPulse")) - { - _target.TriggerUpPulse(); - } - if (GUILayout.Button("AddFishPull")) - { - _target.AddFishPull(0.5f); - } - if (GUILayout.Button("AddFishPull")) - { - _target.ReleaseFishPull(0.5f); - } - // serializedObject.Update(); - // EditorGUILayout.PropertyField(lookAtPoint); - // serializedObject.ApplyModifiedProperties(); - } - } -} \ No newline at end of file +// using UnityEditor; +// using UnityEngine; +// +// namespace NBF +// { +// [CustomEditor(typeof(FloatBobberControllerPro))] +// public class FloatBobberControllerProEditor : Editor +// { +// private FloatBobberControllerPro _target; +// void OnEnable() +// { +// _target = target as FloatBobberControllerPro; +// // lookAtPoint = serializedObject.FindProperty("lookAtPoint"); +// } +// +// public override void OnInspectorGUI() +// { +// base.OnInspectorGUI(); +// if (GUILayout.Button("TriggerDownPulse")) +// { +// _target.TriggerDownPulse(); +// } +// if (GUILayout.Button("TriggerUpPulse")) +// { +// _target.TriggerUpPulse(); +// } +// if (GUILayout.Button("AddFishPull")) +// { +// _target.AddFishPull(0.5f); +// } +// if (GUILayout.Button("AddFishPull")) +// { +// _target.ReleaseFishPull(0.5f); +// } +// // serializedObject.Update(); +// // EditorGUILayout.PropertyField(lookAtPoint); +// // serializedObject.ApplyModifiedProperties(); +// } +// } +// } \ No newline at end of file diff --git a/Assets/Scripts/Fishing/Tackle/FLine.cs b/Assets/Scripts/Fishing/Tackle/FLine.cs index 964bca9e2..de3d18cb3 100644 --- a/Assets/Scripts/Fishing/Tackle/FLine.cs +++ b/Assets/Scripts/Fishing/Tackle/FLine.cs @@ -17,7 +17,7 @@ namespace NBF [SerializeField] private Rope bobberRope; public LureController Lure; public BobberController Bobber; - + private float _groundSetting = 0.5f; @@ -32,7 +32,6 @@ namespace NBF protected override void OnInit() { var tipRb = Rod.Asset.LineConnectorRigidbody; - // startParticleAttachment.target = tipRb.transform; if (isLureConnect) { Lure.SetJoint(tipRb); @@ -48,7 +47,6 @@ namespace NBF Lure.SetKinematic(false); } - // onLureInit.Raise(lure.gameObject); GetComponentsInChildren(includeInactive: true).ToList().ForEach(delegate(Transform i) { i.gameObject.SetActive(true); @@ -68,6 +66,40 @@ namespace NBF // rodLine.GenerateLineRendererRope(guides.ToArray(), _LineThickness); } + public void InitTest(Rigidbody tipRb) + { + if (isLureConnect) + { + Lure.SetJoint(tipRb); + Lure.EnableCollision(false); + } + else + { + fishingRope.startAnchor = tipRb; + Bobber.SetJoint(tipRb); + Lure.SetJoint(Bobber.rbody); + Lure.gameObject.SetActive(true); + Lure.EnableCollision(false); + Lure.SetKinematic(false); + } + + GetComponentsInChildren(includeInactive: true).ToList().ForEach(delegate(Transform i) + { + i.gameObject.SetActive(true); + }); + + StartCoroutine(LureUseGravity()); + if (isLureConnect) + { + fishingRope.Init(Rod); + } + else + { + fishingRope.Init(Rod); + bobberRope.Init(Rod); + } + } + private IEnumerator LureUseGravity() { yield return 1; @@ -89,7 +121,7 @@ namespace NBF public void SetObiRopeStretch(float value) { Log.Error($"SetObiRopeStretch={value}"); - fishingRope.SetTargetLength(value-0.2f); + fishingRope.SetTargetLength(value - 0.2f); } } } \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Common.meta b/Assets/Scripts/Fishing2~/Common.meta deleted file mode 100644 index 2924615b7..000000000 --- a/Assets/Scripts/Fishing2~/Common.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 0eb35ab0b70344b4a2b6054f7a7ecd1b -timeCreated: 1756822717 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Common/CameraComponent.cs b/Assets/Scripts/Fishing2~/Common/CameraComponent.cs deleted file mode 100644 index 4e8fba06d..000000000 --- a/Assets/Scripts/Fishing2~/Common/CameraComponent.cs +++ /dev/null @@ -1,98 +0,0 @@ -using Fantasy.Async; -using NBC; -using Fantasy.Entitas; -using Fantasy.Entitas.Interface; -using Fantasy.Event; -using UnityEngine; - -namespace NBF.Fishing2 -{ - public enum CameraShowMode - { - None = 0, - FPP, - TPP, - } - - public class CameraComponent : Entity - { - public CameraShowMode Mode = CameraShowMode.None; - - private CameraAsset _cameraAsset; - private CameraShowMode _lastMode = CameraShowMode.None; - - public class CameraComponentAwakeSystem : AwakeSystem - { - protected override void Awake(CameraComponent self) - { - self._cameraAsset = Game.Instance.gameObject.GetComponentInChildren(); - } - } - - public class CameraComponentUpdateSystem : UpdateSystem - { - protected override void Update(CameraComponent self) - { - self.UpdateCamera(); - } - } - - public class CameraComponentDestroySystem : DestroySystem - { - protected override void Destroy(CameraComponent self) - { - self._cameraAsset = null; - self._lastMode = CameraShowMode.None; - self.Mode = CameraShowMode.None; - } - } - - - private void UpdateCamera() - { - if (_lastMode == Mode) return; - if (Mode == CameraShowMode.TPP) - { - //第三人称视角 - SetTPPCam(); - } - else if (Mode == CameraShowMode.FPP) - { - //第一人称视角 - SetFPPCam(); - } - } - - - private void SetTPPCam() - { - _cameraAsset.fppVCam.Priority = 0; - _cameraAsset.tppVCam.Priority = 10; - } - - private void SetFPPCam() - { - var map = App.Main.GetComponent(); - var unityComponent = map.SelfMapUnit.GetComponent(); - if (unityComponent != null) - { - _cameraAsset.fppVCam.LookAt = unityComponent.RootAsset.FppLook; - _cameraAsset.fppVCam.Follow = unityComponent.ModelAsset.NeckTransform; - unityComponent.ModelAsset.LookIk.solver.target = unityComponent.RootAsset.FppLook; - } - - _cameraAsset.fppVCam.Priority = 10; - _cameraAsset.tppVCam.Priority = 0; - } - - public void SetFppLook(Transform fppCamLook) - { - _cameraAsset.fppVCam.LookAt = fppCamLook; - } - - public void SetFppFollow(Transform fppCamFollow) - { - _cameraAsset.fppVCam.Follow = fppCamFollow; - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Common/CameraComponent.cs.meta b/Assets/Scripts/Fishing2~/Common/CameraComponent.cs.meta deleted file mode 100644 index 19cdad553..000000000 --- a/Assets/Scripts/Fishing2~/Common/CameraComponent.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: aee3947bbf944ecb9e955d2ac1d9e3a5 -timeCreated: 1756822741 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Common/CursorComponent.cs b/Assets/Scripts/Fishing2~/Common/CursorComponent.cs deleted file mode 100644 index bdd23942c..000000000 --- a/Assets/Scripts/Fishing2~/Common/CursorComponent.cs +++ /dev/null @@ -1,104 +0,0 @@ -// using Fantasy.Async; -// using Fantasy.Entitas; -// using Fantasy.Entitas.Interface; -// using Fantasy.Event; -// using NBC; -// using UnityEngine; -// -// namespace NBF.Fishing2 -// { -// public class CursorUIShowEvent : AsyncEventSystem -// { -// protected override async FTask Handler(UIShowEvent self) -// { -// var cursorComponent = App.Main.GetComponent(); -// cursorComponent.UpdateCursor(); -// } -// // protected override FTask Handler(UIShowEvent self) -// // { -// // throw new System.NotImplementedException(); -// // } -// } -// -// public class CursorUIHideEvent : AsyncEventSystem -// { -// protected override async FTask Handler(UIHideEvent self) -// { -// var cursorComponent = App.Main.GetComponent(); -// cursorComponent.UpdateCursor(); -// } -// } -// -// public class CursorComponent : Entity -// { -// #region System -// -// -// -// // public class CursorComponentAwakeSystem : AwakeSystem -// // { -// // protected override void Awake(CursorComponent self) -// // { -// // -// // } -// // } -// // -// // public class CursorComponentUpdateSystem : UpdateSystem -// // { -// // protected override void Update(CursorComponent self) -// // { -// // } -// // } -// // -// // public class CursorComponentDestroySystem : DestroySystem -// // { -// // protected override void Destroy(CursorComponent self) -// // { -// // } -// // } -// -// #endregion -// -// public void UpdateCursor() -// { -// bool showCursor = false; -// var uis = App.UI.GetAllUI(); -// foreach (var ui in uis) -// { -// if (ui.IsShowing && ui.IsShowCursor) -// { -// showCursor = true; -// break; -// } -// } -// -// SetMouseCursor(showCursor); -// } -// -// public ControllerType controllerType = ControllerType.GamePad; -// -// public void SetMouseCursor(bool val) -// { -// Log.Info($"设置鼠标光标==={val}"); -// if (val) -// { -// if (controllerType == ControllerType.KeyboardMouse) -// { -// Cursor.visible = true; -// } -// -// Cursor.lockState = CursorLockMode.None; -// } -// else if (controllerType == ControllerType.KeyboardMouse) -// { -// Cursor.visible = false; -// } -// -// Cursor.visible = val; -// if (!val) -// { -// Cursor.lockState = CursorLockMode.Confined; -// } -// } -// } -// } \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Common/CursorComponent.cs.meta b/Assets/Scripts/Fishing2~/Common/CursorComponent.cs.meta deleted file mode 100644 index 1f8283ae6..000000000 --- a/Assets/Scripts/Fishing2~/Common/CursorComponent.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: a04f3272f2604244b8cd9d9923bb35b0 -timeCreated: 1765374579 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Common/InputComponent.cs b/Assets/Scripts/Fishing2~/Common/InputComponent.cs deleted file mode 100644 index 05992890c..000000000 --- a/Assets/Scripts/Fishing2~/Common/InputComponent.cs +++ /dev/null @@ -1,222 +0,0 @@ -using System; -using Fantasy.Entitas; -using Fantasy.Entitas.Interface; -using UnityEngine; -using UnityEngine.InputSystem; - -namespace NBF.Fishing2 -{ - public enum ControllerType - { - KeyboardMouse = 0, - GamePad = 1 - } - - public class InputComponent : Entity - { - public PlayerInputControl PlayerInputControl { get; set; } - - /// - /// 执行输入事件 - /// - public event Action OnUIPerformed; - - /// - /// 执行输入事件完毕 - /// - public event Action OnUICanceled; - - /// - /// 执行输入事件 - /// - public event Action OnPlayerPerformed; - - /// - /// 执行输入事件完毕 - /// - public event Action OnPlayerCanceled; - - /// - /// 执行输入事件 - /// - public event Action OnPlayerValuePerformed; - - /// - /// 执行输入事件完毕 - /// - public event Action OnPlayerValueCanceled; - - /// - /// 触发交互游戏对象 - /// - public event Action OnInteractiveObjectAction; - - /// - /// 手柄输入 - /// - public static bool IsControllerInput; - - /// - /// ui阻止游戏输入 - /// - public static bool IsUIStopInput; - - - #region Event - - public class InputComponentAwakeSystem : AwakeSystem - { - protected override void Awake(InputComponent self) - { - self.PlayerInputControl = new PlayerInputControl(); - self.PlayerInputControl.Enable(); - - foreach (var actionMap in self.PlayerInputControl.asset.actionMaps) - { - actionMap.Enable(); - if (actionMap.name == "UI") - { - foreach (var action in actionMap.actions) - { - if (action.type == InputActionType.Button) - { - action.performed += self.OnUIButtonPerformed; - action.canceled += self.OnUIButtonCanceled; - } - } - } - else if (actionMap.name == "Player") - { - foreach (var action in actionMap.actions) - { - if (action.type == InputActionType.Button) - { - action.performed += self.OnPlayerButtonPerformed; - action.canceled += self.OnPlayerButtonCanceled; - } - else if (action.type == InputActionType.Value) - { - action.performed += self.OnInputPlayerValuePerformed; - action.canceled += self.OnInputPlayerValueCanceled; - } - } - } - } - } - } - - public class InputComponentDestroySystem : DestroySystem - { - protected override void Destroy(InputComponent self) - { - foreach (var actionMap in self.PlayerInputControl.asset.actionMaps) - { - actionMap.Enable(); - if (actionMap.name == "UI") - { - foreach (var action in actionMap.actions) - { - if (action.type == InputActionType.Button) - { - action.performed -= self.OnUIButtonPerformed; - action.canceled -= self.OnUIButtonCanceled; - } - } - } - else if (actionMap.name == "Player") - { - foreach (var action in actionMap.actions) - { - if (action.type == InputActionType.Button) - { - action.performed -= self.OnPlayerButtonPerformed; - action.canceled -= self.OnPlayerButtonCanceled; - } - else if (action.type == InputActionType.Value) - { - action.performed -= self.OnInputPlayerValuePerformed; - action.canceled -= self.OnInputPlayerValueCanceled; - } - } - } - } - } - } - - - public void OnUIButtonPerformed(InputAction.CallbackContext context) - { - OnUIPerformed?.Invoke(context.action.name); - } - - private void OnUIButtonCanceled(InputAction.CallbackContext context) - { - OnUICanceled?.Invoke(context.action.name); - } - - private void OnPlayerButtonPerformed(InputAction.CallbackContext context) - { - if (IsUIStopInput) return; - var actionName = context.action.name; - // if (actionName == "Op1") - // { - // OnOp1Action?.Invoke(true); - // } - // else if (actionName == "Op2") - // { - // OnOp2Action?.Invoke(true); - // } - - OnPlayerPerformed?.Invoke(actionName); - } - - private void OnPlayerButtonCanceled(InputAction.CallbackContext context) - { - if (IsUIStopInput) return; - var actionName = context.action.name; - // if (actionName == "Op1") - // { - // OnOp1Action?.Invoke(false); - // } - // else if (actionName == "Op2") - // { - // OnOp2Action?.Invoke(false); - // } - // - OnPlayerCanceled?.Invoke(actionName); - } - - private void OnInputPlayerValuePerformed(InputAction.CallbackContext context) - { - if (IsUIStopInput) return; - OnPlayerValuePerformed?.Invoke(context); - } - - private void OnInputPlayerValueCanceled(InputAction.CallbackContext context) - { - if (IsUIStopInput) return; - OnPlayerValueCanceled?.Invoke(context); - } - - #endregion - - - public Vector2 GetMovementInput() - { - if (IsUIStopInput) return Vector2.zero; - return PlayerInputControl.Player.Move?.ReadValue() ?? Vector2.zero; - } - - public Vector2 GetLookInput() - { - if (IsUIStopInput) return Vector2.zero; - return PlayerInputControl.Player.Look?.ReadValue() ?? Vector2.zero; - } - - public void SendUIInput(string actionName) - { - OnUIPerformed?.Invoke(actionName); - OnUICanceled?.Invoke(actionName); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Common/InputComponent.cs.meta b/Assets/Scripts/Fishing2~/Common/InputComponent.cs.meta deleted file mode 100644 index f0ed7e274..000000000 --- a/Assets/Scripts/Fishing2~/Common/InputComponent.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 09132878c89a444a88421b7434394235 -timeCreated: 1756826439 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Common/SettingComponent.cs b/Assets/Scripts/Fishing2~/Common/SettingComponent.cs deleted file mode 100644 index 7df432451..000000000 --- a/Assets/Scripts/Fishing2~/Common/SettingComponent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Fantasy.Entitas; - -namespace NBF.Fishing2 -{ - public class SettingComponent : Entity - { - - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Common/SettingComponent.cs.meta b/Assets/Scripts/Fishing2~/Common/SettingComponent.cs.meta deleted file mode 100644 index 6beb87a8d..000000000 --- a/Assets/Scripts/Fishing2~/Common/SettingComponent.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 7c6adcf67ef545f99c590d1078a76eea -timeCreated: 1756826460 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Helper.meta b/Assets/Scripts/Fishing2~/Helper.meta deleted file mode 100644 index 6978ed937..000000000 --- a/Assets/Scripts/Fishing2~/Helper.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 4c1174e9753b43ac9dd5fa664e92021b -timeCreated: 1756450590 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Helper/MoveHelper.cs b/Assets/Scripts/Fishing2~/Helper/MoveHelper.cs deleted file mode 100644 index 68bfa3d38..000000000 --- a/Assets/Scripts/Fishing2~/Helper/MoveHelper.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Collections.Generic; -using Fantasy.Async; -using NBC; -using Unity.Mathematics; - -namespace NBF.Fishing2 -{ - public static class MoveHelper - { - /// - /// 可以多次调用,多次调用的话会取消上一次的协程 - /// - /// - /// - /// - public static async FTask MoveToAsync(this MapUnit unit, float3 targetPos) - { - return 0; - } - - public static async FTask MoveToAsync(this MapUnit unit, List path) - { - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Helper/MoveHelper.cs.meta b/Assets/Scripts/Fishing2~/Helper/MoveHelper.cs.meta deleted file mode 100644 index 8ef580f00..000000000 --- a/Assets/Scripts/Fishing2~/Helper/MoveHelper.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 2ce11e50e0d749bfa5915208b1ce1a44 -timeCreated: 1756822516 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Helper/PathHelper.cs b/Assets/Scripts/Fishing2~/Helper/PathHelper.cs deleted file mode 100644 index cdfcb8d7c..000000000 --- a/Assets/Scripts/Fishing2~/Helper/PathHelper.cs +++ /dev/null @@ -1,13 +0,0 @@ - -using System.IO; - -namespace NBF -{ - public static class PathHelper - { - public static string GetFullPath(string path) - { - return Path.Combine("gfx", path); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Helper/PathHelper.cs.meta b/Assets/Scripts/Fishing2~/Helper/PathHelper.cs.meta deleted file mode 100644 index 41f651d6c..000000000 --- a/Assets/Scripts/Fishing2~/Helper/PathHelper.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 774fd7a393874949863a694a79823e1c -timeCreated: 1761145384 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Helper/ProtoHelper.cs b/Assets/Scripts/Fishing2~/Helper/ProtoHelper.cs deleted file mode 100644 index 4ceb7f0fd..000000000 --- a/Assets/Scripts/Fishing2~/Helper/ProtoHelper.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System.Linq; -using Fantasy; -using NBC; -using Unity.Mathematics; -using UnityEngine; - -namespace NBF.Fishing2 -{ - public static class ProtoHelper - { - public static MapUnitInfo ToMapUnitInfo(this RoleInfo self) - { - MapUnitInfo mapUnit = new MapUnitInfo(); - mapUnit.Id = self.RoleId; - mapUnit.RoleInfo = self.ToSimpleInfo(); - // mapUnit.Gears = self.Gears; - return mapUnit; - } - - public static RoleSimpleInfo ToSimpleInfo(this RoleInfo self) - { - var ret = new RoleSimpleInfo(); - ret.NickName = self.BaseInfo.NickName; - ret.RoleId = self.RoleId; - ret.Country = self.BaseInfo.Country; - ret.Head = self.BaseInfo.Head; - ret.Level = self.BaseInfo.Level; - // ret.Vip = self.BaseInfo.Vip; - - return ret; - } - - - #region Vector - - public static Vector3Info ToVector3Info(this Vector3 self) - { - var ret = new Vector3Info(); - ret.x = self.x; - ret.y = self.y; - ret.z = self.z; - return ret; - } - - - public static QuaternionInfo ToQuaternionInfo(this Quaternion self) - { - var ret = new QuaternionInfo(); - ret.x = self.x; - ret.y = self.y; - ret.z = self.z; - ret.w = self.w; - return ret; - } - - - public static Vector3 ToVector3(this Vector3Info self) - { - var ret = new Vector3 - { - x = self.x, - y = self.y, - z = self.z - }; - return ret; - } - - - public static Quaternion ToQuaternion(this QuaternionInfo self) - { - var ret = new Quaternion - { - x = self.x, - y = self.y, - z = self.z, - w = self.w - }; - return ret; - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Helper/ProtoHelper.cs.meta b/Assets/Scripts/Fishing2~/Helper/ProtoHelper.cs.meta deleted file mode 100644 index 43931e273..000000000 --- a/Assets/Scripts/Fishing2~/Helper/ProtoHelper.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 850c683faae3419abd3693f7e87accae -timeCreated: 1756738767 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Helper/UnitHelper.cs b/Assets/Scripts/Fishing2~/Helper/UnitHelper.cs deleted file mode 100644 index f8e81be70..000000000 --- a/Assets/Scripts/Fishing2~/Helper/UnitHelper.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Fantasy.Async; -using NBC; -using Fantasy.Entitas; - -namespace NBF.Fishing2 -{ - public static class UnitHelper - { - public static async FTask InitMapUnit(this MapUnit self) - { - await FTask.CompletedTask; - } - - - public static bool IsSelf(this MapUnit self) - { - if (self.Id == Game.SelfId) - { - return true; - } - - return false; - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Helper/UnitHelper.cs.meta b/Assets/Scripts/Fishing2~/Helper/UnitHelper.cs.meta deleted file mode 100644 index 7a06d8f52..000000000 --- a/Assets/Scripts/Fishing2~/Helper/UnitHelper.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 82c91df89554417c87a3658709ef406d -timeCreated: 1756450600 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Map.meta b/Assets/Scripts/Fishing2~/Map.meta deleted file mode 100644 index 2bcb59442..000000000 --- a/Assets/Scripts/Fishing2~/Map.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: b9626380655a42298daf90e7333172ae -timeCreated: 1756363915 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Map/Handler.meta b/Assets/Scripts/Fishing2~/Map/Handler.meta deleted file mode 100644 index 1e7150730..000000000 --- a/Assets/Scripts/Fishing2~/Map/Handler.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 9720afaa3bc94081b63a7c0571e4c86a -timeCreated: 1757251153 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Map/Handler/Map2C_ChangeMapHandler.cs b/Assets/Scripts/Fishing2~/Map/Handler/Map2C_ChangeMapHandler.cs deleted file mode 100644 index bba78156e..000000000 --- a/Assets/Scripts/Fishing2~/Map/Handler/Map2C_ChangeMapHandler.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Fantasy; -using Fantasy.Async; -using Fantasy.Network; -using Fantasy.Network.Interface; -using NBF.Fishing2; -using Log = NBC.Log; - -namespace NBF.Fishing2 -{ - public class Map2C_ChangeMapHandler : Message - { - protected override async FTask Run(Session session, Map2C_ChangeMap message) - { - Log.Info($"收到地图切换消息=={message.MapId}"); - // await MapHelper.ChangeMap(message.MapId); - - // await MapHelper.CreateRoomTest(message.MapId); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Map/Handler/Map2C_ChangeMapHandler.cs.meta b/Assets/Scripts/Fishing2~/Map/Handler/Map2C_ChangeMapHandler.cs.meta deleted file mode 100644 index c1776a44f..000000000 --- a/Assets/Scripts/Fishing2~/Map/Handler/Map2C_ChangeMapHandler.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 9aca13592484450582e818dd128a23c2 -timeCreated: 1756301493 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Map/Handler/Map2C_RoleEnterMapNotifyHandler.cs b/Assets/Scripts/Fishing2~/Map/Handler/Map2C_RoleEnterMapNotifyHandler.cs deleted file mode 100644 index b8168331c..000000000 --- a/Assets/Scripts/Fishing2~/Map/Handler/Map2C_RoleEnterMapNotifyHandler.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Fantasy; -using Fantasy.Async; -using Fantasy.Network; -using Fantasy.Network.Interface; -using NBC; -using Log = NBC.Log; - -namespace NBF.Fishing2 -{ - public class Map2C_RoleEnterMapNotifyHandler : Message - { - protected override async FTask Run(Session session, Map2C_RoleEnterRoomNotify message) - { - Log.Info($"收到进入房间推送 id={message.Info.Id} "); - var map = App.Main.GetComponent(); - if (map == null || !map.IsRoomMap) - { - Log.Info("房间不是好友房间,不处理进入请求"); - return; - } - - var info = message.Info; - var unit = map.GetUnit(info.Id); - if (unit == null) - { - unit = map.CreateMapUnit(info); - } - - await unit.CreateView(); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Map/Handler/Map2C_RoleEnterMapNotifyHandler.cs.meta b/Assets/Scripts/Fishing2~/Map/Handler/Map2C_RoleEnterMapNotifyHandler.cs.meta deleted file mode 100644 index 48650977c..000000000 --- a/Assets/Scripts/Fishing2~/Map/Handler/Map2C_RoleEnterMapNotifyHandler.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: b0934eeab5b8445b824f1337f774379e -timeCreated: 1757251141 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Map/Handler/Map2C_RoleExitMapNotifyHandler.cs b/Assets/Scripts/Fishing2~/Map/Handler/Map2C_RoleExitMapNotifyHandler.cs deleted file mode 100644 index 99f871a9c..000000000 --- a/Assets/Scripts/Fishing2~/Map/Handler/Map2C_RoleExitMapNotifyHandler.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Fantasy; -using Fantasy.Async; -using Fantasy.Network; -using Fantasy.Network.Interface; -using NBC; -using Log = NBC.Log; - -namespace NBF.Fishing2 -{ - public class Map2C_RoleExitMapNotifyHandler : Message - { - protected override async FTask Run(Session session, Map2C_RoleExitRoomNotify message) - { - Log.Info($"收到离开房间推送 id={message.Id} "); - var map = App.Main.GetComponent(); - if (map == null) - { - Log.Info("地图不存在,不处理退出请求"); - return; - } - if (map.Units.Remove(message.Id, out var unit)) - { - unit.Dispose(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Map/Handler/Map2C_RoleExitMapNotifyHandler.cs.meta b/Assets/Scripts/Fishing2~/Map/Handler/Map2C_RoleExitMapNotifyHandler.cs.meta deleted file mode 100644 index f33848f9c..000000000 --- a/Assets/Scripts/Fishing2~/Map/Handler/Map2C_RoleExitMapNotifyHandler.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 18ae467167c44db1873fee88067d2f9a -timeCreated: 1757251193 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Map/Map.cs b/Assets/Scripts/Fishing2~/Map/Map.cs deleted file mode 100644 index dd13e99d7..000000000 --- a/Assets/Scripts/Fishing2~/Map/Map.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System; -using System.Collections.Generic; -using Fantasy; -using NBC; -using Fantasy.Entitas; -using Fantasy.Entitas.Interface; - -namespace NBF.Fishing2 -{ - public class Map : Entity - { - public int MapId; - - public string RoomCode; - - /// - /// 自己的实体id - /// - public long SelfId; - - /// - /// 好友房地图 - /// - public bool IsRoomMap => !string.IsNullOrEmpty(RoomCode); - - /// - /// 地图中的单位 - /// - public Dictionary Units = new Dictionary(); - - /// - /// 自己的实体 - /// - public MapUnit SelfMapUnit => GetUnit(SelfId); - - - #region System - - public class MapDestroySystem : DestroySystem - { - protected override void Destroy(Map self) - { - self.MapId = 0; - self.SelfId = 0; - self.RoomCode = string.Empty; - self.Units.Clear(); - } - } - - #endregion - - public MapUnit CreateMapUnit(MapUnitInfo unitInfo) - { - var mapUnit = Create(Scene, unitInfo.Id, true, true); - mapUnit.SetUnitInfo(unitInfo); - Add(mapUnit); - return mapUnit; - } - - /// - /// 获取一个单位 - /// - /// - /// - /// - public MapUnit GetUnit(long id) - { - return Units.GetValueOrDefault(id); - } - - /// - /// 进入地图 - /// - /// - /// - /// - public bool Add(MapUnit unit) - { - Units.Add(unit.Id, unit); - return true; - } - - /// - /// 离开地图 - /// - /// - /// - /// - public bool Remove(long id) - { - return Units.Remove(id); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Map/Map.cs.meta b/Assets/Scripts/Fishing2~/Map/Map.cs.meta deleted file mode 100644 index f40f7062a..000000000 --- a/Assets/Scripts/Fishing2~/Map/Map.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 2acb8a2309ee4443a812939b0e02c18f -timeCreated: 1756049289 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Map/MapManageComponent.cs b/Assets/Scripts/Fishing2~/Map/MapManageComponent.cs deleted file mode 100644 index f57ff2e29..000000000 --- a/Assets/Scripts/Fishing2~/Map/MapManageComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Fantasy.Entitas; - -namespace NBF.Fishing2 -{ - /// - /// 地图管理组件 - /// - public class MapManageComponent : Entity - { - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Map/MapManageComponent.cs.meta b/Assets/Scripts/Fishing2~/Map/MapManageComponent.cs.meta deleted file mode 100644 index ce673d40d..000000000 --- a/Assets/Scripts/Fishing2~/Map/MapManageComponent.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 226c840e80f840ae8a4ff54bc7c6645a -timeCreated: 1756304063 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Message.meta b/Assets/Scripts/Fishing2~/Message.meta deleted file mode 100644 index b0b39af93..000000000 --- a/Assets/Scripts/Fishing2~/Message.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: b35630cbcbbb4792a821de847fabbd69 -timeCreated: 1757820526 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Message/Event.meta b/Assets/Scripts/Fishing2~/Message/Event.meta deleted file mode 100644 index 9df3213b2..000000000 --- a/Assets/Scripts/Fishing2~/Message/Event.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: c197c410c838437996d832515a62026e -timeCreated: 1757835465 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Message/Event/NumericChangeEvent.cs b/Assets/Scripts/Fishing2~/Message/Event/NumericChangeEvent.cs deleted file mode 100644 index 45f0dce94..000000000 --- a/Assets/Scripts/Fishing2~/Message/Event/NumericChangeEvent.cs +++ /dev/null @@ -1,35 +0,0 @@ -// using System.Collections.Generic; -// using Fantasy; -// using Fantasy.Event; -// -// namespace NBF.Fishing2 -// { -// public class NumericChangeEvent : EventSystem -// { -// protected override void Handler(NumericChange self) -// { -// if (self.Old == self.New) return; -// if (self.NumericType == NumericType.Flashlight) -// { -// var flashlight = self.MapUnit.GetComponent(); -// flashlight.Change(self.New); -// if (self.MapUnit.IsSelf()) -// { -// var list = new List -// { -// new KeyValueInt64() -// { -// Key = self.NumericType, -// Value = self.New -// } -// }; -// //如果是自己的,则同步给其他玩家 -// Net.Send(new C2Map_RolePropertyChange() -// { -// Propertys = list -// }); -// } -// } -// } -// } -// } \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Message/Event/NumericChangeEvent.cs.meta b/Assets/Scripts/Fishing2~/Message/Event/NumericChangeEvent.cs.meta deleted file mode 100644 index 3429df55d..000000000 --- a/Assets/Scripts/Fishing2~/Message/Event/NumericChangeEvent.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 2dae2fd757bc46b7b47a7b548b36ed54 -timeCreated: 1757835696 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Message/Map2C_LookNotifyHandler.cs b/Assets/Scripts/Fishing2~/Message/Map2C_LookNotifyHandler.cs deleted file mode 100644 index b313bfa09..000000000 --- a/Assets/Scripts/Fishing2~/Message/Map2C_LookNotifyHandler.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Fantasy; -using Fantasy.Async; -using Fantasy.Network; -using Fantasy.Network.Interface; -using NBC; -using Log = NBC.Log; - -namespace NBF.Fishing2 -{ - public class Map2C_LookNotifyHandler : Message - { - protected override async FTask Run(Session session, Map2C_LookeNotify message) - { - Log.Info($"收到朝向推送 id={message.Id} "); - var map = App.Main.GetComponent(); - var unit = map.Units[message.Id]; - if (unit.IsSelf()) - { - Log.Info("自己的旋转消息,不处理"); - } - else - { - var moveComponent = unit.GetComponent(); - if (moveComponent != null) - { - moveComponent.OnServerLook(message.Rotation.ToVector3(), message.Timestamp); - } - } - - await FTask.CompletedTask; - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Message/Map2C_LookNotifyHandler.cs.meta b/Assets/Scripts/Fishing2~/Message/Map2C_LookNotifyHandler.cs.meta deleted file mode 100644 index d81874f7e..000000000 --- a/Assets/Scripts/Fishing2~/Message/Map2C_LookNotifyHandler.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: f1f00b074c7f48248773361036d3bfcf -timeCreated: 1757238435 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Message/Map2C_MoveNotifyHandler.cs b/Assets/Scripts/Fishing2~/Message/Map2C_MoveNotifyHandler.cs deleted file mode 100644 index 11b862449..000000000 --- a/Assets/Scripts/Fishing2~/Message/Map2C_MoveNotifyHandler.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Fantasy; -using Fantasy.Async; -using Fantasy.Network; -using Fantasy.Network.Interface; -using NBC; -using Log = NBC.Log; - -namespace NBF.Fishing2 -{ - public class Map2C_MoveNotifyHandler : Message - { - protected override async FTask Run(Session session, Map2C_MoveNotify message) - { - Log.Info($"收到移动推送 id={message.Id} stop={message.IsStop}"); - // session.Scene - // session.Scene.GetComponent(message.Id), - var map = App.Main.GetComponent(); - var unit = map.Units[message.Id]; - var moveComponent = unit.GetComponent(); - if (moveComponent != null) - { - if (message.IsStop) - { - moveComponent.OnServerStopMove(message.Position.ToVector3(), message.Timestamp); - } - else - { - moveComponent.OnServerStartMove(message.Position.ToVector3(), - message.Direction.ToVector3(), 3, message.Timestamp); - } - } - - await FTask.CompletedTask; - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Message/Map2C_MoveNotifyHandler.cs.meta b/Assets/Scripts/Fishing2~/Message/Map2C_MoveNotifyHandler.cs.meta deleted file mode 100644 index 9a9cfaa5c..000000000 --- a/Assets/Scripts/Fishing2~/Message/Map2C_MoveNotifyHandler.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 2306a332c3f842e78fd8d70c9ef1f8ed -timeCreated: 1757148423 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Message/Map2C_RolePropertyChangeNotifyHandler.cs b/Assets/Scripts/Fishing2~/Message/Map2C_RolePropertyChangeNotifyHandler.cs deleted file mode 100644 index beb450d20..000000000 --- a/Assets/Scripts/Fishing2~/Message/Map2C_RolePropertyChangeNotifyHandler.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Fantasy; -using Fantasy.Async; -using Fantasy.Network; -using Fantasy.Network.Interface; -using NBC; -using Log = NBC.Log; - -namespace NBF.Fishing2 -{ - public class Map2C_RolePropertyChangeNotifyHandler : Message - { - protected override async FTask Run(Session session, Map2C_RolePropertyChangeNotify message) - { - Log.Info($"收到角色属性推送 id={message.Id}"); - var map = App.Main.GetComponent(); - var unit = map.Units[message.Id]; - var numericComponent = unit.GetComponent(); - foreach (var property in message.Propertys) - { - numericComponent.Set(property.Key, property.Value); - } - - await FTask.CompletedTask; - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Message/Map2C_RolePropertyChangeNotifyHandler.cs.meta b/Assets/Scripts/Fishing2~/Message/Map2C_RolePropertyChangeNotifyHandler.cs.meta deleted file mode 100644 index 864f9bf63..000000000 --- a/Assets/Scripts/Fishing2~/Message/Map2C_RolePropertyChangeNotifyHandler.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: b507863390534ecca584e3a787180493 -timeCreated: 1757820797 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Mono.meta b/Assets/Scripts/Fishing2~/Mono.meta deleted file mode 100644 index aea265927..000000000 --- a/Assets/Scripts/Fishing2~/Mono.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 53262d3faa5141deb0c8809a4354daa0 -timeCreated: 1756820602 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Mono/PlayerArm.cs b/Assets/Scripts/Fishing2~/Mono/PlayerArm.cs deleted file mode 100644 index c2737695d..000000000 --- a/Assets/Scripts/Fishing2~/Mono/PlayerArm.cs +++ /dev/null @@ -1,58 +0,0 @@ -using RootMotion.FinalIK; -using UnityEngine; - -namespace NBF -{ - public class PlayerArm : MonoBehaviour - { - public bool IsLeft; - public LimbIK IK; - public Transform RodContainer; - public Transform LeftRigMagnet; - public FingerRig FingerRig; - public PlayerShoulder Shoulder;//PlayerShoulder - - [HideInInspector] public float interactionTargetWeight; - - - public void SetReelHandle(ReelAsset asset) - { - IK.solver.target = asset.handle; - IK.enabled = true; - - // var fingers = FingerRig.fingers; - // foreach (var finger in fingers) - // { - // finger.target = asset.handleEnd; - // } - - // // 启用整体控制 - // FingerRig.weight = 1f; - // - // // 绑定大拇指和食指的目标 - // FingerRig.fingers[0].target = asset.handleEnd; // Thumb - // FingerRig.fingers[1].target = asset.handleEnd; // Index - // - // FingerRig.fingers[0].weight = 1f; - // FingerRig.fingers[1].weight = 1f; - - // 其余手指握拳(不绑定 target) - for (int i = 2; i < 5; i++) - { - FingerRig.fingers[i].target = null; - FingerRig.fingers[i].weight = 1f; - } - } - - public void MoveTowardsInteraction() - { - if (!IK) - { - return; - } - - IK.solver.SetIKPositionWeight(Mathf.MoveTowards(IK.solver.IKPositionWeight, - interactionTargetWeight, Time.deltaTime * 2f)); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Mono/PlayerArm.cs.meta b/Assets/Scripts/Fishing2~/Mono/PlayerArm.cs.meta deleted file mode 100644 index 81c0ddbb3..000000000 --- a/Assets/Scripts/Fishing2~/Mono/PlayerArm.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: ed33e261a2784ee0814ceaa6c88aefdf -timeCreated: 1756821001 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Mono/PlayerShoulder.cs b/Assets/Scripts/Fishing2~/Mono/PlayerShoulder.cs deleted file mode 100644 index cf5eb1df9..000000000 --- a/Assets/Scripts/Fishing2~/Mono/PlayerShoulder.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using UnityEngine; - -namespace NBF -{ - public class PlayerShoulder : MonoBehaviour - { - private Vector3 startEulerAngles; - private const int MaxAngle = 30; - private const int MinAngle = -30; - - - public float TestZ; - private void Awake() - { - startEulerAngles = transform.localEulerAngles; - } - - public void SetCameraEulerAngleX(float value) - { - value = (value > 180f) ? value - 360f : value; - Debug.Log($"value={value}"); - var addValue = value * -1; - if (addValue > MaxAngle) - { - addValue = MaxAngle; - } - else if (addValue < MinAngle) - { - addValue = MinAngle; - } - - transform.localEulerAngles = - new Vector3(addValue + startEulerAngles.x, startEulerAngles.y, TestZ); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Mono/PlayerShoulder.cs.meta b/Assets/Scripts/Fishing2~/Mono/PlayerShoulder.cs.meta deleted file mode 100644 index 9740bc3dd..000000000 --- a/Assets/Scripts/Fishing2~/Mono/PlayerShoulder.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: f85286904d2d45738c4b415f3503d4ab -timeCreated: 1756820965 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit.meta b/Assets/Scripts/Fishing2~/Unit.meta deleted file mode 100644 index 555668742..000000000 --- a/Assets/Scripts/Fishing2~/Unit.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 1fb0ee12d9cf40408478e8f9ad9aafdd -timeCreated: 1755915944 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Equipment.meta b/Assets/Scripts/Fishing2~/Unit/Equipment.meta deleted file mode 100644 index 0f25477f5..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Equipment.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 35bf130c632b4a31b064a6d0706aba65 -timeCreated: 1757835845 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Equipment/FlashlightComponent.cs b/Assets/Scripts/Fishing2~/Unit/Equipment/FlashlightComponent.cs deleted file mode 100644 index 13e928b5f..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Equipment/FlashlightComponent.cs +++ /dev/null @@ -1,69 +0,0 @@ -using Fantasy.Entitas; -using Fantasy.Entitas.Interface; -using UnityEngine; - -namespace NBF.Fishing2 -{ - /// - /// 手电筒组件 - /// - public class FlashlightComponent : Entity - { - private GameObject _fishingLight; - - - public class FlashlightComponentAwakeSystem : AwakeSystem - { - protected override void Awake(FlashlightComponent self) - { - var numericComponent = self.Parent.GetComponent(); - var unityComponent = self.Parent.GetComponent(); - // self._fishingLight = unityComponent.Asset.FishingLight; - // self.Change(numericComponent[NumericType.Flashlight]); - - var mapUnit = self.Parent as MapUnit; - if (mapUnit.IsSelf()) - { - var inputComponent = self.Scene.GetComponent(); - inputComponent.OnPlayerPerformed += self.OnPlayerCanceled; - } - } - } - - public class FlashlightComponentDestroySystem : DestroySystem - { - protected override void Destroy(FlashlightComponent self) - { - self._fishingLight = null; - var mapUnit = self.Parent as MapUnit; - if (mapUnit.IsSelf()) - { - var inputComponent = self.Scene.GetComponent(); - if (inputComponent != null) - { - inputComponent.OnPlayerPerformed -= self.OnPlayerCanceled; - } - } - } - } - - - private void OnPlayerCanceled(string action) - { - if (action == InputDef.Player.UseTorch) - { - var numericComponent = Parent.GetComponent(); - if (numericComponent != null) - { - var oldValue = numericComponent[NumericType.Flashlight]; - numericComponent[NumericType.Flashlight] = oldValue > 0 ? 0 : 1; - } - } - } - - public void Change(long value) - { - _fishingLight.SetActive(value > 0); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Equipment/FlashlightComponent.cs.meta b/Assets/Scripts/Fishing2~/Unit/Equipment/FlashlightComponent.cs.meta deleted file mode 100644 index e86d56233..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Equipment/FlashlightComponent.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: b498c6d3db5b4d44a1dc99b547416d59 -timeCreated: 1757836076 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Event.meta b/Assets/Scripts/Fishing2~/Unit/Event.meta deleted file mode 100644 index 94f1c9a0b..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Event.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 1c61b32e7992466f9771eac80763078e -timeCreated: 1765523393 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Gear.meta b/Assets/Scripts/Fishing2~/Unit/Gear.meta deleted file mode 100644 index 3f39121c4..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Gear.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 70bbe8d6e0c04cdaa553cacaee37fe59 -timeCreated: 1755921259 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Gear/MapUnitGear.cs b/Assets/Scripts/Fishing2~/Unit/Gear/MapUnitGear.cs deleted file mode 100644 index 78f54feea..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Gear/MapUnitGear.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Collections.Generic; -using Fantasy.Entitas; - -namespace NBF.Fishing2 -{ - /// - /// 玩家组件 - /// - public class MapUnitGear : Entity - { - /// - /// 绑定的子组件 - /// - public List Binding = new List(); - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Gear/MapUnitGear.cs.meta b/Assets/Scripts/Fishing2~/Unit/Gear/MapUnitGear.cs.meta deleted file mode 100644 index 9d25b0583..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Gear/MapUnitGear.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 01c5cf0e015042fbae5000cff14bb419 -timeCreated: 1766325287 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Gear/MapUnitGearPart.cs b/Assets/Scripts/Fishing2~/Unit/Gear/MapUnitGearPart.cs deleted file mode 100644 index 44bb8cdbd..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Gear/MapUnitGearPart.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Fantasy.Entitas; - -namespace NBF.Fishing2 -{ - public class MapUnitGearPart : Entity - { - /// - /// 配置表id - /// - public int ConfigId { get; set; } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Gear/MapUnitGearPart.cs.meta b/Assets/Scripts/Fishing2~/Unit/Gear/MapUnitGearPart.cs.meta deleted file mode 100644 index 76305d81b..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Gear/MapUnitGearPart.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: a83db5681be745a3b692da5c82496a40 -timeCreated: 1766325663 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/MapUnit.cs b/Assets/Scripts/Fishing2~/Unit/MapUnit.cs deleted file mode 100644 index abe94d094..000000000 --- a/Assets/Scripts/Fishing2~/Unit/MapUnit.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System.Collections.Generic; -using Fantasy; -using Fantasy.Async; -using NBC; -using Fantasy.Entitas; -using Fantasy.Entitas.Interface; -using Unity.Mathematics; -using UnityEngine; - -namespace NBF.Fishing2 -{ - /// - /// 单位 - /// - public class MapUnit : Entity - { - public int ConfigId { get; set; } //配置表id - - /// - /// 钓组信息 - /// - public List Gears = new List(); - - /// - /// 是否在地面 - /// - public bool IsGrounded { get; set; } - - /// - /// 是否在水里 - /// - public bool IsInWater { get; set; } - - public float Speed { get; set; } - public float RotationSpeed { get; set; } - - private Vector3 position; //坐标 - - public Vector3 Position - { - get => position; - set - { - // Vector3 oldPos = position; - position = value; - // Scene.EventComponent.Publish(new ChangePosition() { MapUnit = this, OldPos = oldPos }); - } - } - - public Vector3 Forward - { - get => math.mul(Rotation, math.forward()); - set => Rotation = Quaternion.LookRotation(value, math.up()); - } - - private Quaternion rotation; - - public Quaternion Rotation - { - get => rotation; - set - { - rotation = value; - // Scene.EventComponent.Publish(new ChangeRotation() { MapUnit = this }); - } - } - - public MapUnitState State { get; set; } - - public string StateArgs { get; set; } - - #region System - - public class MapUnitDestroySystem : DestroySystem - { - protected override void Destroy(MapUnit self) - { - } - } - - #endregion - - public void ChangeState(MapUnitState state, string args) - { - Scene.EventComponent.Publish(new ChangeState() { MapUnit = this, State = state, Args = args }); - } - - - public void SetUnitInfo(MapUnitInfo unitInfo) - { - GetOrAddComponent(); - var unitBasic = GetOrAddComponent(); - unitBasic.UpdateInfo(unitInfo); - - // unitInfo.Gears - - var numericComponent = GetOrAddComponent(); - foreach (var kv in unitInfo.Propertys) - { - numericComponent.Set(kv.Key, kv.Value); - } - } - - #region View - - public async FTask CreateView() - { - var unitUnity = GetComponent(); - if (unitUnity != null) - { - unitUnity.Dispose(); - } - - unitUnity = AddComponent(); - await unitUnity.InitUnityObject(); - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/MapUnit.cs.meta b/Assets/Scripts/Fishing2~/Unit/MapUnit.cs.meta deleted file mode 100644 index 77267fbef..000000000 --- a/Assets/Scripts/Fishing2~/Unit/MapUnit.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: ff176fc098254fe2a1b48ea26eaf8857 -timeCreated: 1755915448 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/MapUnitBasic.cs b/Assets/Scripts/Fishing2~/Unit/MapUnitBasic.cs deleted file mode 100644 index 26d49aada..000000000 --- a/Assets/Scripts/Fishing2~/Unit/MapUnitBasic.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Fantasy; -using NBC; -using Fantasy.Entitas; - -namespace NBF.Fishing2 -{ - public class MapUnitBasic : Entity - { - /// - /// 昵称 - /// - public string NickName; - - /// - /// 头像 - /// - public string Head; - - /// - /// 国家 - /// - public string Country; - - /// - /// 等级 - /// - public int Level; - - - public void UpdateInfo(MapUnitInfo mapUnitInfo) - { - if (mapUnitInfo.RoleInfo == null) return; - NickName = mapUnitInfo.RoleInfo.NickName; - Head = mapUnitInfo.RoleInfo.Head; - Country = mapUnitInfo.RoleInfo.Country; - Level = mapUnitInfo.RoleInfo.Level; - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/MapUnitBasic.cs.meta b/Assets/Scripts/Fishing2~/Unit/MapUnitBasic.cs.meta deleted file mode 100644 index b2751b348..000000000 --- a/Assets/Scripts/Fishing2~/Unit/MapUnitBasic.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: fac7cf28f53b4a929d2584c9a95fd242 -timeCreated: 1756881253 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Move.meta b/Assets/Scripts/Fishing2~/Unit/Move.meta deleted file mode 100644 index bf0f4ed7d..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Move.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 309507c5427f4a95bb64f526ce60ded0 -timeCreated: 1757820516 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Move/CharacterControllerComponent.cs b/Assets/Scripts/Fishing2~/Unit/Move/CharacterControllerComponent.cs deleted file mode 100644 index c187dedb0..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Move/CharacterControllerComponent.cs +++ /dev/null @@ -1,427 +0,0 @@ -using System.Collections.Generic; -using Fantasy; -using Fantasy.Entitas; -using Fantasy.Entitas.Interface; -using Fantasy.Helper; -using UnityEngine; -using UnityEngine.InputSystem; -using Log = NBC.Log; - -namespace NBF.Fishing2 -{ - [System.Serializable] - public struct MoveState - { - public Vector3 startPosition; // 开始移动时的位置 - public Vector3 moveDirection; // 移动方向(标准化向量) - public float moveSpeed; // 移动速度 - public bool isMoving; // 是否正在移动 - public double serverTimestamp; // 服务器时间戳 - } - - public class CharacterControllerComponent : Entity - { - public bool IsSelf; - public bool Run; - public CharacterController characterController; - public PlayerModelAsset PlayerModelAsset; - - public readonly Queue MoveStateQueue = new Queue(); - - public Transform transform => characterController.transform; - private MoveState currentMoveState; - - // private Vector3 networkFacingDirection; - - // 添加目标位置和旋转用于插值 - private Vector3 targetPosition; - private Quaternion targetRotation; - - // 插值平滑参数 - public float positionLerpSpeed = 10f; - public float rotationLerpSpeed = 10f; - - - private float currentSpeed = 0f; - private float acceleration = 10f; // 加速度 - - /// - /// 重力加速度 - /// - private float gravity = 9.81f; - - - private Vector3 currentVelocity = Vector3.zero; - private float verticalVelocity = 0f; - - private float groundedGravity = -0.5f; // 小的向下力确保角色保持在地面 - private float airControl = 0.5f; // 空中控制系数 - - #region System - - public class MoveComponentDestroySystem : DestroySystem - { - protected override void Destroy(CharacterControllerComponent self) - { - self.characterController = null; - self.IsSelf = false; - self.Run = false; - var mapUnit = self.Parent as MapUnit; - if (mapUnit.IsSelf()) - { - var inputComponent = self.Scene.GetComponent(); - if (inputComponent != null) - { - inputComponent.OnPlayerPerformed -= self.OnPlayerCanceled; - inputComponent.OnPlayerPerformed -= self.OnPlayerPerformed; - - inputComponent.OnPlayerValueCanceled -= self.OnPlayerValueCanceled; - inputComponent.OnPlayerValuePerformed -= self.OnPlayerValuePerformed; - } - } - - self.PlayerModelAsset = null; - } - } - - public class MoveComponentAwakeSystem : AwakeSystem - { - protected override void Awake(CharacterControllerComponent self) - { - var unitUnityComponent = self.Parent.GetComponent(); - self.PlayerModelAsset = unitUnityComponent.ModelAsset; - self.characterController = unitUnityComponent.GameObject.GetComponent(); - self.lastSyncedFacing = self.characterController.transform.forward; - // 初始化目标位置和旋转 - self.targetPosition = self.characterController.transform.position; - self.targetRotation = self.characterController.transform.rotation; - self.characterController.enabled = true; - var mapUnit = self.Parent as MapUnit; - if (mapUnit.IsSelf()) - { - self.IsSelf = true; - var inputComponent = self.Scene.GetComponent(); - inputComponent.OnPlayerPerformed += self.OnPlayerCanceled; - inputComponent.OnPlayerPerformed += self.OnPlayerPerformed; - - inputComponent.OnPlayerValueCanceled += self.OnPlayerValueCanceled; - inputComponent.OnPlayerValuePerformed += self.OnPlayerValuePerformed; - } - } - } - - public class MoveComponentUpdateSystem : UpdateSystem - { - protected override void Update(CharacterControllerComponent self) - { - self.ProcessMoveStates(); - self.CheckRotationSync(); - // 插值更新位置和旋转 - self.InterpolatePositionAndRotation(); - var mapUnit = self.Parent as MapUnit; - mapUnit.Position = self.characterController.transform.position; - mapUnit.Rotation = self.characterController.transform.rotation; - var f = mapUnit.Forward; - } - } - - #endregion - - #region Input - - private void OnPlayerPerformed(string action) - { - if (action == InputDef.Player.Run) - { - Run = true; - } - } - - private void OnPlayerCanceled(string action) - { - if (action == InputDef.Player.Run) - { - Run = false; - } - } - - private void OnPlayerValueCanceled(InputAction.CallbackContext context) - { - var name = context.action.name; - if (name == InputDef.Player.Move) - { - var v2 = context.ReadValue(); - SendMoveMessage(v2, true); - } - } - - private void OnPlayerValuePerformed(InputAction.CallbackContext context) - { - // var mapUnit = Parent as MapUnit; - // Log.Info($"OnPlayerValuePerformed IsSelf={mapUnit.IsSelf()} id={mapUnit.Id}"); - var name = context.action.name; - if (name == InputDef.Player.Move) - { - var v2 = context.ReadValue(); - SendMoveMessage(v2, false); - } - else if (name == InputDef.Player.Look) - { - var v2 = context.ReadValue(); - UpdatePlayerRotation(v2); - } - } - - #endregion - - #region Message - - private void SendMoveMessage(Vector3 movementInput, bool isStop = false) - { - var mapUnit = Parent as MapUnit; - - Vector3 movementDirection = Vector3.zero; - - // 发送本地相对坐标而不是世界坐标 - if (!isStop) - { - movementDirection = new Vector3(movementInput.x, 0, movementInput.y); - } - - Net.Send(new C2Map_Move() - { - Direction = movementDirection.ToVector3Info(), - IsStop = isStop, - IsRun = Run, - Timestamp = TimeHelper.Now, - Position = mapUnit.Position.ToVector3Info(), - Rotation = mapUnit.Forward.ToVector3Info(), - }); - } - - private void SendLookMessage() - { - Log.Info("发送朝向同步消息"); - Net.Send(new C2Map_Look() - { - Rotation = characterController.transform.forward.ToVector3Info(), - Timestamp = TimeHelper.Now - }); - } - - /// - /// 接收服务器移动开始通知 - /// - /// - /// - /// - /// - public void OnServerStartMove(Vector3 startPosition, Vector3 moveDirection, float speed, double timestamp) - { - MoveState moveState = new MoveState - { - startPosition = startPosition, - moveDirection = moveDirection.normalized, - moveSpeed = speed, - isMoving = true, - serverTimestamp = timestamp - }; - - MoveStateQueue.Enqueue(moveState); - Log.Info($"MoveStateQueue Count={MoveStateQueue.Count}"); - } - - /// - /// 接收服务器移动停止通知 - /// - /// - /// - public void OnServerStopMove(Vector3 finalPosition, double timestamp) - { - MoveState moveState = new MoveState - { - startPosition = finalPosition, - moveDirection = Vector3.zero, - moveSpeed = 0f, - isMoving = false, - serverTimestamp = timestamp - }; - - MoveStateQueue.Enqueue(moveState); - Log.Info($"MoveStateQueue Count={MoveStateQueue.Count}"); - } - - - public void OnServerLook(Vector3 rotation, double timestamp) - { - // 设置目标旋转用于插值 - targetRotation = Quaternion.LookRotation(rotation); - } - - #endregion - - #region Move - - private void ProcessMoveStates() - { - // 只有在当前状态不是移动状态时,才处理下一个状态 - if (MoveStateQueue.Count > 0) - { - currentMoveState = MoveStateQueue.Dequeue(); - - if (currentMoveState.isMoving) - { - StartMovement(currentMoveState); - } - else - { - StopMovement(currentMoveState); - } - } - - // 如果正在移动,持续更新 - if (currentMoveState.isMoving) - { - UpdateMovement(); - } - } - - - private void StartMovement(MoveState moveState) - { - targetPosition = moveState.startPosition; - Debug.Log($"开始移动 - 位置: {moveState.startPosition}"); - } - - private void StopMovement(MoveState moveState) - { - targetPosition = moveState.startPosition; - Debug.Log($"停止移动 - 最终位置: {moveState.startPosition}"); - } - - private void UpdateMovement() - { - // 将本地相对方向转换为世界方向 - Vector3 localDirection = currentMoveState.moveDirection; - Vector3 characterRight = Vector3.ProjectOnPlane(characterController.transform.right, Vector3.up).normalized; - Vector3 characterForward = Vector3.ProjectOnPlane(characterController.transform.forward, Vector3.up).normalized; - Vector3 movementDirection = characterForward * localDirection.z + characterRight * localDirection.x; - - float targetSpeed = currentMoveState.moveSpeed; - - // 平滑加速 - if (movementDirection.magnitude > 0.1f) - { - currentSpeed = Mathf.Lerp(currentSpeed, targetSpeed, acceleration * Time.deltaTime); - } - else - { - currentSpeed = Mathf.Lerp(currentSpeed, 0f, acceleration * 2f * Time.deltaTime); - } - - // 处理重力 - if (characterController.isGrounded) - { - verticalVelocity = groundedGravity; - - // 地面移动 - 完全控制 - currentVelocity = Vector3.Lerp(currentVelocity, movementDirection.normalized * currentSpeed, - acceleration * Time.deltaTime); - } - else - { - verticalVelocity -= gravity * Time.deltaTime; - - // 空中移动 - 有限控制 - Vector3 targetAirVelocity = movementDirection.normalized * currentSpeed * airControl; - currentVelocity = Vector3.Lerp(currentVelocity, - new Vector3(targetAirVelocity.x, currentVelocity.y, targetAirVelocity.z), - acceleration * Time.deltaTime); - } - - // 组合移动 - Vector3 totalMovement = currentVelocity * Time.deltaTime; - totalMovement.y = verticalVelocity * Time.deltaTime; - - Log.Info($"移动=== Id={Parent.Id} 位置: {characterController.transform.position} 移动量: {totalMovement}"); - - characterController.Move(totalMovement); - } - - // 添加位置和旋转插值方法 - private void InterpolatePositionAndRotation() - { - // 只对非本地玩家进行插值 - if (!IsSelf) - { - // 插值位置 - // characterController.transform.position = Vector3.Lerp( - // characterController.transform.position, - // targetPosition, - // positionLerpSpeed * Time.deltaTime); - - // 插值旋转 - 使用更平滑的插值方法 - characterController.transform.rotation = Quaternion.Slerp( - characterController.transform.rotation, - targetRotation, - rotationLerpSpeed * Time.deltaTime); - } - } - - #endregion - - #region Look - - public float rotationSyncInterval = 0.15f; - public float minRotationChange = 10f; - - private Vector3 _rotationInput = Vector3.zero; - private float rotationSyncTimer; - private Vector3 lastSyncedFacing; - private bool isRotating = false; - - [Tooltip("视角旋转敏感度")] public Vector2 sensitivity = new Vector2(0.015f, 0.015f); - - private void UpdatePlayerRotation(Vector2 lookValue) - { - // Look - Vector2 lookInput = lookValue * sensitivity; - - // 处理水平旋转 (Yaw) - if (lookInput.x != 0.0f) - { - _rotationInput.y += lookInput.x; - isRotating = true; - } - - // 应用旋转到角色和相机 - if (_rotationInput != Vector3.zero) - { - characterController.transform.rotation *= Quaternion.Euler(0, _rotationInput.y, 0); - _rotationInput = Vector3.zero; - } - } - - // 检查朝向同步 - private void CheckRotationSync() - { - if (!IsSelf) return; - rotationSyncTimer += Time.deltaTime; - if (rotationSyncTimer >= rotationSyncInterval) - { - float angleChange = Vector3.Angle(transform.forward, lastSyncedFacing); - - // 修改:即使在旋转中也定期同步朝向,避免累积误差 - if (angleChange >= minRotationChange || isRotating) - { - SendLookMessage(); - lastSyncedFacing = transform.forward; - rotationSyncTimer = 0f; - isRotating = false; - } - } - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Move/CharacterControllerComponent.cs.meta b/Assets/Scripts/Fishing2~/Unit/Move/CharacterControllerComponent.cs.meta deleted file mode 100644 index a439abeef..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Move/CharacterControllerComponent.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 36fb267f0f5149caa23ac1b6cf005067 -timeCreated: 1757164955 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Move/CharacterLookComponent.cs b/Assets/Scripts/Fishing2~/Unit/Move/CharacterLookComponent.cs deleted file mode 100644 index d27a15cc9..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Move/CharacterLookComponent.cs +++ /dev/null @@ -1,108 +0,0 @@ -using ECM2.Examples.FirstPerson; -using Fantasy.Entitas; -using Fantasy.Entitas.Interface; -using UnityEngine; -using UnityEngine.InputSystem; - -namespace NBF.Fishing2 -{ - public class CharacterLookComponent : Entity - { - // private UnitUnityComponent _UnitUnityComponent; - public FirstPersonCharacter FirstPerson { get; set; } - private float lookXRot; - private float lookYRot; - private Vector2 _moveInput; - - public float MouseSensitivity = 0.1f; - [Space(15f)] public bool invertLook = true; - - public float minPitch = -60f; - - public float maxPitch = 60f; - - - private InputComponent _inputComponent; - private Quaternion lastRotation; - public MapUnit MapUnit; - - #region System - - public class LookComponentDestroySystem : DestroySystem - { - protected override void Destroy(CharacterLookComponent self) - { - self.FirstPerson = null; - // var mapUnit = self.Parent as MapUnit; - - self._inputComponent = null; - } - } - - public class LookComponentAwakeSystem : AwakeSystem - { - protected override void Awake(CharacterLookComponent self) - { - var mapUnit = self.Parent as MapUnit; - self.MapUnit = mapUnit; - var unitUnityComponent = self.Parent.GetComponent(); - self.FirstPerson = unitUnityComponent.FirstPerson; - self._inputComponent = self.Scene.GetComponent(); - } - } - - public class LookComponentUpdateSystem : UpdateSystem - { - protected override void Update(CharacterLookComponent self) - { - self.UpdateLookInput(); - } - } - - // public class LookComponentLateUpdateSystem : LateUpdateSystem - // { - // protected override void LateUpdate(CharacterLookComponent self) - // { - // self.UpdateLookInput(); - // } - // } - - #endregion - - - private void UpdateLookInput() - { - - // TPPLookTarget.position = base.transform.position; - // if (CameraView.Value == CameraViewType.TPP) - // { - // lookXRot -= MouseInput.Value.y; - // lookXRot = Mathf.Clamp(lookXRot, -25f, 55f); - // lookYRot += MouseInput.Value.x; - // lookYRot = Mathf.Repeat(lookYRot, 360f); - // TPPLookTarget.localEulerAngles = new Vector3(lookXRot, lookYRot, 0f); - // } - // else if (CameraView.Value == CameraViewType.FPP) - { - // if (_IsInVehicle && PlayerState.Value == State.vehicle) - // { - // lookXRot -= MouseInput.Value.y; - // lookXRot = Mathf.Clamp(lookXRot, VehicleLookXMinMax.x, VehicleLookXMinMax.y); - // lookYRot += MouseInput.Value.x; - // lookYRot = Mathf.Clamp(lookYRot, VehicleLookYMinMax.x, VehicleLookYMinMax.y); - // VehicleLookTargetParent.localEulerAngles = new Vector3(lookXRot, lookYRot, 0f); - // _character.CameraPitch = 0f; - // } - // else - { - Vector2 value = _inputComponent.GetLookInput(); - FirstPerson.AddControlYawInput(value.x * (float)MouseSensitivity); - FirstPerson.AddControlPitchInput((invertLook ? (0f - value.y) : value.y) * (float)MouseSensitivity, - minPitch, maxPitch); - // lookXRot = base.transform.eulerAngles.x; - // lookYRot = base.transform.eulerAngles.y; - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Move/CharacterLookComponent.cs.meta b/Assets/Scripts/Fishing2~/Unit/Move/CharacterLookComponent.cs.meta deleted file mode 100644 index 8d9e5d0f0..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Move/CharacterLookComponent.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 316d2e71f8b3473e961ac86ce4568704 -timeCreated: 1765283815 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Move/CharacterMovementComponent.cs b/Assets/Scripts/Fishing2~/Unit/Move/CharacterMovementComponent.cs deleted file mode 100644 index c9ce68238..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Move/CharacterMovementComponent.cs +++ /dev/null @@ -1,214 +0,0 @@ -using ECM2; -using ECM2.Examples.FirstPerson; -using Fantasy.Entitas; -using Fantasy.Entitas.Interface; -using UnityEngine; -using UnityEngine.InputSystem; - -namespace NBF.Fishing2 -{ - public class CharacterMovementComponent : Entity - { - public bool IsSelf; - public bool Run; - - private Vector2 _moveInput; - public MapUnit MapUnit; - - private FirstPersonCharacter _Character; - private Quaternion lastRotation; - - #region System - - public class MovementComponentDestroySystem : DestroySystem - { - protected override void Destroy(CharacterMovementComponent self) - { - // self.characterController = null; - self.IsSelf = false; - self.Run = false; - var mapUnit = self.Parent as MapUnit; - if (mapUnit.IsSelf()) - { - var inputComponent = self.Scene.GetComponent(); - if (inputComponent != null) - { - inputComponent.OnPlayerPerformed -= self.OnPlayerCanceled; - inputComponent.OnPlayerPerformed -= self.OnPlayerPerformed; - - inputComponent.OnPlayerValueCanceled -= self.OnPlayerValueCanceled; - inputComponent.OnPlayerValuePerformed -= self.OnPlayerValuePerformed; - } - } - - // self.PlayerAsset = null; - } - } - - public class MovementComponentAwakeSystem : AwakeSystem - { - protected override void Awake(CharacterMovementComponent self) - { - var unitUnityComponent = self.Parent.GetComponent(); - self._Character = unitUnityComponent.FirstPerson; - var mapUnit = self.Parent as MapUnit; - self.MapUnit = mapUnit; - if (mapUnit.IsSelf()) - { - self.IsSelf = true; - var inputComponent = self.Scene.GetComponent(); - inputComponent.OnPlayerPerformed += self.OnPlayerCanceled; - inputComponent.OnPlayerPerformed += self.OnPlayerPerformed; - - inputComponent.OnPlayerValueCanceled += self.OnPlayerValueCanceled; - inputComponent.OnPlayerValuePerformed += self.OnPlayerValuePerformed; - } - } - } - - public class MovementComponentUpdateSystem : UpdateSystem - { - protected override void Update(CharacterMovementComponent self) - { - self.UpdateGrounded(); - self.UpdateWater(); - self.ProcessMoveStates(); - } - } - - #endregion - - #region Input - - private void OnPlayerPerformed(string action) - { - if (action == InputDef.Player.Run) - { - Run = true; - } - } - - private void OnPlayerCanceled(string action) - { - if (action == InputDef.Player.Run) - { - Run = false; - } - } - - private void OnPlayerValueCanceled(InputAction.CallbackContext context) - { - var name = context.action.name; - if (name == InputDef.Player.Move) - { - // var v2 = context.ReadValue(); - _moveInput = Vector2.zero; - // SendMoveMessage(v2, true); - } - } - - private void OnPlayerValuePerformed(InputAction.CallbackContext context) - { - // var mapUnit = Parent as MapUnit; - // Log.Info($"OnPlayerValuePerformed IsSelf={mapUnit.IsSelf()} id={mapUnit.Id}"); - var name = context.action.name; - if (name == InputDef.Player.Move) - { - var v2 = context.ReadValue(); - _moveInput = v2; - // SendMoveMessage(v2, false); - } - else if (name == InputDef.Player.Look) - { - var v2 = context.ReadValue(); - // UpdatePlayerRotation(v2); - } - } - - #endregion - - #region Move - - private void UpdateGrounded() - { - MapUnit.IsGrounded = _Character.IsGrounded(); - MapUnit.Speed = _Character.velocity.magnitude; - - - Quaternion rotation = _Character.transform.rotation; - - // 计算当前帧与上一帧的旋转差异 - Quaternion rotationDelta = rotation * Quaternion.Inverse(lastRotation); - - // 将四元数转换为角度轴表示 - rotationDelta.ToAngleAxis(out float angle, out Vector3 axis); - - // 确保角度在0-360范围内 - if (angle > 180f) angle -= 360f; - - // 获取Y轴旋转分量(归一化处理) - float yRotation = 0f; - if (Mathf.Abs(angle) > 0.001f && Mathf.Abs(axis.y) > 0.1f) - { - // 计算Y轴方向的旋转角度(考虑旋转轴方向) - yRotation = angle * Mathf.Sign(axis.y); - } - - float maxTurnSpeed = 180f; // 度/秒 - // 转换为角速度并归一化到[-1, 1] - float angularSpeed = yRotation / Time.deltaTime; - float turnValue = Mathf.Clamp(angularSpeed / maxTurnSpeed, -1f, 1f); - - - MapUnit.RotationSpeed = turnValue; - - lastRotation = rotation; - } - - private void UpdateWater() - { - // SceneSettings.Instance.Water.w - } - - private void ProcessMoveStates() - { - // if (CameraView.Value == CameraViewType.TPP) - // { - // float num = (IsRunPressed.Value ? MovementSpeed.Value : (MovementSpeed.Value * 0.5f)); - // num = (IsFlyModeEnabled ? (num * (float)FlySpeed) : num); - // Vector3 zero = Vector3.zero; - // zero += Vector3.right * MovementDirection.Value.x; - // zero += Vector3.forward * MovementDirection.Value.y; - // zero = zero.relativeTo(_CameraTPPTarget, _Character.GetUpVector()); - // _Character.RotateTowards(zero, Time.deltaTime * _RotateTPPSpeed); - // float value = Vector3.Dot(_Character.GetForwardVector(), zero); - // Vector3 vector = _Character.GetForwardVector() * Mathf.Clamp01(value) * num; - // if (checkWaterBound) - // { - // SetMovementDirectionWithRaycastCheck(vector); - // } - // else - // { - // _Character.SetMovementDirection(vector); - // } - // } - // else - { - float num2 = Run ? 7 : 5; //(IsRunPressed.Value ? MovementSpeed.Value : (MovementSpeed.Value * 0.5f)); - // num2 = (IsFlyModeEnabled ? (num2 * (float)FlySpeed) : num2); - Vector3 vector2 = _Character.GetRightVector() * _moveInput.x * num2; - vector2 += _Character.GetForwardVector() * _moveInput.y * num2; - // if (checkWaterBound) - // { - // SetMovementDirectionWithRaycastCheck(vector2); - // } - // else - { - _Character.SetMovementDirection(vector2); - } - } - } - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Move/CharacterMovementComponent.cs.meta b/Assets/Scripts/Fishing2~/Unit/Move/CharacterMovementComponent.cs.meta deleted file mode 100644 index 9001b39b7..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Move/CharacterMovementComponent.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: f032bbea4a2a4ab099d2f4800670ad48 -timeCreated: 1765282951 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Parts.meta b/Assets/Scripts/Fishing2~/Unit/Parts.meta deleted file mode 100644 index f3442fbd6..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Parts.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: f63b5a4df9be4d1c839c3c1cc56c1275 -timeCreated: 1756048419 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Parts/UnitFlashlightComponent.cs b/Assets/Scripts/Fishing2~/Unit/Parts/UnitFlashlightComponent.cs deleted file mode 100644 index be631379f..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Parts/UnitFlashlightComponent.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Fantasy.Entitas; - -namespace NBF.Fishing2 -{ - /// - /// 手电筒组件 - /// - public class UnitFlashlightComponent : Entity - { - /// - /// 打开手电筒 - /// - public bool OpenLight { get; set; } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Parts/UnitFlashlightComponent.cs.meta b/Assets/Scripts/Fishing2~/Unit/Parts/UnitFlashlightComponent.cs.meta deleted file mode 100644 index 499797438..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Parts/UnitFlashlightComponent.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 5f151cee0d5f43ff90c3aa013214b1ea -timeCreated: 1756048476 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Skin.meta b/Assets/Scripts/Fishing2~/Unit/Skin.meta deleted file mode 100644 index e2ee5376e..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Skin.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 0f655e37e9dd4b5885e127f44e01100d -timeCreated: 1756048586 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Skin/UnitSkinComponent.cs b/Assets/Scripts/Fishing2~/Unit/Skin/UnitSkinComponent.cs deleted file mode 100644 index d0f50c3c1..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Skin/UnitSkinComponent.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Fantasy.Entitas; - -namespace NBF.Fishing2 -{ - /// - /// Unity皮肤组件 - /// - public class UnitSkinComponent : Entity - { - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Skin/UnitSkinComponent.cs.meta b/Assets/Scripts/Fishing2~/Unit/Skin/UnitSkinComponent.cs.meta deleted file mode 100644 index 76e1e5b18..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Skin/UnitSkinComponent.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 40c5cce71c8443aa82ea4108e72c887b -timeCreated: 1756048599 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/UnitEventType.cs b/Assets/Scripts/Fishing2~/Unit/UnitEventType.cs deleted file mode 100644 index 8921a6ee6..000000000 --- a/Assets/Scripts/Fishing2~/Unit/UnitEventType.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Unity.Mathematics; - -namespace NBF.Fishing2 -{ - public struct ChangePosition - { - public MapUnit MapUnit; - public float3 OldPos; - } - - public struct ChangeRotation - { - public MapUnit MapUnit; - } - - public struct ChangeState - { - public MapUnit MapUnit; - public MapUnitState State; - public string Args; - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/UnitEventType.cs.meta b/Assets/Scripts/Fishing2~/Unit/UnitEventType.cs.meta deleted file mode 100644 index c5d4557d1..000000000 --- a/Assets/Scripts/Fishing2~/Unit/UnitEventType.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: cd2dd8a7207544b19be4b51b2a6ef215 -timeCreated: 1755915609 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Unity.meta b/Assets/Scripts/Fishing2~/Unit/Unity.meta deleted file mode 100644 index 751b8d7cb..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Unity.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: b2120457449841468649709d6b193c35 -timeCreated: 1756821388 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Unity/CharacterAnimatorComponent.cs b/Assets/Scripts/Fishing2~/Unit/Unity/CharacterAnimatorComponent.cs deleted file mode 100644 index e74a0f1f9..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Unity/CharacterAnimatorComponent.cs +++ /dev/null @@ -1,113 +0,0 @@ -using Fantasy.Entitas; -using Fantasy.Entitas.Interface; -using NBC; -using UnityEngine; - -namespace NBF.Fishing2 -{ - public class CharacterAnimatorComponent : Entity - { - #region 参数定义 - - public static readonly int IsSwiming = Animator.StringToHash("Swim"); - - public static readonly int ThrowFar = Animator.StringToHash("ThrowFar"); - - public static readonly int BoatDriving = Animator.StringToHash("BoatDriving"); - - public static readonly int BaitInWater = Animator.StringToHash("BaitInWater"); - - public static readonly int HeldRod = Animator.StringToHash("HeldRod"); - - public static readonly int RodArming = Animator.StringToHash("RodArming"); - - public static readonly int Forward = Animator.StringToHash("Forward"); - - public static readonly int Turn = Animator.StringToHash("Turn"); - - public static readonly int OnGround = Animator.StringToHash("OnGround"); - - public static readonly int RodRight = Animator.StringToHash("rod right"); - - public static readonly int RodForward = Animator.StringToHash("rod forward"); - - public static readonly int PreciseCast = Animator.StringToHash("Precise Cast"); - - public static readonly int PreciseIdle = Animator.StringToHash("Precise Idle"); - - - public static readonly string Torso = "Torso"; - - #endregion - - public Animator Animator { get; private set; } - public MapUnit MapUnit; - - private bool _isTorsoLayerEnabled; - - #region System - - public class CharacterAnimatorComponentDestroySystem : DestroySystem - { - protected override void Destroy(CharacterAnimatorComponent self) - { - } - } - - public class CharacterAnimatorComponentAwakeSystem : AwakeSystem - { - protected override void Awake(CharacterAnimatorComponent self) - { - self.MapUnit = self.Parent as MapUnit; - var unitUnityComponent = self.Parent.GetComponent(); - self.Animator = unitUnityComponent.ModelAsset.Animator; - } - } - - // public class CharacterAnimatorComponentUpdateSystem : UpdateSystem - // { - // protected override void Update(CharacterAnimatorComponent self) - // { - // // self.UpdateAnimator(); - // } - // } - - public class CharacterAnimatorComponentLateUpdateSystem : LateUpdateSystem - { - protected override void LateUpdate(CharacterAnimatorComponent self) - { - self.UpdateAnimator(); - } - } - - #endregion - - - private void UpdateAnimator() - { - Animator.SetBool(OnGround, MapUnit.IsGrounded); - float value3 = Mathf.Lerp(Animator.GetFloat(Forward), MapUnit.Speed / 5f, Time.deltaTime * 20f); - Animator.SetFloat(Forward, value3); - - // 平滑处理 - // float smoothedTurn = Mathf.SmoothDamp(Animator.GetFloat(Turn), - // MapUnit.RotationSpeed, - // ref turnSmoothVelocity, - // smoothingTime - // ); - - float smoothedTurn = Mathf.Lerp(Animator.GetFloat(Turn), MapUnit.RotationSpeed, Time.deltaTime * 10f); - Animator.SetFloat(Turn, smoothedTurn); - - - float layerWeight = Animator.GetLayerWeight(Animator.GetLayerIndex(Torso)); - SetLayerWeight(Torso, - Mathf.MoveTowards(layerWeight, _isTorsoLayerEnabled ? 1f : 0f, Time.deltaTime * 3f)); - } - - public void SetLayerWeight(string layer, float weight) - { - Animator.SetLayerWeight(Animator.GetLayerIndex(layer), weight); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Unity/CharacterAnimatorComponent.cs.meta b/Assets/Scripts/Fishing2~/Unit/Unity/CharacterAnimatorComponent.cs.meta deleted file mode 100644 index b05e9d392..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Unity/CharacterAnimatorComponent.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 8c8042507191477295dbdac2c7dd7c59 -timeCreated: 1765353895 \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Unity/UnitUnityComponent.cs b/Assets/Scripts/Fishing2~/Unit/Unity/UnitUnityComponent.cs deleted file mode 100644 index cde315b7e..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Unity/UnitUnityComponent.cs +++ /dev/null @@ -1,74 +0,0 @@ -using ECM2; -using ECM2.Examples.FirstPerson; -using Fantasy.Async; -using NBC; -using Fantasy.Entitas; -using Fantasy.Entitas.Interface; -using RootMotion.FinalIK; -using UnityEngine; - -namespace NBF.Fishing2 -{ - /// - /// Unit 对应的unity对象组件 - /// - public class UnitUnityComponent : Entity - { - public GameObject GameObject { get; set; } - public GameObject ModelGameObject { get; set; } - - public Transform Transform { get; set; } - - public PlayerModelAsset ModelAsset { get; set; } - - public CharacterMovement Character { get; set; } - public FirstPersonCharacter FirstPerson { get; set; } - - public PlayerRootAsset RootAsset { get; set; } - - #region System - - public class UnitUnityComponentDestroySystem : DestroySystem - { - protected override void Destroy(UnitUnityComponent self) - { - if (self.GameObject != null) - { - Object.Destroy(self.GameObject); - } - - self.ModelAsset = null; - self.GameObject = null; - self.Transform = null; - self.Character = null; - self.FirstPerson = null; - self.RootAsset = null; - } - } - - #endregion - - public async FTask InitUnityObject() - { - var gameObject = PrefabsHelper.CreatePlayer(SceneSettings.Instance.Node); - GameObject = gameObject; - Transform = gameObject.transform; - Transform.localPosition = new Vector3(484, 1, 422); - Parent.GetOrAddComponent(); - Character = gameObject.GetComponent(); - FirstPerson = gameObject.GetComponent(); - RootAsset = gameObject.GetComponent(); - // Parent.GetOrAddComponent(); - - var modelObject = PrefabsHelper.CreatePlayer(RootAsset.Root, "Human_Male"); - modelObject.transform.localPosition = Vector3.zero; - ModelGameObject = modelObject; - ModelAsset = modelObject.GetComponent(); - - - Parent.GetOrAddComponent(); - Parent.GetOrAddComponent(); - Parent.GetOrAddComponent(); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Fishing2~/Unit/Unity/UnitUnityComponent.cs.meta b/Assets/Scripts/Fishing2~/Unit/Unity/UnitUnityComponent.cs.meta deleted file mode 100644 index 75eae011c..000000000 --- a/Assets/Scripts/Fishing2~/Unit/Unity/UnitUnityComponent.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 0d2c42a4bc1347cebc390147a1a95c54 -timeCreated: 1755921030 \ No newline at end of file diff --git a/Assets/Scripts/Test.meta b/Assets/Scripts/Test.meta new file mode 100644 index 000000000..ecd875801 --- /dev/null +++ b/Assets/Scripts/Test.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 2d71eb3d89064cc4aab3317e49dc3979 +timeCreated: 1772097895 \ No newline at end of file diff --git a/Assets/Scripts/Test/BobberTest.cs b/Assets/Scripts/Test/BobberTest.cs new file mode 100644 index 000000000..179e13a1e --- /dev/null +++ b/Assets/Scripts/Test/BobberTest.cs @@ -0,0 +1,24 @@ +using System; +using NBF; +using UnityEngine; + +namespace Test +{ + public class BobberTest : MonoBehaviour + { + public Rigidbody rb; + public FLine line; + + public float lineLength = 1f; + public float floatLength = 0.5f; + + public void Start() + { + line.InitTest(rb); + //有浮漂 + line.Lure.SetJointDistance(floatLength); + line.Bobber.SetJointDistance(lineLength - floatLength); + line.SetObiRopeStretch(lineLength - floatLength); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Test/BobberTest.cs.meta b/Assets/Scripts/Test/BobberTest.cs.meta new file mode 100644 index 000000000..3edd47aff --- /dev/null +++ b/Assets/Scripts/Test/BobberTest.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5e21f6b9b3c2483e92fdf2f3dfdcce62 +timeCreated: 1772097978 \ No newline at end of file diff --git a/Assets/Scripts/Test/FlatWaterHeightProvider.cs b/Assets/Scripts/Test/FlatWaterHeightProvider.cs new file mode 100644 index 000000000..42eb531fc --- /dev/null +++ b/Assets/Scripts/Test/FlatWaterHeightProvider.cs @@ -0,0 +1,16 @@ +using UnityEngine; + +public interface IWaterHeightProvider +{ + /// 返回 worldPos 位置的水面高度(Y) + float GetWaterHeight(Vector3 worldPos); +} + +/// +/// 最简单的水面:固定平面(适合先跑通逻辑) +/// +public class FlatWaterHeightProvider : MonoBehaviour, IWaterHeightProvider +{ + public float waterY = 0f; + public float GetWaterHeight(Vector3 worldPos) => waterY; +} \ No newline at end of file diff --git a/Assets/Scripts/Test/FlatWaterHeightProvider.cs.meta b/Assets/Scripts/Test/FlatWaterHeightProvider.cs.meta new file mode 100644 index 000000000..2dbc53a1d --- /dev/null +++ b/Assets/Scripts/Test/FlatWaterHeightProvider.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: a1300e9b5a5c347408708087176324c0 \ No newline at end of file diff --git a/Assets/Scripts/Test/FloatBobberController.cs b/Assets/Scripts/Test/FloatBobberController.cs new file mode 100644 index 000000000..083933b5e --- /dev/null +++ b/Assets/Scripts/Test/FloatBobberController.cs @@ -0,0 +1,370 @@ +// using UnityEngine; +// +// [DisallowMultipleComponent] +// public class FloatBobberController : MonoBehaviour +// { +// public enum FloatState +// { +// FreePhysics, // 正常物理 +// Standing, // 站漂(可选:更“稳”的物理态) +// Laying, // 躺漂(浮力过大/出水过多) +// AnimBite // 漂相动画接管:黑漂/顿漂/移漂/顶漂 +// } +// +// public enum BiteType +// { +// Black, // 黑漂:快速下沉 +// Dip, // 顿漂:下压一下回弹 +// Move, // 移漂:水平拖动 +// Lift // 顶漂:上顶(上浮) +// } +// +// [Header("Refs")] +// public Rigidbody rb; +// public ConfigurableJoint joint; // 浮漂与鱼钩端连接的 joint +// public MonoBehaviour waterProviderMB; // 拖一个实现 IWaterHeightProvider 的组件(如 FlatWaterHeightProvider / KWS适配器) +// private IWaterHeightProvider water; +// +// [Header("Buoyancy")] +// [Tooltip("浮漂的有效高度(决定淹没比例计算)")] +// public float floatHeight = 0.18f; +// [Tooltip("浮力系数(越大越容易浮起)")] +// public float buoyancy = 18f; +// [Tooltip("水中阻尼(抑制乱抖/失控)")] +// public float waterDrag = 2.0f; +// [Tooltip("水中角阻尼")] +// public float waterAngularDrag = 2.0f; +// +// [Header("Auto Lay (躺漂判定)")] +// [Tooltip("出水比例超过这个值(0~1),且浮力明显大于重力时,进入躺漂")] +// [Range(0f, 1f)] public float tooMuchOutOfWater01 = 0.55f; +// [Tooltip("浮力/重力比超过该值,认为浮力过大(更容易躺漂)")] +// public float buoyancyOverGravityToLay = 1.15f; +// [Tooltip("躺漂时目标倾角(度)")] +// public float layTiltAngle = 75f; +// [Tooltip("躺漂倾斜速度")] +// public float layTiltSpeed = 6f; +// +// [Header("Joint Drive (用于动画接管)")] +// public float animDriveSpring = 1200f; +// public float animDriveDamper = 120f; +// public float animMaxForce = 10000f; +// +// [Header("Bite Animation Settings")] +// public BiteAnim black = new BiteAnim +// { +// duration = 0.35f, +// verticalOffset = -0.14f, +// curve = AnimationCurve.EaseInOut(0, 0, 1, 1) +// }; +// +// public BiteAnim dip = new BiteAnim +// { +// duration = 0.55f, +// verticalOffset = -0.08f, +// curve = new AnimationCurve( +// new Keyframe(0, 0), +// new Keyframe(0.25f, 1f), +// new Keyframe(0.6f, 0.2f), +// new Keyframe(1f, 0) +// ) +// }; +// +// public BiteAnim lift = new BiteAnim +// { +// duration = 0.6f, +// verticalOffset = +0.06f, +// curve = new AnimationCurve( +// new Keyframe(0, 0), +// new Keyframe(0.3f, 1f), +// new Keyframe(1f, 0) +// ) +// }; +// +// public BiteAnim move = new BiteAnim +// { +// duration = 0.9f, +// horizontalOffset = 0.18f, +// curve = AnimationCurve.EaseInOut(0, 0, 1, 1) +// }; +// +// [System.Serializable] +// public struct BiteAnim +// { +// public float duration; +// public AnimationCurve curve; +// [Tooltip("相对水面的竖直偏移幅度(m),负数=下沉,正数=上顶")] +// public float verticalOffset; +// [Tooltip("水平偏移幅度(m),用于移漂(沿 forward 或指定方向)")] +// public float horizontalOffset; +// } +// +// [Header("Runtime")] +// public FloatState state = FloatState.FreePhysics; +// +// // 内部:动画接管 +// private BiteType currentBite; +// private float biteT; +// private float biteDuration; +// private BiteAnim biteAnim; +// private Vector3 biteDirWorld; // 移漂方向 +// private Vector3 jointBaseTargetPos; +// private bool jointHadTarget; +// +// private void Reset() +// { +// rb = GetComponent(); +// joint = GetComponent(); +// } +// +// private void Awake() +// { +// if (!rb) rb = GetComponent(); +// if (!joint) joint = GetComponent(); +// +// water = waterProviderMB as IWaterHeightProvider; +// if (water == null && waterProviderMB != null) +// water = waterProviderMB.GetComponent(); +// +// // joint 初始化建议(确保 targetPosition 驱动生效) +// if (joint) +// { +// joint.configuredInWorldSpace = false; // targetPosition 在 joint 的本地坐标系更稳定 +// joint.rotationDriveMode = RotationDriveMode.Slerp; +// +// // 建议锁住角度,避免动画接管时乱拧;如果你需要漂转向可放开 +// joint.angularXMotion = ConfigurableJointMotion.Locked; +// joint.angularYMotion = ConfigurableJointMotion.Locked; +// joint.angularZMotion = ConfigurableJointMotion.Locked; +// +// // 位置建议:X/Z 限制,Y 可自由(看你钓组结构) +// // 这里不强制修改,你项目里如果已经配好了就别动 +// } +// } +// +// private void FixedUpdate() +// { +// if (water == null) +// { +// // 没水面采样就只能纯物理 +// state = FloatState.FreePhysics; +// return; +// } +// +// Vector3 pos = rb.position; +// float waterY = water.GetWaterHeight(pos); +// +// // 计算淹没比例:以浮漂中心为基准,上下 floatHeight/2 +// float topY = pos.y + floatHeight * 0.5f; +// float bottomY = pos.y - floatHeight * 0.5f; +// +// float submerged01 = 0f; +// if (waterY <= bottomY) submerged01 = 0f; +// else if (waterY >= topY) submerged01 = 1f; +// else submerged01 = Mathf.InverseLerp(bottomY, topY, waterY); +// +// float outOfWater01 = 1f - submerged01; +// +// // 基础浮力 & 阻尼(只在水中起作用) +// ApplyBuoyancy(submerged01, waterY); +// +// // 躺漂判定(只在非动画接管时) +// if (state != FloatState.AnimBite) +// { +// bool shouldLay = ShouldLay(outOfWater01, submerged01); +// if (shouldLay) +// state = FloatState.Laying; +// else +// state = FloatState.FreePhysics; // 你也可以在这里细分 Standing +// } +// +// // 状态行为 +// switch (state) +// { +// case FloatState.Laying: +// DoLay(waterY); +// break; +// +// case FloatState.AnimBite: +// DoBiteAnim(waterY); +// break; +// +// default: +// // 正常物理时恢复 joint drive(避免被动画参数影响) +// RestoreJointDriveIfNeeded(); +// break; +// } +// } +// +// private void ApplyBuoyancy(float submerged01, float waterY) +// { +// // 水中阻尼:淹没越多阻尼越强 +// rb.linearDamping = Mathf.Lerp(rb.linearDamping, submerged01 > 0 ? waterDrag : 0f, 0.25f); +// rb.angularDamping = Mathf.Lerp(rb.angularDamping, submerged01 > 0 ? waterAngularDrag : 0.05f, 0.25f); +// +// if (submerged01 <= 0f) return; +// +// // 浮力:与淹没比例近似线性(你也可以换成平方让“接近全淹没时更强”) +// float g = Physics.gravity.magnitude; +// float buoyForce = buoyancy * submerged01; +// +// // 让浮力作用点略低于中心,产生一点“站漂”稳定性(可选) +// Vector3 forcePoint = rb.worldCenterOfMass + Vector3.down * (floatHeight * 0.15f); +// +// rb.AddForceAtPosition(Vector3.up * buoyForce, forcePoint, ForceMode.Force); +// +// // 额外:把浮漂轻轻拉向水面(避免小抖导致上下乱跳) +// float surfacePull = 6f * submerged01; +// float yError = waterY - rb.position.y; +// rb.AddForce(Vector3.up * (yError * surfacePull), ForceMode.Force); +// } +// +// private bool ShouldLay(float outOfWater01, float submerged01) +// { +// if (submerged01 <= 0f) return false; +// +// // “浮力/重力”粗判:浮力系数与质量、g相关 +// float gravityForce = rb.mass * Physics.gravity.magnitude; +// // 这里的 buoyancy 是 ForceMode.Force 下的“牛顿”,所以直接比值即可 +// float buoyForceAtFull = buoyancy; // submerged=1 时 +// float ratio = buoyForceAtFull / Mathf.Max(0.0001f, gravityForce); +// +// return (outOfWater01 >= tooMuchOutOfWater01) && (ratio >= buoyancyOverGravityToLay); +// } +// +// private void DoLay(float waterY) +// { +// // 躺漂:把浮漂慢慢倾斜到 layTiltAngle,同时让它更贴近水面 +// Quaternion targetRot = Quaternion.AngleAxis(layTiltAngle, transform.right) * Quaternion.LookRotation(transform.forward, Vector3.up); +// rb.MoveRotation(Quaternion.Slerp(rb.rotation, targetRot, layTiltSpeed * Time.fixedDeltaTime)); +// +// // 贴近水面一点(不要完全锁死,保持自然) +// float targetY = waterY + floatHeight * 0.15f; +// Vector3 p = rb.position; +// p.y = Mathf.Lerp(p.y, targetY, 3f * Time.fixedDeltaTime); +// rb.MovePosition(p); +// +// RestoreJointDriveIfNeeded(); +// } +// +// private void DoBiteAnim(float waterY) +// { +// biteT += Time.fixedDeltaTime; +// float t01 = (biteDuration <= 0.0001f) ? 1f : Mathf.Clamp01(biteT / biteDuration); +// float k = biteAnim.curve != null ? biteAnim.curve.Evaluate(t01) : t01; +// +// // 目标偏移:相对水面 +// float yOff = biteAnim.verticalOffset * k; +// float xzOff = biteAnim.horizontalOffset * k; +// +// // 用 joint.targetPosition 驱动:更像“鱼线/钓组拉着漂走/压漂” +// if (joint) +// { +// EnsureJointDriveForAnim(); +// +// // joint.targetPosition 是在 joint space(本地) +// // 这里做一个“基准 targetPosition + 偏移”,基准取进入动画时的 targetPosition +// Vector3 target = jointBaseTargetPos; +// +// // 竖直:沿 joint 的 local Y +// target += Vector3.up * yOff; +// +// // 移漂:我们用世界方向投到 joint 的 local XZ(近似) +// if (currentBite == BiteType.Move && xzOff != 0f) +// { +// Vector3 worldOffset = biteDirWorld.normalized * xzOff; +// Vector3 localOffset = transform.InverseTransformVector(worldOffset); +// target += new Vector3(localOffset.x, 0f, localOffset.z); +// } +// +// joint.targetPosition = target; +// } +// else +// { +// // 没 joint 就退化:用 MovePosition 做受控位移(稳定但不如 joint 自然) +// Vector3 p = rb.position; +// p.y = Mathf.Lerp(p.y, waterY + yOff, 12f * Time.fixedDeltaTime); +// if (currentBite == BiteType.Move && xzOff != 0f) +// p += biteDirWorld.normalized * (xzOff * 0.2f); // 轻推 +// rb.MovePosition(p); +// } +// +// // 动画结束,回到物理 +// if (t01 >= 1f) +// { +// state = FloatState.FreePhysics; +// RestoreJointDriveIfNeeded(); +// } +// } +// +// private void EnsureJointDriveForAnim() +// { +// if (!joint) return; +// +// if (!jointHadTarget) +// { +// jointHadTarget = true; +// jointBaseTargetPos = joint.targetPosition; +// } +// +// // 只设置一次也行,这里每次保证一致 +// JointDrive d = new JointDrive +// { +// positionSpring = animDriveSpring, +// positionDamper = animDriveDamper, +// maximumForce = animMaxForce +// }; +// +// joint.xDrive = d; +// joint.yDrive = d; +// joint.zDrive = d; +// } +// +// private void RestoreJointDriveIfNeeded() +// { +// // 退出动画时恢复基准 target(避免残留偏移) +// if (!joint) return; +// if (!jointHadTarget) return; +// +// // 慢慢回到基准 targetPosition(更平滑) +// joint.targetPosition = Vector3.Lerp(joint.targetPosition, jointBaseTargetPos, 8f * Time.fixedDeltaTime); +// +// // 当接近后释放 +// if ((joint.targetPosition - jointBaseTargetPos).sqrMagnitude < 0.000001f) +// { +// joint.targetPosition = jointBaseTargetPos; +// jointHadTarget = false; +// } +// } +// +// /// +// /// 外部触发漂相(鱼咬钩/流水/风/玩家提竿前的反馈等) +// /// +// public void PlayBite(BiteType type, Vector3? moveDirWorld = null) +// { +// currentBite = type; +// biteT = 0f; +// +// biteAnim = type switch +// { +// BiteType.Black => black, +// BiteType.Dip => dip, +// BiteType.Move => move, +// BiteType.Lift => lift, +// _ => black +// }; +// +// biteDuration = Mathf.Max(0.02f, biteAnim.duration); +// biteDirWorld = moveDirWorld ?? transform.forward; +// +// // 进入动画接管 +// state = FloatState.AnimBite; +// +// // 记录进入动画时 joint 的基准 target +// if (joint) +// { +// jointBaseTargetPos = joint.targetPosition; +// jointHadTarget = true; +// } +// } +// } \ No newline at end of file diff --git a/Assets/Scripts/Test/FloatBobberController.cs.meta b/Assets/Scripts/Test/FloatBobberController.cs.meta new file mode 100644 index 000000000..6a64211b5 --- /dev/null +++ b/Assets/Scripts/Test/FloatBobberController.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 4c9bb50ca0b0b5547937d3ce82577fad \ No newline at end of file diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index f3b7570be..9985aaf8a 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -9,35 +9,35 @@ EditorUserSettings: value: 18134705175a055722080a3115371d4a0d55006876786860616b0471b8b07a68ffab74f9ee2a3a30300cea1a11320d0beb1a0c25f7060f494b4cc80018eb09361fc211cb1f862d19c51d19dcc413d6ade0d8ddfcddf9f4d9d29195fcfde6ebeae6f0a9c9afa6f8c5b89ff7a1aacececac4eba4d7c9d28bda flags: 0 RecentlyUsedSceneGuid-0: - value: 5409035450035e0e0c5d5a7a13770a40454e4f722f7f24347e2d1f30b0b76360 - flags: 0 - RecentlyUsedSceneGuid-1: value: 07060c5454040c0a545b547240700a441216417e7f2e7268752c4966b4b0663d flags: 0 - RecentlyUsedSceneGuid-2: + RecentlyUsedSceneGuid-1: value: 5309035757065a0a54575f7216265c4444151d28792e72627d2f1935bbb8673a flags: 0 - RecentlyUsedSceneGuid-3: + RecentlyUsedSceneGuid-2: value: 5505015f5c515a085f5b092149760f441716407a787d7564287b1b36e7e1366e flags: 0 - RecentlyUsedSceneGuid-4: + RecentlyUsedSceneGuid-3: value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661 flags: 0 - RecentlyUsedSceneGuid-5: + RecentlyUsedSceneGuid-4: value: 005704520005080c5959542646205b4447154d2e7b7d7e34787f1e6ab0b56c3a flags: 0 - RecentlyUsedSceneGuid-6: + RecentlyUsedSceneGuid-5: value: 53525155015459595c5d5e7315700744174e1a7f7a797e627f2b4b6abab3326f flags: 0 - RecentlyUsedSceneGuid-7: + RecentlyUsedSceneGuid-6: value: 5a09065056055c0e595d0a20447b0b4415164e2b297c75682f7c1866b0b3656c flags: 0 - RecentlyUsedSceneGuid-8: + RecentlyUsedSceneGuid-7: value: 0750065f5d57580c5c0b5d7741275e44464e1d297b7e77342e784a64b3e13539 flags: 0 - RecentlyUsedSceneGuid-9: + RecentlyUsedSceneGuid-8: value: 01085257040c5f0e0c0d5f27457b0f444e4e192c7b2d7e6428794d67e3b36668 flags: 0 + RecentlyUsedSceneGuid-9: + value: 0054045155060d5a5c575f7045270d44474f4e7c7f7924637e2a1832b1b5636d + flags: 0 UnityEditor.ShaderGraph.Blackboard: value: 18135939215a0a5004000b0e15254b524c030a3f2964643d120d1230e9e93a3fd6e826abbd2e2d293c4ead313b08042de6030a0afa240c0d020be94c4ba75e435d8715fa32c70d15d11612dacc11fee5d3c5d1fe9ab1bf968e93e2ffcbc3e7e2f0b3ffe0e8b0be9afeffa9ffff8e85dd8390e2969e8899daa7 flags: 0