浮漂脚本

This commit is contained in:
2025-11-26 14:28:55 +08:00
parent 293890c649
commit 6b5e43d813
110 changed files with 1659 additions and 12039 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 MiB

After

Width:  |  Height:  |  Size: 4.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 KiB

After

Width:  |  Height:  |  Size: 421 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -1,391 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 10
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 13
m_BakeOnSceneLoad: 0
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 256
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 1
m_PVRDenoiserTypeDirect: 1
m_PVRDenoiserTypeIndirect: 1
m_PVRDenoiserTypeAO: 1
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
m_LightingSettings: {fileID: 0}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 3
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
buildHeightMesh: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &203844586
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 203844589}
- component: {fileID: 203844588}
- component: {fileID: 203844587}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &203844587
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 203844586}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UsePipelineSettings: 1
m_AdditionalLightsShadowResolutionTier: 2
m_CustomShadowLayers: 0
m_LightCookieSize: {x: 1, y: 1}
m_LightCookieOffset: {x: 0, y: 0}
m_SoftShadowQuality: 0
m_RenderingLayersMask:
serializedVersion: 0
m_Bits: 1
m_ShadowRenderingLayersMask:
serializedVersion: 0
m_Bits: 1
m_Version: 4
m_LightLayerMask: 1
m_ShadowLayerMask: 1
m_RenderingLayers: 1
m_ShadowRenderingLayers: 1
--- !u!108 &203844588
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 203844586}
m_Enabled: 1
serializedVersion: 11
m_Type: 1
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_UseViewFrustumForShadowCasterCull: 1
m_ForceVisible: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
m_LightUnit: 1
m_LuxAtDistance: 1
m_EnableSpotReflector: 1
--- !u!4 &203844589
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 203844586}
serializedVersion: 2
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &961739749
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 961739753}
- component: {fileID: 961739752}
- component: {fileID: 961739751}
- component: {fileID: 961739750}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &961739750
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 961739749}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_RenderShadows: 1
m_RequiresDepthTextureOption: 2
m_RequiresOpaqueTextureOption: 2
m_CameraType: 0
m_Cameras: []
m_RendererIndex: -1
m_VolumeLayerMask:
serializedVersion: 2
m_Bits: 1
m_VolumeTrigger: {fileID: 0}
m_VolumeFrameworkUpdateModeOption: 2
m_RenderPostProcessing: 0
m_Antialiasing: 0
m_AntialiasingQuality: 2
m_StopNaN: 0
m_Dithering: 0
m_ClearDepth: 1
m_AllowXRRendering: 1
m_AllowHDROutput: 1
m_UseScreenCoordOverride: 0
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
m_RequiresDepthTexture: 0
m_RequiresColorTexture: 0
m_TaaSettings:
m_Quality: 3
m_FrameInfluence: 0.1
m_JitterScale: 1
m_MipBias: 0
m_VarianceClampScale: 0.9
m_ContrastAdaptiveSharpening: 0
m_Version: 2
--- !u!81 &961739751
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 961739749}
m_Enabled: 1
--- !u!20 &961739752
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 961739749}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_Iso: 200
m_ShutterSpeed: 0.005
m_Aperture: 16
m_FocusDistance: 10
m_FocalLength: 50
m_BladeCount: 5
m_Curvature: {x: 2, y: 11}
m_BarrelClipping: 0.25
m_Anamorphism: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &961739753
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 961739749}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
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!1660057539 &9223372036854775807
SceneRoots:
m_ObjectHideFlags: 0
m_Roots:
- {fileID: 961739753}
- {fileID: 203844589}

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: c417fd32cb266784298993a4cbcaf49b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c6256067ae3a71c4188d4036d8b1d643
guid: ce0703da19325d24186631b33cea3575
DefaultImporter:
externalObjects: {}
userData:

View File

@@ -1,385 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 10
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 13
m_BakeOnSceneLoad: 0
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 256
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 1
m_PVRDenoiserTypeDirect: 1
m_PVRDenoiserTypeIndirect: 1
m_PVRDenoiserTypeAO: 1
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
m_LightingSettings: {fileID: 0}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 3
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
buildHeightMesh: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &203844586
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 203844589}
- component: {fileID: 203844588}
- component: {fileID: 203844587}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &203844587
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 203844586}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Version: 3
m_UsePipelineSettings: 1
m_AdditionalLightsShadowResolutionTier: 2
m_LightLayerMask: 1
m_RenderingLayers: 1
m_CustomShadowLayers: 0
m_ShadowLayerMask: 1
m_ShadowRenderingLayers: 1
m_LightCookieSize: {x: 1, y: 1}
m_LightCookieOffset: {x: 0, y: 0}
m_SoftShadowQuality: 0
--- !u!108 &203844588
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 203844586}
m_Enabled: 1
serializedVersion: 11
m_Type: 1
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_UseViewFrustumForShadowCasterCull: 1
m_ForceVisible: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
m_LightUnit: 1
m_LuxAtDistance: 1
m_EnableSpotReflector: 1
--- !u!4 &203844589
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 203844586}
serializedVersion: 2
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &961739749
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 961739753}
- component: {fileID: 961739752}
- component: {fileID: 961739751}
- component: {fileID: 961739750}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &961739750
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 961739749}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_RenderShadows: 1
m_RequiresDepthTextureOption: 2
m_RequiresOpaqueTextureOption: 2
m_CameraType: 0
m_Cameras: []
m_RendererIndex: -1
m_VolumeLayerMask:
serializedVersion: 2
m_Bits: 1
m_VolumeTrigger: {fileID: 0}
m_VolumeFrameworkUpdateModeOption: 2
m_RenderPostProcessing: 0
m_Antialiasing: 0
m_AntialiasingQuality: 2
m_StopNaN: 0
m_Dithering: 0
m_ClearDepth: 1
m_AllowXRRendering: 1
m_AllowHDROutput: 1
m_UseScreenCoordOverride: 0
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
m_RequiresDepthTexture: 0
m_RequiresColorTexture: 0
m_Version: 2
m_TaaSettings:
m_Quality: 3
m_FrameInfluence: 0.1
m_JitterScale: 1
m_MipBias: 0
m_VarianceClampScale: 0.9
m_ContrastAdaptiveSharpening: 0
--- !u!81 &961739751
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 961739749}
m_Enabled: 1
--- !u!20 &961739752
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 961739749}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_Iso: 200
m_ShutterSpeed: 0.005
m_Aperture: 16
m_FocusDistance: 10
m_FocalLength: 50
m_BladeCount: 5
m_Curvature: {x: 2, y: 11}
m_BarrelClipping: 0.25
m_Anamorphism: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &961739753
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 961739749}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
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!1660057539 &9223372036854775807
SceneRoots:
m_ObjectHideFlags: 0
m_Roots:
- {fileID: 961739753}
- {fileID: 203844589}

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 06b1523414d8c114ea5aa5fb6cbf157a
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,385 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 10
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 13
m_BakeOnSceneLoad: 0
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 256
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 1
m_PVRDenoiserTypeDirect: 1
m_PVRDenoiserTypeIndirect: 1
m_PVRDenoiserTypeAO: 1
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
m_LightingSettings: {fileID: 0}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 3
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
buildHeightMesh: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &203844586
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 203844589}
- component: {fileID: 203844588}
- component: {fileID: 203844587}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &203844587
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 203844586}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Version: 3
m_UsePipelineSettings: 1
m_AdditionalLightsShadowResolutionTier: 2
m_LightLayerMask: 1
m_RenderingLayers: 1
m_CustomShadowLayers: 0
m_ShadowLayerMask: 1
m_ShadowRenderingLayers: 1
m_LightCookieSize: {x: 1, y: 1}
m_LightCookieOffset: {x: 0, y: 0}
m_SoftShadowQuality: 0
--- !u!108 &203844588
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 203844586}
m_Enabled: 1
serializedVersion: 11
m_Type: 1
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_UseViewFrustumForShadowCasterCull: 1
m_ForceVisible: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
m_LightUnit: 1
m_LuxAtDistance: 1
m_EnableSpotReflector: 1
--- !u!4 &203844589
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 203844586}
serializedVersion: 2
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &961739749
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 961739753}
- component: {fileID: 961739752}
- component: {fileID: 961739751}
- component: {fileID: 961739750}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &961739750
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 961739749}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_RenderShadows: 1
m_RequiresDepthTextureOption: 2
m_RequiresOpaqueTextureOption: 2
m_CameraType: 0
m_Cameras: []
m_RendererIndex: -1
m_VolumeLayerMask:
serializedVersion: 2
m_Bits: 1
m_VolumeTrigger: {fileID: 0}
m_VolumeFrameworkUpdateModeOption: 2
m_RenderPostProcessing: 0
m_Antialiasing: 0
m_AntialiasingQuality: 2
m_StopNaN: 0
m_Dithering: 0
m_ClearDepth: 1
m_AllowXRRendering: 1
m_AllowHDROutput: 1
m_UseScreenCoordOverride: 0
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
m_RequiresDepthTexture: 0
m_RequiresColorTexture: 0
m_Version: 2
m_TaaSettings:
m_Quality: 3
m_FrameInfluence: 0.1
m_JitterScale: 1
m_MipBias: 0
m_VarianceClampScale: 0.9
m_ContrastAdaptiveSharpening: 0
--- !u!81 &961739751
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 961739749}
m_Enabled: 1
--- !u!20 &961739752
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 961739749}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_Iso: 200
m_ShutterSpeed: 0.005
m_Aperture: 16
m_FocusDistance: 10
m_FocalLength: 50
m_BladeCount: 5
m_Curvature: {x: 2, y: 11}
m_BarrelClipping: 0.25
m_Anamorphism: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &961739753
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 961739749}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
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!1660057539 &9223372036854775807
SceneRoots:
m_ObjectHideFlags: 0
m_Roots:
- {fileID: 961739753}
- {fileID: 203844589}

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 988b8cd146617384088d525cf951df9a
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 95d83008907a7374d8ca545b0c206ed4
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 851620ac528d6d84eb682ba6b24a78f7
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 31917665a76642349dc8f420e9e69e10
timeCreated: 1763900632

View File

@@ -0,0 +1,26 @@
using System.Collections.Generic;
namespace NBF
{
public partial class GoodsConfig
{
private List<AwardData> _awards;
public List<AwardData> Awards
{
get
{
if (_awards == null)
{
_awards = new List<AwardData>();
foreach (var item in Items)
{
_awards.Add(new AwardData(item));
}
}
return _awards;
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f2ff9451a42f4d9e8ebec6b8c8088103
timeCreated: 1763900639

View File

@@ -0,0 +1,22 @@
namespace NBF
{
public class AwardData
{
public uint Id;
public int Amount;
public AwardData(string str)
{
string[] parts = str.Split('|');
Id = uint.Parse(parts[0]);
if (parts.Length > 1)
{
Amount = int.Parse(parts[1]);
}
else
{
Amount = 1;
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a62ec00b6df5428ca380168860d73a58
timeCreated: 1763900506

View File

@@ -0,0 +1,6 @@
namespace NBF
{
public enum GoodsType
{
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b3636032a57e4125907ad7a1df411c52
timeCreated: 1763892955

View File

@@ -3,18 +3,18 @@
public enum ItemType
{
None,
Currency,
Item,
Rod,
Reel,
Bobber,
Line,
Bait,
Lure,
Hook,
Weight,
Feeder,
Ring
Currency = 1,
Item = 2,
Rod = 3,
Reel =4,
Bobber = 5,
Line = 6,
Bait = 7,
Lure = 8,
Hook = 9,
Weight = 10,
Feeder = 11,
}
public enum ItemSubType

View File

@@ -16,16 +16,7 @@ namespace NBF.Utils
{
return (ItemType)(id / 10000);
}
/// <summary>
/// 获取物品子类型
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public static uint GetItemSubType(this uint id)
{
return (id / 1000) % 10;
}
public static string GetName(this uint id)
{

View File

@@ -27,13 +27,13 @@ namespace NBF.Fishing2
/// <summary>
/// 创建物品预制体
/// </summary>
/// <param name="itemInfo"></param>
/// <param name="config"></param>
/// <param name="isPreview">是否预览模式</param>
/// <returns></returns>
public static GameObject CreateItem(ItemInfo itemInfo, bool isPreview = false)
public static GameObject CreateItem(ItemConfig config, bool isPreview = false)
{
//创建主物体
var mainObject = LoadPrefab(itemInfo.Config.GetFullModelPath());
var mainObject = LoadPrefab(config.GetFullModelPath());
//创建配件
return mainObject;

View File

@@ -0,0 +1,170 @@
using UnityEngine;
public class FloatBobberControllerPro : MonoBehaviour
{
[Header("Water")]
public float waterLevel = 0f;
public float waterDensity = 1f;
[Header("Bobber Physical")]
public float bobberVolume = 30f; // 浮漂最大浮力 (cm³)
public float bobberMass = 1f; // 浮漂自重 (g)
public float bobberHeight = 0.25f; // 浮漂长度,用来决定躺漂角度
[Header("Tackle Weight")]
public float sinkerWeight = 2f;
public float baitWeight = 0.5f;
public float hookWeight = 0.2f;
[Header("Behaviour")]
public float fallSpeed = 8f;
public float riseSpeed = 3f;
public float angleLaySpeed = 2f; // 躺漂速度
public float uprightSpeed = 2f; // 立漂速度
public float bottomDrag = 1.2f; // 铅坠触底阻力(越大越难被浮漂拉起)
[Header("Angles")]
public float maxLayAngle = 75f; // 最大躺漂角度
float currentAngle = 0f;
[Header("Noise")]
public float noiseAmp = 0.015f;
public float noiseFreq = 1.5f;
float impulseForce = 0f;
float impulseDecay = 4f;
void Update()
{
SimulateBobber();
}
void SimulateBobber()
{
float totalWeight = bobberMass + sinkerWeight + baitWeight + hookWeight;
float netBuoyancy = bobberVolume - totalWeight; // 正 → 上浮;负 → 下拉
// -----------------------------
// ① 计算浮漂底部 Y 的高度
// -----------------------------
float bobberBottomY = transform.position.y - bobberHeight * 0.5f;
float bottomY = waterLevel - 0.02f; // 水底高度(可替换真实地形)
bool sinkerOnBottom = (bobberBottomY <= bottomY);
// -----------------------------
// ② 计算 targetY
// -----------------------------
float targetY;
if (!sinkerOnBottom)
{
// 铅坠悬浮 → 浮漂直立
if (netBuoyancy > 0)
{
float rise = Mathf.Clamp01(netBuoyancy / bobberVolume) * 0.1f;
targetY = waterLevel + rise;
}
else
{
float sink = Mathf.Abs(netBuoyancy) * 0.02f;
targetY = waterLevel - sink;
}
}
else
{
// 铅坠触底 → 浮漂无法再被向下拉
if (netBuoyancy > bottomDrag)
{
// 浮漂浮力足够将其立起来
float rise = Mathf.Clamp01((netBuoyancy - bottomDrag) / bobberVolume) * 0.1f;
targetY = waterLevel + rise; // 轻轻立起
}
else
{
// 浮漂浮力不足 → 躺漂
targetY = waterLevel + 0.01f; // 漂身贴水
}
}
// 水波噪声
targetY += Mathf.Sin(Time.time * noiseFreq) * noiseAmp;
// 顿口/顶漂力
if (impulseForce != 0f)
{
targetY += impulseForce * Time.deltaTime;
impulseForce = Mathf.Lerp(impulseForce, 0, Time.deltaTime * impulseDecay);
}
// -----------------------------
// ③ 上浮 / 下沉差速
// -----------------------------
float y = transform.position.y;
float diff = targetY - y;
if (diff > 0) // 上浮
y += diff * Time.deltaTime * riseSpeed;
else
y += diff * Time.deltaTime * fallSpeed;
transform.position = new Vector3(transform.position.x, y, transform.position.z);
// -----------------------------
// ④ 浮漂角度控制
// -----------------------------
float targetAngle = 0f;
if (sinkerOnBottom)
{
// 触底 → 判断是否能立漂
if (netBuoyancy > bottomDrag)
{
targetAngle = 0f; // 立漂
}
else
{
// 躺漂
targetAngle = maxLayAngle;
}
}
else
{
// 铅坠在水中 → 漂直立
targetAngle = 0f;
}
// 平滑角度
currentAngle = Mathf.Lerp(
currentAngle,
targetAngle,
Time.deltaTime * (targetAngle == 0 ? uprightSpeed : angleLaySpeed)
);
transform.rotation = Quaternion.Euler(currentAngle, 0, 0);
}
// ----------------------------------------
// 外部控制接口
// ----------------------------------------
public void TriggerDownPulse(float s = 0.8f)
{
impulseForce -= Mathf.Abs(s);
}
public void TriggerUpPulse(float s = 0.8f)
{
impulseForce += Mathf.Abs(s);
}
public void AddFishPull(float v)
{
sinkerWeight += v;
}
public void ReleaseFishPull(float v)
{
sinkerWeight -= v;
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 59f0b74408dbbfe44aee75e1ddf784d3

View File

@@ -0,0 +1,298 @@
// using UnityEngine;
//
// public class FloatBobberController : MonoBehaviour
// {
// [Header("Water System")]
// public bool useKWS = false;
// public LayerMask waterLayer;
// public float waterRaycastHeight = 10f;
//
// [Header("Spring Physics")]
// public float stiffness = 0.35f; // 弹性力度
// public float damping = 0.82f; // 阻尼
// public float noiseStrength = 0.02f; // 自然颤动
//
// [Header("Tilt")]
// public Transform lineAttachPoint; // 钓线连接点(让漂倾斜)
// public float tiltStrength = 6f;
//
// private float targetOffsetY = 0f;
// private float offsetY = 0f;
// private float velocity = 0f;
//
// private float baseWaterHeight = 0f;
//
// // 随机噪声 seed
// private float noiseSeed;
//
// void Start()
// {
// noiseSeed = Random.value * 100f;
// }
//
// void Update()
// {
// UpdateWaterHeight();
// UpdateSpringPhysics();
// UpdateTilt();
// ApplyFinalPosition();
// }
//
// // -----------------------------------------------------------
// // 1. 水面高度获取 (支持 KWS 或 Raycast)
// // -----------------------------------------------------------
// void UpdateWaterHeight()
// {
// if (useKWS)
// {
// // ⭐ 你自己替换为 KWS 的 API
// baseWaterHeight = SampleWaterHeight_KWS();
// }
// else
// {
// // 简单射线获取水面高度
// Vector3 start = transform.position + Vector3.up * waterRaycastHeight;
// if (Physics.Raycast(start, Vector3.down, out RaycastHit hit, 50f, waterLayer))
// {
// baseWaterHeight = hit.point.y;
// }
// }
// }
//
// float SampleWaterHeight_KWS()
// {
// // ❗你需要替换成你的 KWS 接口,比如:
// // return KWS.GetWaterHeight(transform.position);
// return transform.position.y; // 临时占位
// }
//
// // -----------------------------------------------------------
// // 2. 弹簧-阻尼伪物理 (核心)
// // -----------------------------------------------------------
// void UpdateSpringPhysics()
// {
// // 弹簧吸附:朝向 targetOffsetY
// velocity += (targetOffsetY - offsetY) * stiffness;
//
// // 阻尼
// velocity *= damping;
//
// // 移动
// offsetY += velocity;
//
// // 自然轻微噪声
// float noise = (Mathf.PerlinNoise(Time.time * 1.2f, noiseSeed) - 0.5f) * noiseStrength;
// offsetY += noise;
// }
//
// // -----------------------------------------------------------
// // 3. 漂倾斜(依据钓线方向)
// // -----------------------------------------------------------
// void UpdateTilt()
// {
// if (lineAttachPoint == null) return;
//
// Vector3 dir = lineAttachPoint.position - transform.position;
// if (dir.magnitude > 0.001f)
// {
// Quaternion targetRot = Quaternion.LookRotation(dir, Vector3.up);
// transform.rotation = Quaternion.Slerp(transform.rotation, targetRot, Time.deltaTime * tiltStrength);
// }
// }
//
// // -----------------------------------------------------------
// // 4. 应用最终位置
// // -----------------------------------------------------------
// void ApplyFinalPosition()
// {
// Vector3 pos = transform.position;
// pos.y = baseWaterHeight + offsetY;
// transform.position = pos;
// }
//
// // ============================ 触发动作 API ============================
//
// /// <summary>小顿口:轻微上升 0.51.5 目</summary>
// public void TriggerSmallDonk()
// {
// targetOffsetY = Random.Range(0.3f, 0.9f);
// stiffness = 0.40f;
// damping = 0.82f;
// }
//
// /// <summary>顿口:快速上升,并轻微过冲</summary>
// public void TriggerDonk()
// {
// targetOffsetY = Random.Range(1.0f, 1.8f);
// stiffness = 0.55f;
// damping = 0.78f;
// }
//
// /// <summary>顶漂:慢慢上浮几目</summary>
// public void TriggerTopLift()
// {
// targetOffsetY = Random.Range(1.0f, 3.0f);
// stiffness = 0.18f;
// damping = 0.90f;
// }
//
// /// <summary>黑漂:快速下沉,并保持</summary>
// public void TriggerBlackSink()
// {
// targetOffsetY = Random.Range(-3.0f, -6.0f);
// stiffness = 0.45f;
// damping = 0.75f;
// }
//
// /// <summary>点动:轻微上下动</summary>
// public void TriggerNibble()
// {
// targetOffsetY = Mathf.Sin(Time.time * Random.Range(6f, 12f)) * 0.1f;
// stiffness = 0.25f;
// damping = 0.88f;
// }
//
// /// <summary>走漂(水层有流料或者风),水平漂移你用其他脚本控制即可</summary>
// public void TriggerDrift(float amount)
// {
// targetOffsetY = 0f;
// offsetY = 0f;
// }
//
// /// <summary>恢复到 Idle 状态</summary>
// public void ResetIdle()
// {
// targetOffsetY = 0f;
// stiffness = 0.35f;
// damping = 0.85f;
// }
// }
//
//
// using UnityEngine;
//
// public class FloatBobberControllerPro : MonoBehaviour
// {
// [Header("Water Settings")] public float waterLevel = 0f; // 水面高度世界坐标
// public float waterDensity = 1f; // 水密度默认1即可
//
// [Header("Bobber Physical Settings")] public float bobberVolume = 30f; // 浮漂最大浮力cm³
// public float bobberMass = 1f; // 浮漂自身重量(克)
//
// [Header("Tackle Weight Settings")] public float sinkerWeight = 2f; // 铅坠重量(克)
// public float baitWeight = 0.5f; // 鱼饵重量(克)
// public float hookWeight = 0.2f; // 鱼钩重量(克)
//
// [Header("Physics Behaviour")] public float riseSpeed = 1.2f; // 浮漂上浮速度
// public float fallSpeed = 1.5f; // 浮漂下沉速度
// public float smoothDamping = 8f; // 插值平滑
//
// [Header("Random Water Movements")] public float noiseAmplitude = 0.02f; // 微扰幅度
// public float noiseFrequency = 1f; // 微扰频率
//
// float velocity = 0f;
// float timeNoise = 0f;
//
// // 用于顿口、顶漂脉冲
// float impulseForce = 0f;
// float impulseDecay = 4f;
//
// void Update()
// {
// SimulateBobberPhysics();
// }
//
// void SimulateBobberPhysics()
// {
// float totalDownwardWeight = bobberMass + sinkerWeight + baitWeight + hookWeight;
//
// float maxBuoyancy = bobberVolume; // 最大浮力 = 体积
// float netBuoyancy = maxBuoyancy - totalDownwardWeight;
//
// float targetY;
//
// // -------------------------
// // 1. 判断浮漂应该沉多少(吃水深度)
// // -------------------------
// if (netBuoyancy > 0)
// {
// float buoyPercent = Mathf.Clamp01(netBuoyancy / maxBuoyancy);
// float rise = buoyPercent * 0.1f; // 浮漂露出水面的高度
//
// targetY = waterLevel + rise;
//
// targetY += Mathf.Sin(Time.time * noiseFrequency) * noiseAmplitude; // 微扰模拟波浪
// }
// else
// {
// // 净浮力为负 → 说明浮漂整体被拉下,沉入水中
// float sinkDistance = Mathf.Abs(netBuoyancy) * 0.03f;
// targetY = waterLevel - sinkDistance;
// }
//
// // -------------------------
// // 2. 顶漂 & 顿口 脉冲
// // -------------------------
// if (impulseForce != 0f)
// {
// targetY += impulseForce * Time.deltaTime;
// impulseForce = Mathf.Lerp(impulseForce, 0f, Time.deltaTime * impulseDecay);
// }
//
// // -------------------------
// // 3. 平滑过渡到目标位置(核心)
// // -------------------------
// float currentY = transform.position.y;
//
// float newY = Mathf.Lerp(
// currentY,
// targetY,
// Time.deltaTime * smoothDamping
// );
//
// transform.position = new Vector3(
// transform.position.x,
// newY,
// transform.position.z
// );
// }
//
// // ===========================
// // 外部函数:模拟钓鱼动作
// // ===========================
//
// /// <summary>
// /// 顿口:浮漂瞬间被向下拉一下(鱼轻轻吸饵)
// /// </summary>
// public void TriggerDownPulse(float strength = 0.8f)
// {
// impulseForce -= Mathf.Abs(strength);
// }
//
// /// <summary>
// /// 顶漂:浮漂瞬间向上冒一下(鱼儿托饵)
// /// </summary>
// public void TriggerUpPulse(float strength = 0.8f)
// {
// impulseForce += Mathf.Abs(strength);
// }
//
// /// <summary>
// /// 模拟鱼儿吃饵 → 增加下拉力
// /// </summary>
// public void AddFishPull(float value)
// {
// sinkerWeight += value;
// }
//
// /// <summary>
// /// 模拟脱钩 → 拉力消失
// /// </summary>
// public void RemoveFishPull(float value)
// {
// sinkerWeight -= value;
// }
// }

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: aae942875a204e83b90e9713146caded
timeCreated: 1763993650

View File

@@ -17,24 +17,20 @@ namespace NBF
[ProtoMember(1)]
public uint Id { get; set; } // Id
[ProtoMember(2)]
public uint Type { get; set; } // 子类型
[ProtoMember(3)]
public uint[] Shop { get; set; } = Array.Empty<uint>(); // 出现商店
[ProtoMember(4)]
[ProtoMember(3)]
public uint Group { get; set; } // 组
[ProtoMember(4)]
public string[] Items { get; set; } = Array.Empty<string>(); // 物品
[ProtoMember(5)]
public uint[] Items { get; set; } = Array.Empty<uint>(); // 物品
[ProtoMember(6)]
public uint Amount { get; set; } // 获得数量
[ProtoMember(7)]
public uint Price1 { get; set; } // 银币价格
[ProtoMember(8)]
[ProtoMember(6)]
public uint Price2 { get; set; } // 金币价格
[ProtoMember(9)]
[ProtoMember(7)]
public uint[] Label { get; set; } = Array.Empty<uint>(); // 标签
[ProtoMember(10)]
[ProtoMember(8)]
public uint Number { get; set; } // 可购买数量
[ProtoMember(11)]
[ProtoMember(9)]
public uint Disable { get; set; } // 禁用状态
[ProtoIgnore]
public uint Key => Id;

View File

@@ -31,9 +31,7 @@ namespace NBF
[ProtoMember(8)]
public uint Max { get; set; } // 最大堆叠数量
[ProtoMember(9)]
public uint AutoUse { get; set; } // 获得自动使用
[ProtoMember(10)]
public uint Deal { get; set; } // 交易类型
public uint AutoUse { get; set; } // 获得自动使用
[ProtoIgnore]
public uint Key => Id;

View File

@@ -12,7 +12,6 @@ namespace NBF
public const string URL = "ui://hxr7rc7puq3a1h";
public GImage back;
public GImage Quality2;
public GImage Quality;
public override void ConstructFromXML(XML xml)
@@ -20,7 +19,6 @@ namespace NBF
base.ConstructFromXML(xml);
back = (GImage)GetChild("back");
Quality2 = (GImage)GetChild("Quality2");
Quality = (GImage)GetChild("Quality");
OnInited();
UILanguage.TrySetComponentLanguage(this);

View File

@@ -20,7 +20,7 @@ namespace NBF
public BottomMenu BottomMenu;
[AutoFind(Name = "ItemList")]
public CommonItemList ItemList;
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
public override string[] GetDependPackages(){ return new string[] {"Common","CommonNew"}; }
public static void Show(object param = null){ App.UI.OpenUI<BagPanel>(param); }

View File

@@ -38,7 +38,6 @@ namespace NBF
ItemList.SetPanel(this);
ItemList.SetData(tabItemList, true, true);
BagSlotPanel.Show();
}
private void OnUICanceled(string action)

View File

@@ -24,7 +24,7 @@ namespace NBF
public BtnTitleInputControl BtnConfirm;
[AutoFind(Name = "List")]
public ClassifyList List;
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
public override string[] GetDependPackages(){ return new string[] {"Common","CommonNew"}; }
public static void Show(object param = null){ App.UI.OpenUI<BagSelectPanel>(param); }

View File

@@ -26,7 +26,7 @@ namespace NBF
public GImage SlotSeparator;
[AutoFind(Name = "Test")]
public GLoader Test;
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
public override string[] GetDependPackages(){ return new string[] {"Common","CommonNew"}; }
public static void Show(object param = null){ App.UI.OpenUI<BagSlotPanel>(param); }

View File

@@ -28,7 +28,7 @@ namespace NBF
public ItemDetailsContent Content;
[AutoFind(Name = "Quality")]
public GImage Quality;
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
public override string[] GetDependPackages(){ return new string[] {"Common","CommonNew"}; }
public static void Show(object param = null){ App.UI.OpenUI<ItemDetailsPanel>(param); }

View File

@@ -8,7 +8,6 @@
CommonBinder.BindAll();
FishingBinder.BindAll();
MainBinder.BindAll();
ShopBinder.BindAll();
}
}
}

View File

@@ -1,15 +0,0 @@
/**注册组件绑定关系。本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
using FairyGUI;
namespace NBF
{
public static class ShopBinder
{
[UIExtensionAutoBind]
public static void BindAll()
{
UIObjectFactory.SetPackageItemExtension(ShopItem.URL, typeof(ShopItem));
}
}
}

View File

@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: f579b85674067d740ba424bcc5da406d

View File

@@ -34,7 +34,7 @@ namespace NBF
public GButton BtnSendWorld;
[AutoFind(Name = "ChatList")]
public GList ChatList;
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
public override string[] GetDependPackages(){ return new string[] {"Common","CommonNew"}; }
public static void Show(object param = null){ App.UI.OpenUI<ChatTestPanel>(param); }

View File

@@ -121,6 +121,10 @@ namespace NBF
titleItem.SetData(itemData);
titleItem.SetSize(List.width, 32);
}
else if (obj is ShopGearItem shopGearItem)
{
shopGearItem.SetData(itemData as GoodsConfig);
}
}
@@ -128,17 +132,18 @@ namespace NBF
string GetListItemResource(int index)
{
var itemData = _listData[index];
if (itemData is ShopItemInfo)
{
return ShopItem.URL;
}
if (itemData is ItemInfo itemInfo)
{
return BagItem.URL;
}
if (itemData is GoodsConfig goodsConfig)
{
return ShopGearItem.URL;
}
if (itemData is ClassifyListTitleData titleData)
{
return ListTitleItem.URL;

View File

@@ -50,7 +50,6 @@ namespace NBF
style.selectedIndex = 1; //有二级菜单
}
_tabList.AddRange(tabItemList);
if (showListTitle)

View File

@@ -11,9 +11,7 @@ namespace NBF
{
public const string URL = "ui://6hgkvlaufcfggr";
public Controller showType;
public GList List;
public GButton BtnUserHead;
public BtnInputControl BtnPrev;
public BtnInputControl BtnNext;
@@ -21,9 +19,7 @@ namespace NBF
{
base.ConstructFromXML(xml);
showType = GetController("showType");
List = (GList)GetChild("List");
BtnUserHead = (GButton)GetChild("BtnUserHead");
BtnPrev = (BtnInputControl)GetChild("BtnPrev");
BtnNext = (BtnInputControl)GetChild("BtnNext");
OnInited();

View File

@@ -39,7 +39,12 @@ namespace NBF
public void SetData(ItemInfo itemInfo)
{
_renderImage.SetModel(PrefabsHelper.CreateItem(itemInfo), ModelViewerSettings.Load(itemInfo.ConfigId));
_renderImage.SetModel(PrefabsHelper.CreateItem(itemInfo.Config), ModelViewerSettings.Load(itemInfo.ConfigId));
}
public void SetData(ItemConfig itemConfig)
{
_renderImage.SetModel(PrefabsHelper.CreateItem(itemConfig), ModelViewerSettings.Load(itemConfig.Id));
}

View File

@@ -18,7 +18,7 @@ namespace NBF
public GImage back;
[AutoFind(Name = "BottomMenu")]
public BottomMenu BottomMenu;
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
public override string[] GetDependPackages(){ return new string[] {"Common","CommonNew"}; }
public static void Show(object param = null){ App.UI.OpenUI<FishBagPanel>(param); }

View File

@@ -20,7 +20,7 @@ namespace NBF
public GComponent Pages;
[AutoFind(Name = "Menu")]
public CommonMenu Menu;
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
public override string[] GetDependPackages(){ return new string[] {"Common","CommonNew"}; }
public static void Show(object param = null){ App.UI.OpenUI<HomePanel>(param); }

View File

@@ -20,7 +20,7 @@ namespace NBF
public CommonInput InputAccount;
[AutoFind(Name = "BtnLogin")]
public GButton BtnLogin;
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
public override string[] GetDependPackages(){ return new string[] {"Common","CommonNew"}; }
public static void Show(object param = null){ App.UI.OpenUI<LoginPanel>(param); }

View File

@@ -20,7 +20,7 @@ namespace NBF
public CommonMenu Menu;
[AutoFind(Name = "BottomMenu")]
public BottomMenu BottomMenu;
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
public override string[] GetDependPackages(){ return new string[] {"Common","CommonNew"}; }
public static void Show(object param = null){ App.UI.OpenUI<MakePanel>(param); }

View File

@@ -18,7 +18,7 @@ namespace NBF
public GImage back;
[AutoFind(Name = "BottomMenu")]
public BottomMenu BottomMenu;
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
public override string[] GetDependPackages(){ return new string[] {"Common","CommonNew"}; }
public static void Show(object param = null){ App.UI.OpenUI<MapPanel>(param); }

View File

@@ -28,7 +28,7 @@ namespace NBF
public GLabel Mask;
[AutoFind(Name = "InputWait")]
public GComponent InputWait;
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
public override string[] GetDependPackages(){ return new string[] {"Common","CommonNew"}; }
public static void Show(object param = null){ App.UI.OpenUI<SettingPanel>(param); }

View File

@@ -1,15 +0,0 @@
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
using UnityEngine;
using FairyGUI;
using NBC;
namespace NBF
{
public partial class ShopGearItem : GButton
{
private void OnInited()
{
}
}
}

View File

@@ -14,13 +14,17 @@ namespace NBF
public override string UIPackName => "Main";
public override string UIResName => "FishingShopPanel";
[AutoFind(Name = "Currencys")]
public GComponent Currencys;
[AutoFind(Name = "BottomMenu")]
public BottomMenu BottomMenu;
[AutoFind(Name = "ItemList")]
public CommonItemList ItemList;
public override string[] GetDependPackages(){ return new string[] {"Common"}; }
[AutoFind(Name = "Currencys")]
public GComponent Currencys;
[AutoFind(Name = "Loading")]
public GLabel Loading;
[AutoFind(Name = "Head")]
public GButton Head;
public override string[] GetDependPackages(){ return new string[] {"Common","CommonNew"}; }
public static void Show(object param = null){ App.UI.OpenUI<FishingShopPanel>(param); }

View File

@@ -14,42 +14,44 @@ namespace NBF
protected override void OnInit()
{
base.OnInit();
this.AutoAddClick(OnClick);
IsShowCursor = true;
// List<TabItemData> tabItemList = new List<TabItemData>();
// for (int i = 0; i < 10; i++)
// {
// TabItemData tabItem = new TabItemData();
// tabItem.Key = $"Tab_{i}";
// for (int j = 0; j < 5; j++)
// {
// TabItemData tabSubItem = new TabItemData();
// tabSubItem.Key = $"SubTab_{j}";
// var count = Random.Range(2, 5);
// for (int k = 0; k < count; k++)
// {
// var item = new ShopGearData
// {
// title = $"Item:{i}-{j}-{k}"
// };
// tabSubItem.Items.Add(item);
// }
//
// tabItem.Children.Add(tabSubItem);
// }
//
// tabItemList.Add(tabItem);
// }
//
// ItemList.SetPanel(this);
// ItemList.SetData(tabItemList, true, true);
GoodsConfigHelper.Init();
}
protected override void OnShow()
{
base.OnShow();
ItemList.List.OnClickItem += OnClickItem;
Game.Input.OnUICanceled += OnUICanceled;
UseBottomMenu();
List<TabItemData> tabItemList = GoodsConfigHelper.TabItemList;
ItemList.SetPanel(this);
ItemList.SetData(tabItemList, true, true);
}
private void OnUICanceled(string action)
{
if (!IsTop) return;
if (action == InputDef.UI.SubPrev)
{
}
else if (action == InputDef.UI.SubNext)
{
}
else if (action == InputDef.UI.Up)
{
}
else if (action == InputDef.UI.Down)
{
}
}
private void OnClickItem(object item)
{
if (item is not ShopGearItem gearItem) return;
// ItemDetailsPanel.s
// ItemDetailsPanel.Show(bagItem.ItemInfo);
ShopDetailsPanel.Show(gearItem.Config);
}
private void UseBottomMenu()
@@ -57,19 +59,10 @@ namespace NBF
BottomMenu.Use(this);
}
private void OnClickItem(object item)
protected override void OnHide()
{
if (item is not ShopItem shopGearItem) return;
// Log.Info($"click item ={shopGearItem.GearData.title}");
}
private void OnClick(GComponent btn)
{
// if (btn == BtnClose)
// {
// Hide();
// }
Game.Input.OnUICanceled -= OnUICanceled;
ItemList.List.OnClickItem -= OnClickItem;
}
protected override void OnDestroy()

View File

@@ -0,0 +1,74 @@
using System.Collections.Generic;
using System.Linq;
using NBF.Utils;
namespace NBF
{
public static class GoodsConfigHelper
{
public static readonly List<TabItemData> TabItemList = new List<TabItemData>();
/// <summary>
/// 组合和id映射关系
/// </summary>
private static readonly Dictionary<uint, List<uint>> _group2Id = new Dictionary<uint, List<uint>>();
private static readonly Dictionary<uint, GoodsConfig> _googs = new Dictionary<uint, GoodsConfig>();
// private static readonly Dictionary<>
public static void Init()
{
var listGoods = GoodsConfig.GetList();
TabItemList.Clear();
foreach (var goodsConfig in listGoods)
{
if (goodsConfig.Group < 1)
{
goodsConfig.Group = goodsConfig.Id;
}
if (!_group2Id.TryGetValue(goodsConfig.Group, out List<uint> ids))
{
ids = new List<uint>();
_group2Id.Add(goodsConfig.Group, ids);
}
ids.Add(goodsConfig.Id);
_googs[goodsConfig.Id] = goodsConfig;
}
Dictionary<ItemType, List<GoodsConfig>> tabDic = new Dictionary<ItemType, List<GoodsConfig>>();
foreach (var goodsId in _group2Id.Keys)
{
var good = _googs[goodsId];
var awards = good.Awards;
var type = awards.First().Id.GetItemType();
if (!tabDic.ContainsKey(type))
{
tabDic.Add(type, new List<GoodsConfig>());
}
tabDic[type].Add(good);
}
foreach (var (key, list) in tabDic)
{
list.Sort((x, y) => (int)(y.Price1 - x.Price1));
}
foreach (var (type, list) in tabDic)
{
TabItemData tabItem = new TabItemData
{
Key = type.ToString()
};
tabItem.Items.AddRange(list);
TabItemList.Add(tabItem);
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 488efa1c587a4dc7a08fb18550e6f470
timeCreated: 1763867799

View File

@@ -0,0 +1,40 @@
/**本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
using FairyGUI;
using FairyGUI.Utils;
using NBC;
using System.Collections.Generic;
namespace NBF
{
/// <summary> </summary>
public partial class ShopDetailsPanel
{
public GObject this[string aKey] => ContentPane.GetChild(aKey);
public override string UIPackName => "Main";
public override string UIResName => "ShopDetailsPanel";
[AutoFind(Name = "back")]
public GLabel back;
[AutoFind(Name = "BottomMenu")]
public BottomMenu BottomMenu;
[AutoFind(Name = "title")]
public GComponent title;
[AutoFind(Name = "modelBack")]
public GImage modelBack;
[AutoFind(Name = "Model")]
public ModelViewer Model;
[AutoFind(Name = "Content")]
public GComponent Content;
[AutoFind(Name = "Quality")]
public GImage Quality;
public override string[] GetDependPackages(){ return new string[] {"Common","CommonNew"}; }
public static void Show(object param = null){ App.UI.OpenUI<ShopDetailsPanel>(param); }
public static void Hide(){ App.UI.HideUI<ShopDetailsPanel>(); }
public static void Del(){ App.UI.DestroyUI<ShopDetailsPanel>(); }
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 05068004b176c354aa41b3db4f299fce

View File

@@ -0,0 +1,15 @@
// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
using UnityEngine;
using NBC;
namespace NBF
{
public partial class ShopDetailsPanel : UIPanel
{
protected override void OnShow()
{
// Model.SetData(ItemInfo);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: b94c59d346c7a1d458f0bbdd72e12768

View File

@@ -12,14 +12,18 @@ namespace NBF
public const string URL = "ui://hxr7rc7poome9";
public GImage back;
public GImage ba;
public GTextField TextPrice;
public GImage Quality;
public GTextField TextAmount;
public override void ConstructFromXML(XML xml)
{
base.ConstructFromXML(xml);
back = (GImage)GetChild("back");
ba = (GImage)GetChild("ba");
TextPrice = (GTextField)GetChild("TextPrice");
Quality = (GImage)GetChild("Quality");
TextAmount = (GTextField)GetChild("TextAmount");
OnInited();
UILanguage.TrySetComponentLanguage(this);
}

View File

@@ -0,0 +1,35 @@
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
using System.Linq;
using UnityEngine;
using FairyGUI;
using Fantasy;
using NBC;
using NBF.Utils;
namespace NBF
{
public partial class ShopGearItem : GButton
{
public GoodsConfig Config;
private void OnInited()
{
}
public virtual void SetData(GoodsConfig goodsConfig)
{
Config = goodsConfig;
var award = goodsConfig.Awards.First();
title = award.Id.GetName();
this.SetIcon(award.Id);
var cfg = ItemConfig.Get(award.Id);
Quality.SetQuality(cfg.Quality);
this.SetTitleQuality(cfg.Quality);
TextAmount.text = $"个数:{award.Amount}";
TextPrice.text = goodsConfig.Price1.ToString();
}
}
}

View File

@@ -1,33 +0,0 @@
/**本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
using FairyGUI;
using FairyGUI.Utils;
using NBC;
namespace NBF
{
public partial class ShopItem
{
public const string URL = "ui://hxr7rc7poome9";
public GImage back;
public GImage Quality;
public GTextField TextCoin;
public GLoader CoinIcon;
public GTextField TextCoin_2;
public override void ConstructFromXML(XML xml)
{
base.ConstructFromXML(xml);
back = (GImage)GetChild("back");
Quality = (GImage)GetChild("Quality");
TextCoin = (GTextField)GetChild("TextCoin");
CoinIcon = (GLoader)GetChild("CoinIcon");
TextCoin_2 = (GTextField)GetChild("TextCoin");
OnInited();
UILanguage.TrySetComponentLanguage(this);
}
}
}

View File

@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: f1c9e707edc525b419a4d8469675a653

View File

@@ -1,23 +0,0 @@
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
using UnityEngine;
using FairyGUI;
using NBC;
namespace NBF
{
public partial class ShopItem : ListItemBase
{
// public ShopGearData GearData;
private void OnInited()
{
}
protected override void OnSetData(object showData)
{
// GearData = showData as ShopGearData;
// if(GearData == null) return;
// title = GearData.title;
}
}
}

View File

@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 88f8461d076edc549bc841c01f0e42a3