diff --git a/Assets/Resources/CameraCfg.asset b/Assets/Resources/CameraCfg.asset
new file mode 100644
index 000000000..e276beff4
--- /dev/null
+++ b/Assets/Resources/CameraCfg.asset
@@ -0,0 +1,43 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &11400000
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 0}
+ m_Name: CameraCfg
+ m_EditorClassIdentifier: Assembly-CSharp:NBF:CameraScriptObject
+ ScaleTime: 6
+ ThirdCfg:
+ Mode: 0
+ UpdateMode: 1
+ SmoothTime: 0
+ NearClipPlane: 1
+ FarClipPlane: 300
+ Near: {x: 0, y: 2, z: -4}
+ Far: {x: 0, y: 8, z: -11}
+ BestRatio: 1
+ Yaw: -45
+ YawAtThird: 0
+ PitchBest: 0
+ PitchMin: 0
+ PitchMax: 0
+ FreeCfg:
+ Mode: 1
+ UpdateMode: 1
+ SmoothTime: 0
+ NearClipPlane: 0.2
+ FarClipPlane: 500
+ Near: {x: 0, y: 0, z: -4}
+ Far: {x: 0, y: 0, z: -20}
+ BestRatio: 0.8
+ Yaw: 220
+ YawAtThird: 0
+ PitchBest: 30
+ PitchMin: 25
+ PitchMax: 85
diff --git a/Assets/Resources/CameraCfg.asset.meta b/Assets/Resources/CameraCfg.asset.meta
new file mode 100644
index 000000000..762fc9b5d
--- /dev/null
+++ b/Assets/Resources/CameraCfg.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: dd437198c6676d14b977d0fc362d3fbf
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 11400000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/Prefabs/Player/male.prefab b/Assets/Resources/Prefabs/Player/male.prefab
index 931fea647..dba2459ef 100644
--- a/Assets/Resources/Prefabs/Player/male.prefab
+++ b/Assets/Resources/Prefabs/Player/male.prefab
@@ -307,6 +307,8 @@ SkinnedMeshRenderer:
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
+ m_ForceMeshLod: -1
+ m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:
@@ -328,6 +330,7 @@ SkinnedMeshRenderer:
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
+ m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
@@ -1068,6 +1071,8 @@ SkinnedMeshRenderer:
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
+ m_ForceMeshLod: -1
+ m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:
@@ -1089,6 +1094,7 @@ SkinnedMeshRenderer:
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
+ m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
@@ -1273,6 +1279,8 @@ SkinnedMeshRenderer:
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
+ m_ForceMeshLod: -1
+ m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:
@@ -1294,6 +1302,7 @@ SkinnedMeshRenderer:
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
+ m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
@@ -1417,6 +1426,8 @@ SkinnedMeshRenderer:
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
+ m_ForceMeshLod: -1
+ m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
@@ -1438,6 +1449,7 @@ SkinnedMeshRenderer:
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
+ m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
@@ -1531,7 +1543,7 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 6486351463993281101}
- - component: {fileID: 8288789360753940629}
+ - component: {fileID: 1870019855647915305}
m_Layer: 9
m_Name: ex_LeftShoulder
m_TagString: Untagged
@@ -1555,7 +1567,7 @@ Transform:
- {fileID: 1567761239455292317}
m_Father: {fileID: 4643797430188658138}
m_LocalEulerAnglesHint: {x: 0, y: -0, z: -0}
---- !u!114 &8288789360753940629
+--- !u!114 &1870019855647915305
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -1564,9 +1576,9 @@ MonoBehaviour:
m_GameObject: {fileID: 1759296708590676342}
m_Enabled: 1
m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 0d621debd7244988afb98b7c06605f63, type: 3}
+ m_Script: {fileID: 11500000, guid: f85286904d2d45738c4b415f3503d4ab, type: 3}
m_Name:
- m_EditorClassIdentifier:
+ m_EditorClassIdentifier: Assembly-CSharp::NBF.PlayerShoulder
TestZ: 0
--- !u!1 &1788666327886274707
GameObject:
@@ -1609,7 +1621,7 @@ GameObject:
m_Component:
- component: {fileID: 1567761239455292317}
- component: {fileID: 2527974312428153040}
- - component: {fileID: 889920278132032738}
+ - component: {fileID: 7901441639198270294}
m_Layer: 9
m_Name: ex_LeftArm
m_TagString: Untagged
@@ -1690,7 +1702,7 @@ MonoBehaviour:
maintainRotationWeight: 0
bendModifierWeight: 1
bendGoal: {fileID: 0}
---- !u!114 &889920278132032738
+--- !u!114 &7901441639198270294
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -1699,15 +1711,15 @@ MonoBehaviour:
m_GameObject: {fileID: 1819416041127449463}
m_Enabled: 1
m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 99467c6c370b440d8bdb517bbbcf22cf, type: 3}
+ m_Script: {fileID: 11500000, guid: ed33e261a2784ee0814ceaa6c88aefdf, type: 3}
m_Name:
- m_EditorClassIdentifier:
+ m_EditorClassIdentifier: Assembly-CSharp::NBF.PlayerArm
IsLeft: 1
IK: {fileID: 2527974312428153040}
RodContainer: {fileID: 5034659192527894323}
LeftRigMagnet: {fileID: 2815101121166790886}
FingerRig: {fileID: 5588049097361271665}
- Shoulder: {fileID: 8288789360753940629}
+ Shoulder: {fileID: 1870019855647915305}
interactionTargetWeight: 0
--- !u!1 &1859516214001922058
GameObject:
@@ -2607,7 +2619,7 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 2857419113832061261}
- - component: {fileID: 7463744131801554541}
+ - component: {fileID: 4210803098231656990}
m_Layer: 9
m_Name: ex_RightShoulder
m_TagString: Untagged
@@ -2631,7 +2643,7 @@ Transform:
- {fileID: 7587706008879176572}
m_Father: {fileID: 246890519160273793}
m_LocalEulerAnglesHint: {x: 0, y: -0, z: -0}
---- !u!114 &7463744131801554541
+--- !u!114 &4210803098231656990
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -2640,9 +2652,9 @@ MonoBehaviour:
m_GameObject: {fileID: 3576770042947972705}
m_Enabled: 1
m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 0d621debd7244988afb98b7c06605f63, type: 3}
+ m_Script: {fileID: 11500000, guid: f85286904d2d45738c4b415f3503d4ab, type: 3}
m_Name:
- m_EditorClassIdentifier:
+ m_EditorClassIdentifier: Assembly-CSharp::NBF.PlayerShoulder
TestZ: 0
--- !u!1 &3637974307122593870
GameObject:
@@ -3334,17 +3346,23 @@ MonoBehaviour:
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
+ 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!1 &4475576859136830028
GameObject:
m_ObjectHideFlags: 0
@@ -3511,10 +3529,10 @@ Rigidbody:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4686840058173970751}
- serializedVersion: 4
+ serializedVersion: 5
m_Mass: 1
- m_Drag: 0
- m_AngularDrag: 0.05
+ 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}
@@ -3583,6 +3601,8 @@ SkinnedMeshRenderer:
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
+ m_ForceMeshLod: -1
+ m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:
@@ -3604,6 +3624,7 @@ SkinnedMeshRenderer:
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
+ m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
@@ -3822,6 +3843,8 @@ SkinnedMeshRenderer:
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
+ m_ForceMeshLod: -1
+ m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:
@@ -3843,6 +3866,7 @@ SkinnedMeshRenderer:
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
+ m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
@@ -4128,12 +4152,10 @@ GameObject:
- component: {fileID: 523589534089097102}
- component: {fileID: 3149647016773794308}
- component: {fileID: 6567531271687267359}
- - component: {fileID: 4874838258577666918}
- - component: {fileID: 8072573713298176091}
- component: {fileID: 4304401782308419094}
- component: {fileID: 6041496193769315420}
- component: {fileID: 5826410683169617913}
- - component: {fileID: 1590585097371921393}
+ - component: {fileID: 6556378698144161009}
m_Layer: 9
m_Name: male
m_TagString: Untagged
@@ -4192,10 +4214,10 @@ Rigidbody:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5559475303044247694}
- serializedVersion: 4
+ serializedVersion: 5
m_Mass: 1
- m_Drag: 0
- m_AngularDrag: 0.05
+ 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}
@@ -4309,88 +4331,6 @@ AudioSource:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
---- !u!114 &4874838258577666918
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 5559475303044247694}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 492fca36d1134a788a47e5bf6f2fdc1e, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- Data:
- PlayerID: 0
- currentGear:
- Type: 1
- rod:
- id: 0
- configId: 0
- reel:
- id: 0
- configId: 0
- currentSpeed: 0.5
- currentDrag: 0.7
- bobber:
- id: 0
- configId: 0
- lastSetGroundValue: 0
- hook:
- id: 0
- configId: 0
- bait:
- id: 0
- configId: 0
- lure:
- id: 0
- configId: 0
- weight:
- id: 0
- configId: 0
- line:
- id: 0
- configId: 0
- leader:
- id: 0
- configId: 0
- feeder:
- id: 0
- configId: 0
- position: {x: 0, y: 0, z: 0}
- rotation: {x: 0, y: 0, z: 0, w: 0}
- currentReelingSpeed: 0
- isHandOnHandle: 0
- lineLength: 0
- reelSpeed: 0
- openLight: 0
- openTelescope: 0
- state: 0
- lineCutTimer: 0
- selectorRodSetting: 0
- CameraRoot: {fileID: 5273066534610348271}
- PlayerAnimatorCtrl: {fileID: 0}
- Gears: {fileID: 0}
- LureTrajectorySimulator: {fileID: 0}
- Light: {fileID: 4424852676135480966}
- BackSpine: {fileID: 2935101413777606001}
- Collider: {fileID: 0}
- Rigidbody: {fileID: 3149647016773794308}
---- !u!114 &8072573713298176091
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 5559475303044247694}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: bd3b33ae0a9148e09ab618b222f8def5, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- Player: {fileID: 4874838258577666918}
- animator: {fileID: 0}
--- !u!120 &4304401782308419094
LineRenderer:
serializedVersion: 2
@@ -4412,6 +4352,8 @@ LineRenderer:
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
+ m_ForceMeshLod: -1
+ m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
@@ -4433,6 +4375,7 @@ LineRenderer:
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
+ m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
@@ -4595,7 +4538,7 @@ CharacterController:
m_SkinWidth: 0.08
m_MinMoveDistance: 0.001
m_Center: {x: 0, y: 0.82, z: 0}
---- !u!114 &1590585097371921393
+--- !u!114 &6556378698144161009
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -4604,12 +4547,10 @@ MonoBehaviour:
m_GameObject: {fileID: 5559475303044247694}
m_Enabled: 1
m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 5cf18b87277f477ab6a9b59759ee17cb, type: 3}
+ m_Script: {fileID: 11500000, guid: cddbe2f2da274f6196485f744b618c86, type: 3}
m_Name:
- m_EditorClassIdentifier:
- CharacterController: {fileID: 0}
- CollisionFlags: 0
- IsSelf: 0
+ m_EditorClassIdentifier: Assembly-CSharp::NBF.PlayerAnimator
+ animator: {fileID: 523589534089097102}
--- !u!1 &5735120231836046354
GameObject:
m_ObjectHideFlags: 0
@@ -5132,7 +5073,7 @@ GameObject:
m_Component:
- component: {fileID: 7587706008879176572}
- component: {fileID: 9220448411272401149}
- - component: {fileID: 6797890359994452233}
+ - component: {fileID: 2638586216203132228}
m_Layer: 9
m_Name: ex_RightArm
m_TagString: Untagged
@@ -5213,7 +5154,7 @@ MonoBehaviour:
maintainRotationWeight: 0
bendModifierWeight: 1
bendGoal: {fileID: 0}
---- !u!114 &6797890359994452233
+--- !u!114 &2638586216203132228
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -5222,15 +5163,15 @@ MonoBehaviour:
m_GameObject: {fileID: 6827275499489474676}
m_Enabled: 1
m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 99467c6c370b440d8bdb517bbbcf22cf, type: 3}
+ m_Script: {fileID: 11500000, guid: ed33e261a2784ee0814ceaa6c88aefdf, type: 3}
m_Name:
- m_EditorClassIdentifier:
+ m_EditorClassIdentifier: Assembly-CSharp::NBF.PlayerArm
IsLeft: 0
IK: {fileID: 9220448411272401149}
RodContainer: {fileID: 8468459431733240144}
LeftRigMagnet: {fileID: 0}
FingerRig: {fileID: 0}
- Shoulder: {fileID: 7463744131801554541}
+ Shoulder: {fileID: 0}
interactionTargetWeight: 0
--- !u!1 &6853846614962554204
GameObject:
@@ -5508,6 +5449,8 @@ SkinnedMeshRenderer:
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
+ m_ForceMeshLod: -1
+ m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:
@@ -5529,6 +5472,7 @@ SkinnedMeshRenderer:
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
+ m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
@@ -5779,6 +5723,8 @@ SkinnedMeshRenderer:
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
+ m_ForceMeshLod: -1
+ m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:
@@ -5800,6 +5746,7 @@ SkinnedMeshRenderer:
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
+ m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
@@ -6810,6 +6757,8 @@ SkinnedMeshRenderer:
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
+ m_ForceMeshLod: -1
+ m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:
@@ -6831,6 +6780,7 @@ SkinnedMeshRenderer:
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
+ m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
diff --git a/Assets/Scenes/StartUp.unity b/Assets/Scenes/StartUp.unity
index 7e8441c9f..84f896e92 100644
--- a/Assets/Scenes/StartUp.unity
+++ b/Assets/Scenes/StartUp.unity
@@ -175,7 +175,6 @@ MonoBehaviour:
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
@@ -183,6 +182,7 @@ MonoBehaviour:
m_MipBias: 0
m_VarianceClampScale: 0.9
m_ContrastAdaptiveSharpening: 0
+ m_Version: 2
--- !u!20 &174907468
Camera:
m_ObjectHideFlags: 0
@@ -500,17 +500,23 @@ MonoBehaviour:
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: 1
+ 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!114 &410087043
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -923,7 +929,6 @@ MonoBehaviour:
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
@@ -931,6 +936,7 @@ MonoBehaviour:
m_MipBias: 0
m_VarianceClampScale: 0.9
m_ContrastAdaptiveSharpening: 0
+ m_Version: 2
--- !u!4 &6098876000977740681
Transform:
m_ObjectHideFlags: 0
@@ -985,6 +991,7 @@ GameObject:
- component: {fileID: 6098876000977740681}
- component: {fileID: 1341717235351337375}
- component: {fileID: 7388915548948935574}
+ - component: {fileID: 7388915548948935575}
m_Layer: 0
m_Name: Init
m_TagString: Untagged
@@ -1010,6 +1017,18 @@ MonoBehaviour:
uiGroup: {fileID: -7702456625070306757, guid: 66dbad8598d60494fab0927844c88cc0, type: 2}
ambientGroup: {fileID: -4979278990015000519, guid: 66dbad8598d60494fab0927844c88cc0, type: 2}
playerGroup: {fileID: -5706599233093607984, guid: 66dbad8598d60494fab0927844c88cc0, type: 2}
+--- !u!114 &7388915548948935575
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 7388915548948935573}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 55a2b6b470ce459c8ca8cda7eadb8934, type: 3}
+ m_Name:
+ m_EditorClassIdentifier: Assembly-CSharp::NBF.Global
--- !u!1660057539 &9223372036854775807
SceneRoots:
m_ObjectHideFlags: 0
diff --git a/Assets/Scripts/Common/Events.cs b/Assets/Scripts/Common/Events.cs
index 87794c09f..87ca20a01 100644
--- a/Assets/Scripts/Common/Events.cs
+++ b/Assets/Scripts/Common/Events.cs
@@ -7,13 +7,22 @@ namespace NBF
public int Error { get; set; }
}
+ ///
+ /// 相机模式切换
+ ///
+ public struct CameraChangeMode
+ {
+ public CameraShowMode Mode;
+ public MapUnit Unit;
+ }
+
///
/// 开始切换场景
///
public struct SceneChangeStart
{
}
-
+
///
/// Loading进度变化
///
diff --git a/Assets/Scripts/Configs/Mem/CameraCfg.cs b/Assets/Scripts/Configs/Mem/CameraCfg.cs
new file mode 100644
index 000000000..f09a3ae5b
--- /dev/null
+++ b/Assets/Scripts/Configs/Mem/CameraCfg.cs
@@ -0,0 +1,68 @@
+using System;
+using UnityEngine;
+
+namespace NBF
+{
+ public enum CameraUpdateMode
+ {
+ Smooth,
+ Immediate,
+ }
+
+ public enum CameraMode
+ {
+ Third,
+ Free,
+ }
+
+ [Serializable]
+ public class CameraCfg
+ {
+ public CameraMode Mode;
+ public CameraUpdateMode UpdateMode;
+
+ public float SmoothTime;
+
+ public float NearClipPlane = 1;
+ public float FarClipPlane = 500;
+
+ public Vector3 Near;
+ public Vector3 Far;
+ public float BestRatio = 0.5f;
+
+ public Vector3 Distance
+ {
+ get { return this.Far - this.Near; }
+ }
+
+ public Vector3 Best
+ {
+ get
+ {
+ switch (Mode)
+ {
+ case CameraMode.Third:
+ return this.Near + (this.Far - this.Near) * this.BestRatio;
+ default:
+ return Quaternion.Euler(this.PitchBest, 0, 0) *
+ (Vector3.back * (this.Near + (this.Far - this.Near) * this.BestRatio).magnitude);
+ }
+ }
+ }
+
+ public float Yaw;
+ public bool YawAtThird;
+
+ public float PitchBest;
+ public float PitchMin;
+ public float PitchMax;
+ }
+
+ [CreateAssetMenu(menuName = "ET/CreateCameraConfig", fileName = "CameraCfg", order = 1)]
+ public class CameraScriptObject : ScriptableObject
+ {
+ public float ScaleTime = 6;
+ public CameraCfg ThirdCfg;
+ public CameraCfg FreeCfg;
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Configs/Mem/CameraCfg.cs.meta b/Assets/Scripts/Configs/Mem/CameraCfg.cs.meta
new file mode 100644
index 000000000..317f73ee2
--- /dev/null
+++ b/Assets/Scripts/Configs/Mem/CameraCfg.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 5f43c20e40ae42239e4381c12ad7cc00
+timeCreated: 1756823027
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Camera.meta b/Assets/Scripts/Fishing2/Camera.meta
new file mode 100644
index 000000000..2924615b7
--- /dev/null
+++ b/Assets/Scripts/Fishing2/Camera.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 0eb35ab0b70344b4a2b6054f7a7ecd1b
+timeCreated: 1756822717
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Camera/CameraComponent.cs b/Assets/Scripts/Fishing2/Camera/CameraComponent.cs
new file mode 100644
index 000000000..fe79a113a
--- /dev/null
+++ b/Assets/Scripts/Fishing2/Camera/CameraComponent.cs
@@ -0,0 +1,67 @@
+using NBC;
+using NBC.Entitas;
+using NBC.Entitas.Interface;
+using NBC.Event;
+using UnityEditor;
+using UnityEngine;
+
+namespace NBF.Fishing2
+{
+ public enum CameraShowMode
+ {
+ Player,
+ Free,
+ }
+
+ public class CameraComponent : Entity
+ {
+ public CameraShowMode Mode;
+ public Camera Camera;
+ public MapUnit MapUnit;
+ }
+
+ public static class CameraComponentSystem
+ {
+ public class CameraComponentAwakeSystem : AwakeSystem
+ {
+ protected override void Awake(CameraComponent self)
+ {
+ self.Camera = BaseCamera.Main;
+ }
+ }
+
+ public class CameraChangeModeEvent : EventSystem
+ {
+ protected override void Handler(CameraChangeMode self)
+ {
+ var cameraComponent = App.Main.GetComponent();
+ cameraComponent.Mode = self.Mode;
+ cameraComponent.MapUnit = self.Unit;
+ cameraComponent.ChangeCameraMode();
+ }
+ }
+
+ public static void ChangeCameraMode(this CameraComponent self)
+ {
+ if (self.Mode == CameraShowMode.Player)
+ {
+ if (self.MapUnit != null)
+ {
+ var unityComponent = self.MapUnit.GetComponent();
+ if (unityComponent != null)
+ {
+ var root = unityComponent.Transform.Find("FPSCamera");
+ self.Camera.transform.SetParent(root);
+ self.Camera.transform.localPosition = Vector3.zero;
+ self.Camera.transform.localRotation = Quaternion.identity;
+ self.Camera.transform.localScale = Vector3.one;
+ }
+ }
+ }
+ else if (self.Mode == CameraShowMode.Free)
+ {
+ self.Camera.transform.SetParent(null);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Camera/CameraComponent.cs.meta b/Assets/Scripts/Fishing2/Camera/CameraComponent.cs.meta
new file mode 100644
index 000000000..19cdad553
--- /dev/null
+++ b/Assets/Scripts/Fishing2/Camera/CameraComponent.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: aee3947bbf944ecb9e955d2ac1d9e3a5
+timeCreated: 1756822741
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Data/Move/MoveComponent.cs b/Assets/Scripts/Fishing2/Camera/InputComponent.cs
similarity index 63%
rename from Assets/Scripts/Fishing2/Data/Move/MoveComponent.cs
rename to Assets/Scripts/Fishing2/Camera/InputComponent.cs
index e1d06fb3b..0dc4e48d8 100644
--- a/Assets/Scripts/Fishing2/Data/Move/MoveComponent.cs
+++ b/Assets/Scripts/Fishing2/Camera/InputComponent.cs
@@ -2,7 +2,7 @@
namespace NBF.Fishing2
{
- public class MoveComponent : Entity
+ public class InputComponent : Entity
{
}
diff --git a/Assets/Scripts/Fishing2/Camera/InputComponent.cs.meta b/Assets/Scripts/Fishing2/Camera/InputComponent.cs.meta
new file mode 100644
index 000000000..f0ed7e274
--- /dev/null
+++ b/Assets/Scripts/Fishing2/Camera/InputComponent.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 09132878c89a444a88421b7434394235
+timeCreated: 1756826439
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Camera/SettingComponent.cs b/Assets/Scripts/Fishing2/Camera/SettingComponent.cs
new file mode 100644
index 000000000..f5e802583
--- /dev/null
+++ b/Assets/Scripts/Fishing2/Camera/SettingComponent.cs
@@ -0,0 +1,9 @@
+using NBC.Entitas;
+
+namespace NBF.Fishing2
+{
+ public class SettingComponent : Entity
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Camera/SettingComponent.cs.meta b/Assets/Scripts/Fishing2/Camera/SettingComponent.cs.meta
new file mode 100644
index 000000000..6beb87a8d
--- /dev/null
+++ b/Assets/Scripts/Fishing2/Camera/SettingComponent.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 7c6adcf67ef545f99c590d1078a76eea
+timeCreated: 1756826460
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Data.meta b/Assets/Scripts/Fishing2/Data.meta
deleted file mode 100644
index 256284f21..000000000
--- a/Assets/Scripts/Fishing2/Data.meta
+++ /dev/null
@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: 67d5b3b1b06a4f60875ee66ec05d6205
-timeCreated: 1756364079
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Data/Bag.meta b/Assets/Scripts/Fishing2/Data/Bag.meta
deleted file mode 100644
index 9331e6e81..000000000
--- a/Assets/Scripts/Fishing2/Data/Bag.meta
+++ /dev/null
@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: 7924ca863f4b4ce8a7018a42852431a6
-timeCreated: 1756564816
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Data/Bag/Bag.cs b/Assets/Scripts/Fishing2/Data/Bag/Bag.cs
deleted file mode 100644
index f7797f6fc..000000000
--- a/Assets/Scripts/Fishing2/Data/Bag/Bag.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using NBC.Entitas;
-
-namespace NBF.Fishing2
-{
- ///
- /// 背包
- ///
- public class Bag : Entity
- {
-
- }
-}
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Data/Bag/Bag.cs.meta b/Assets/Scripts/Fishing2/Data/Bag/Bag.cs.meta
deleted file mode 100644
index c8cd35d4a..000000000
--- a/Assets/Scripts/Fishing2/Data/Bag/Bag.cs.meta
+++ /dev/null
@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: 2176086bd28445acb23a458c20d016ab
-timeCreated: 1756564836
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Data/Map/Map.cs b/Assets/Scripts/Fishing2/Data/Map/Map.cs
deleted file mode 100644
index 87a1524e5..000000000
--- a/Assets/Scripts/Fishing2/Data/Map/Map.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-using NBC.Entitas;
-
-namespace NBF.Fishing2
-{
- public class Map : Entity
- {
- public int MapId;
- ///
- /// 好友房地图
- ///
- public bool IsRoomMap;
-
- ///
- /// 地图中的单位
- ///
- public Dictionary Units = new Dictionary();
- }
-
-}
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Data/Role/Role.cs b/Assets/Scripts/Fishing2/Data/Role/Role.cs
deleted file mode 100644
index 2a0ee34ed..000000000
--- a/Assets/Scripts/Fishing2/Data/Role/Role.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using NBC;
-using NBC.Entitas;
-using NBC.Entitas.Interface;
-
-namespace NBF.Fishing2
-{
- public class Role : Entity
- {
- public long RoomId { get; set; }
- public RoleInfo Info { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Data/System.meta b/Assets/Scripts/Fishing2/Data/System.meta
deleted file mode 100644
index 1b6b57cb1..000000000
--- a/Assets/Scripts/Fishing2/Data/System.meta
+++ /dev/null
@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: 8e7f0c94a8514f5fa23bcc283e7abdc4
-timeCreated: 1756049392
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Data/System/MapSystem.cs.meta b/Assets/Scripts/Fishing2/Data/System/MapSystem.cs.meta
deleted file mode 100644
index bdf5c359c..000000000
--- a/Assets/Scripts/Fishing2/Data/System/MapSystem.cs.meta
+++ /dev/null
@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: 6e4715bc722c4438ae8603fab6232e81
-timeCreated: 1756049567
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Data/System/RoleSystem.cs.meta b/Assets/Scripts/Fishing2/Data/System/RoleSystem.cs.meta
deleted file mode 100644
index a8a3c8585..000000000
--- a/Assets/Scripts/Fishing2/Data/System/RoleSystem.cs.meta
+++ /dev/null
@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: 56a84b9175e14d59ad68a999f549a821
-timeCreated: 1756738863
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Data/System/UnitSystem.cs b/Assets/Scripts/Fishing2/Data/System/UnitSystem.cs
deleted file mode 100644
index 0d20bc166..000000000
--- a/Assets/Scripts/Fishing2/Data/System/UnitSystem.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using NBC;
-
-namespace NBF.Fishing2
-{
- public static class UnitSystem
- {
- public static void SetUnitInfo(this MapUnit self, MapUnitInfo unitInfo)
- {
- NumericComponent numericComponent = self.AddComponent();
- foreach (var kv in unitInfo.KV)
- {
- numericComponent.Set(kv.Key, kv.Value);
- }
- }
-
- public static UnitConfig Config(this MapUnit self)
- {
- return UnitConfig.Get(self.ConfigId);
- }
-
- public static UnitType Type(this MapUnit self)
- {
- return self.Config().Type;
- }
-
-
- }
-}
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Data/System/UnitSystem.cs.meta b/Assets/Scripts/Fishing2/Data/System/UnitSystem.cs.meta
deleted file mode 100644
index 0948c54cb..000000000
--- a/Assets/Scripts/Fishing2/Data/System/UnitSystem.cs.meta
+++ /dev/null
@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: 1e34ab621bcb45b1af37fca0b06878bb
-timeCreated: 1756049584
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Helper/MapHelper.cs b/Assets/Scripts/Fishing2/Helper/MapHelper.cs
index 479b5e4df..b90619e43 100644
--- a/Assets/Scripts/Fishing2/Helper/MapHelper.cs
+++ b/Assets/Scripts/Fishing2/Helper/MapHelper.cs
@@ -1,6 +1,8 @@
using System;
using NBC;
using NBC.Entitas;
+using UnityEngine;
+using Object = System.Object;
namespace NBF.Fishing2
{
@@ -83,9 +85,9 @@ namespace NBF.Fishing2
public static async FTask LoadMap(this Map self)
{
var sceneName = "Map99";
+ self.CreteSelfMapUnit();
//加载场景==
await SceneHelper.LoadScene(sceneName);
- self.CreteSelfMapUnit();
await self.LoadAllUnit();
FishingPanel.Show();
@@ -96,12 +98,22 @@ namespace NBF.Fishing2
#endregion
#region Unit
+
///
/// 加载所有unit单位
///
///
public static async FTask LoadAllUnit(this Map self)
{
+ MapUnit mapUnit = null;
+ foreach (var (_, unit) in self.Units)
+ {
+ var unitUnity = unit.AddComponent();
+ await unitUnity.InitUnityObject();
+ mapUnit = unit;
+ }
+
+ self.Scene.EventComponent.Publish(new CameraChangeMode() { Mode = CameraShowMode.Player, Unit = mapUnit });
}
#endregion
diff --git a/Assets/Scripts/Fishing2/Helper/MoveHelper.cs b/Assets/Scripts/Fishing2/Helper/MoveHelper.cs
new file mode 100644
index 000000000..5d0f9218d
--- /dev/null
+++ b/Assets/Scripts/Fishing2/Helper/MoveHelper.cs
@@ -0,0 +1,24 @@
+using System.Collections.Generic;
+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
new file mode 100644
index 000000000..8ef580f00
--- /dev/null
+++ b/Assets/Scripts/Fishing2/Helper/MoveHelper.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 2ce11e50e0d749bfa5915208b1ce1a44
+timeCreated: 1756822516
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/View/Helper/PrefabsHelper.cs b/Assets/Scripts/Fishing2/Helper/PrefabsHelper.cs
similarity index 100%
rename from Assets/Scripts/Fishing2/View/Helper/PrefabsHelper.cs
rename to Assets/Scripts/Fishing2/Helper/PrefabsHelper.cs
diff --git a/Assets/Scripts/Fishing2/View/Helper/PrefabsHelper.cs.meta b/Assets/Scripts/Fishing2/Helper/PrefabsHelper.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/View/Helper/PrefabsHelper.cs.meta
rename to Assets/Scripts/Fishing2/Helper/PrefabsHelper.cs.meta
diff --git a/Assets/Scripts/Fishing2/Data/Map.meta b/Assets/Scripts/Fishing2/Map.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Map.meta
rename to Assets/Scripts/Fishing2/Map.meta
diff --git a/Assets/Scripts/Fishing2/Data/System/MapSystem.cs b/Assets/Scripts/Fishing2/Map/Map.cs
similarity index 52%
rename from Assets/Scripts/Fishing2/Data/System/MapSystem.cs
rename to Assets/Scripts/Fishing2/Map/Map.cs
index eb01e1443..12961f23f 100644
--- a/Assets/Scripts/Fishing2/Data/System/MapSystem.cs
+++ b/Assets/Scripts/Fishing2/Map/Map.cs
@@ -1,27 +1,43 @@
+using System;
using System.Collections.Generic;
using NBC;
using NBC.Entitas;
namespace NBF.Fishing2
{
- public static class MapSystem
+ public class Map : Entity
{
+ public int MapId;
+
+ ///
+ /// 好友房地图
+ ///
+ public bool IsRoomMap;
+
+ ///
+ /// 地图中的单位
+ ///
+ public Dictionary Units = new Dictionary();
+
+
+
+
///
/// 创建地图单位
///
///
- public static void CreteSelfMapUnit(this Map map)
+ public void CreteSelfMapUnit()
{
//创建自己
- var role = map.Scene.GetComponent();
+ var role = Scene.GetComponent();
var mapUnitInfo = role.GetMapUnitInfo();
- map.CreteMapUnit(mapUnitInfo);
+ CreteMapUnit(mapUnitInfo);
}
- public static void CreteMapUnit(this Map map, MapUnitInfo unitInfo)
+ public void CreteMapUnit(MapUnitInfo unitInfo)
{
- var mapUnit = Entity.Create(map.Scene, unitInfo.RoleInfo.RoleId, true, true);
- map.Add(mapUnit);
+ var mapUnit = Entity.Create(Scene, unitInfo.RoleInfo.RoleId, true, true);
+ Add(mapUnit);
}
///
@@ -30,9 +46,9 @@ namespace NBF.Fishing2
///
///
///
- public static MapUnit GetUnit(this Map self, long id)
+ public MapUnit GetUnit(long id)
{
- return self.Units.GetValueOrDefault(id);
+ return Units.GetValueOrDefault(id);
}
///
@@ -41,9 +57,9 @@ namespace NBF.Fishing2
///
///
///
- public static bool Add(this Map map, MapUnit unit)
+ public bool Add(MapUnit unit)
{
- map.Units.Add(unit.Id, unit);
+ Units.Add(unit.Id, unit);
return true;
}
@@ -53,9 +69,9 @@ namespace NBF.Fishing2
///
///
///
- public static bool Remove(this Map self, long id)
+ public bool Remove(long id)
{
- return self.Units.Remove(id);
+ return Units.Remove(id);
}
}
}
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Data/Map/Map.cs.meta b/Assets/Scripts/Fishing2/Map/Map.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Map/Map.cs.meta
rename to Assets/Scripts/Fishing2/Map/Map.cs.meta
diff --git a/Assets/Scripts/Fishing2/Data/Map/Map2C_ChangeMapHandler.cs b/Assets/Scripts/Fishing2/Map/Map2C_ChangeMapHandler.cs
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Map/Map2C_ChangeMapHandler.cs
rename to Assets/Scripts/Fishing2/Map/Map2C_ChangeMapHandler.cs
diff --git a/Assets/Scripts/Fishing2/Data/Map/Map2C_ChangeMapHandler.cs.meta b/Assets/Scripts/Fishing2/Map/Map2C_ChangeMapHandler.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Map/Map2C_ChangeMapHandler.cs.meta
rename to Assets/Scripts/Fishing2/Map/Map2C_ChangeMapHandler.cs.meta
diff --git a/Assets/Scripts/Fishing2/Data/Map/MapManageComponent.cs b/Assets/Scripts/Fishing2/Map/MapManageComponent.cs
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Map/MapManageComponent.cs
rename to Assets/Scripts/Fishing2/Map/MapManageComponent.cs
diff --git a/Assets/Scripts/Fishing2/Data/Map/MapManageComponent.cs.meta b/Assets/Scripts/Fishing2/Map/MapManageComponent.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Map/MapManageComponent.cs.meta
rename to Assets/Scripts/Fishing2/Map/MapManageComponent.cs.meta
diff --git a/Assets/Scripts/Fishing2/Mono.meta b/Assets/Scripts/Fishing2/Mono.meta
new file mode 100644
index 000000000..aea265927
--- /dev/null
+++ b/Assets/Scripts/Fishing2/Mono.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 53262d3faa5141deb0c8809a4354daa0
+timeCreated: 1756820602
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Mono/PlayerAnimator.cs b/Assets/Scripts/Fishing2/Mono/PlayerAnimator.cs
new file mode 100644
index 000000000..c6e3a24c9
--- /dev/null
+++ b/Assets/Scripts/Fishing2/Mono/PlayerAnimator.cs
@@ -0,0 +1,353 @@
+using System;
+using UnityEngine;
+using UnityEngine.Serialization;
+
+namespace NBF
+{
+ public enum ThrowModeEnum : int
+ {
+ Spin = 0,
+ Float = 1,
+ }
+
+ public enum HandItemType
+ {
+ Default = 0,
+ HandRod = 1,
+ SpinRod = 2,
+ }
+
+ public class PlayerAnimator : MonoBehaviour
+ {
+ #region 参数定义
+
+ private static readonly int StartThrowHash = Animator.StringToHash("startThrow");
+ private static readonly int LureThrownHash = Animator.StringToHash("lureThrown");
+ private static readonly int PrepareThrowHash = Animator.StringToHash("prepareThrow");
+ private static readonly int LeftHandHash = Animator.StringToHash("leftHand");
+ private static readonly int MoveSpeedHash = Animator.StringToHash("moveSpeed");
+ private static readonly int BoatVelocityHash = Animator.StringToHash("boatVelocity");
+ private static readonly int BoatDirHash = Animator.StringToHash("boatDir");
+ private static readonly int BoatHash = Animator.StringToHash("boat");
+ private static readonly int CastingHash = Animator.StringToHash("casting");
+ private static readonly int TelestickHash = Animator.StringToHash("telestick");
+ private static readonly int TelestickPullHash = Animator.StringToHash("telestick_pull");
+ private static readonly int UseRodPodHash = Animator.StringToHash("use_rod_pod");
+ private static readonly int ItemSourceHash = Animator.StringToHash("item_source");
+ private static readonly int ItemDestHash = Animator.StringToHash("item_dest");
+ private static readonly int RodReadyHash = Animator.StringToHash("rod_ready");
+ private static readonly int HitchRecoverDirHash = Animator.StringToHash("hitchRecoverDir");
+ private static readonly int HitchRecoverHash = Animator.StringToHash("hitchRecover");
+ private static readonly int SitOrStandHash = Animator.StringToHash("sitOrStand");
+ private static readonly int ShtekerHash = Animator.StringToHash("shteker");
+ private static readonly int ItemInHandsHash = Animator.StringToHash("item_in_hands");
+ private static readonly int ChangeItemHash = Animator.StringToHash("change_item");
+ private static readonly int ItemTypeHash = Animator.StringToHash("item_type");
+ private static readonly int ItemActionHash = Animator.StringToHash("item_action");
+ private static readonly int ItemActionPowerHash = Animator.StringToHash("item_action_power");
+ private static readonly int PodsakActionHash = Animator.StringToHash("podsak_action");
+ private static readonly int FishingFinalHash = Animator.StringToHash("fishing_final");
+ private static readonly int SpinOrTeleHash = Animator.StringToHash("spin_or_tele");
+ private static readonly int TwitchHash = Animator.StringToHash("twitch");
+ private static readonly int TwitchDirHash = Animator.StringToHash("twitch_dir");
+ private static readonly int ThrowSpeedMultHash = Animator.StringToHash("throw_speed_mult");
+ private static readonly int ConvTestHash = Animator.StringToHash("conv_test");
+ private static readonly int BoatPoseHash = Animator.StringToHash("boat_pose");
+ private static readonly int QuadDirectionHash = Animator.StringToHash("quad_direction");
+ private static readonly int StretchMaxHash = Animator.StringToHash("stretch_max");
+ private static readonly int ExamineItemHash = Animator.StringToHash("examine_item");
+ private static readonly int TillerDirectionHash = Animator.StringToHash("tiller_direction");
+ private static readonly int TestTriggerHash = Animator.StringToHash("test_trigger");
+ private static readonly int ThrowModeHash = Animator.StringToHash("throw_mode");
+ private static readonly int PullUpRodHash = Animator.StringToHash("pull_up_rod");
+
+ public bool StartThrow
+ {
+ get => animator.GetBool(StartThrowHash);
+ set => animator.SetBool(StartThrowHash, value);
+ }
+
+ public bool LureThrown
+ {
+ get => animator.GetBool(LureThrownHash);
+ set => animator.SetBool(LureThrownHash, value);
+ }
+
+ public bool PrepareThrow
+ {
+ get => animator.GetBool(PrepareThrowHash);
+ set => animator.SetBool(PrepareThrowHash, value);
+ }
+
+ public bool LeftHand
+ {
+ get => animator.GetBool(LeftHandHash);
+ set => animator.SetBool(LeftHandHash, value);
+ }
+
+ public float MoveSpeed
+ {
+ get => animator.GetFloat(MoveSpeedHash);
+ set => animator.SetFloat(MoveSpeedHash, value);
+ }
+
+ public float BoatVelocity
+ {
+ get => animator.GetFloat(BoatVelocityHash);
+ set => animator.SetFloat(BoatVelocityHash, value);
+ }
+
+ public float BoatDir
+ {
+ get => animator.GetFloat(BoatDirHash);
+ set => animator.SetFloat(BoatDirHash, value);
+ }
+
+ public bool Boat
+ {
+ get => animator.GetBool(BoatHash);
+ set => animator.SetBool(BoatHash, value);
+ }
+
+ public bool Casting
+ {
+ get => animator.GetBool(CastingHash);
+ set => animator.SetBool(CastingHash, value);
+ }
+
+ public bool Telestick
+ {
+ get => animator.GetBool(TelestickHash);
+ set => animator.SetBool(TelestickHash, value);
+ }
+
+ public bool TelestickPull
+ {
+ get => animator.GetBool(TelestickPullHash);
+ set => animator.SetBool(TelestickPullHash, value);
+ }
+
+ public bool UseRodPod
+ {
+ get => animator.GetBool(UseRodPodHash);
+ set => animator.SetBool(UseRodPodHash, value);
+ }
+
+ public int ItemSource
+ {
+ get => animator.GetInteger(ItemSourceHash);
+ set => animator.SetInteger(ItemSourceHash, value);
+ }
+
+ public int ItemDest
+ {
+ get => animator.GetInteger(ItemDestHash);
+ set => animator.SetInteger(ItemDestHash, value);
+ }
+
+ public bool RodReady
+ {
+ get => animator.GetBool(RodReadyHash);
+ set => animator.SetBool(RodReadyHash, value);
+ }
+
+ public float HitchRecoverDir
+ {
+ get => animator.GetFloat(HitchRecoverDirHash);
+ set => animator.SetFloat(HitchRecoverDirHash, value);
+ }
+
+ public void SetHitchRecoverTrigger()
+ {
+ animator.SetTrigger(HitchRecoverHash);
+ }
+
+ public void ResetHitchRecoverTrigger()
+ {
+ animator.ResetTrigger(HitchRecoverHash);
+ }
+
+ public float SitOrStand
+ {
+ get => animator.GetFloat(SitOrStandHash);
+ set => animator.SetFloat(SitOrStandHash, value);
+ }
+
+ public bool Shteker
+ {
+ get => animator.GetBool(ShtekerHash);
+ set => animator.SetBool(ShtekerHash, value);
+ }
+
+ public bool ItemInHands
+ {
+ get => animator.GetBool(ItemInHandsHash);
+ set => animator.SetBool(ItemInHandsHash, value);
+ }
+
+ public bool ChangeItem
+ {
+ get => animator.GetBool(ChangeItemHash);
+ set => animator.SetBool(ChangeItemHash, value);
+ }
+
+ public HandItemType ItemType
+ {
+ get => (HandItemType)animator.GetInteger(ItemTypeHash);
+ set => animator.SetInteger(ItemTypeHash, (int)value);
+ }
+
+ public void SetItemActionTrigger()
+ {
+ animator.SetTrigger(ItemActionHash);
+ }
+
+ public void ResetItemActionTrigger()
+ {
+ animator.ResetTrigger(ItemActionHash);
+ }
+
+ public float ItemActionPower
+ {
+ get => animator.GetFloat(ItemActionPowerHash);
+ set => animator.SetFloat(ItemActionPowerHash, value);
+ }
+
+ public bool PodsakAction
+ {
+ get => animator.GetBool(PodsakActionHash);
+ set => animator.SetBool(PodsakActionHash, value);
+ }
+
+ public bool PullUpRod
+ {
+ get => animator.GetBool(PullUpRodHash);
+ set => animator.SetBool(PullUpRodHash, value);
+ }
+
+ public float FishingFinal
+ {
+ get => animator.GetFloat(FishingFinalHash);
+ set => animator.SetFloat(FishingFinalHash, value);
+ }
+
+ public float SpinOrTele
+ {
+ get => animator.GetFloat(SpinOrTeleHash);
+ set => animator.SetFloat(SpinOrTeleHash, value);
+ }
+
+ public void SetTwitchTrigger()
+ {
+ animator.SetTrigger(TwitchHash);
+ }
+
+ public void ResetTwitchTrigger()
+ {
+ animator.ResetTrigger(TwitchHash);
+ }
+
+ public float TwitchDir
+ {
+ get => animator.GetFloat(TwitchDirHash);
+ set => animator.SetFloat(TwitchDirHash, value);
+ }
+
+ public float ThrowSpeedMult
+ {
+ get => animator.GetFloat(ThrowSpeedMultHash);
+ set => animator.SetFloat(ThrowSpeedMultHash, value);
+ }
+
+ public void SetConvTestTrigger()
+ {
+ animator.SetTrigger(ConvTestHash);
+ }
+
+ public void ResetConvTestTrigger()
+ {
+ animator.ResetTrigger(ConvTestHash);
+ }
+
+ public int BoatPose
+ {
+ get => animator.GetInteger(BoatPoseHash);
+ set => animator.SetInteger(BoatPoseHash, value);
+ }
+
+ public float QuadDirection
+ {
+ get => animator.GetFloat(QuadDirectionHash);
+ set => animator.SetFloat(QuadDirectionHash, value);
+ }
+
+ public bool StretchMax
+ {
+ get => animator.GetBool(StretchMaxHash);
+ set => animator.SetBool(StretchMaxHash, value);
+ }
+
+ public void SetExamineItemTrigger()
+ {
+ animator.SetTrigger(ExamineItemHash);
+ }
+
+ public void ResetExamineItemTrigger()
+ {
+ animator.ResetTrigger(ExamineItemHash);
+ }
+
+ public float TillerDirection
+ {
+ get => animator.GetFloat(TillerDirectionHash);
+ set => animator.SetFloat(TillerDirectionHash, value);
+ }
+
+ public void SetTestTrigger()
+ {
+ animator.SetTrigger(TestTriggerHash);
+ }
+
+ public void ResetTestTrigger()
+ {
+ animator.ResetTrigger(TestTriggerHash);
+ }
+
+ public ThrowModeEnum ThrowMode
+ {
+ get
+ {
+ var val = animator.GetInteger(ThrowModeHash);
+ return (ThrowModeEnum)val;
+ }
+ set => animator.SetInteger(ThrowModeHash, (int)value);
+ }
+
+ #endregion
+
+ // public FPlayer Player;
+
+ public Animator animator;
+
+ private void Awake()
+ {
+ animator = GetComponent();
+ }
+
+
+ #region 动画事件回调
+
+ ///
+ /// 抛竿开始
+ ///
+ public void RodForceThrowStart()
+ {
+ // if (Player.Fsm.CurrentState is PlayerThrow playerThrow)
+ // {
+ // playerThrow.RodForceThrowStart();
+ // }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Mono/PlayerAnimator.cs.meta b/Assets/Scripts/Fishing2/Mono/PlayerAnimator.cs.meta
new file mode 100644
index 000000000..336503a18
--- /dev/null
+++ b/Assets/Scripts/Fishing2/Mono/PlayerAnimator.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: cddbe2f2da274f6196485f744b618c86
+timeCreated: 1756820608
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Mono/PlayerArm.cs b/Assets/Scripts/Fishing2/Mono/PlayerArm.cs
new file mode 100644
index 000000000..c2737695d
--- /dev/null
+++ b/Assets/Scripts/Fishing2/Mono/PlayerArm.cs
@@ -0,0 +1,58 @@
+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
new file mode 100644
index 000000000..81c0ddbb3
--- /dev/null
+++ b/Assets/Scripts/Fishing2/Mono/PlayerArm.cs.meta
@@ -0,0 +1,3 @@
+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
new file mode 100644
index 000000000..cf5eb1df9
--- /dev/null
+++ b/Assets/Scripts/Fishing2/Mono/PlayerShoulder.cs
@@ -0,0 +1,37 @@
+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
new file mode 100644
index 000000000..9740bc3dd
--- /dev/null
+++ b/Assets/Scripts/Fishing2/Mono/PlayerShoulder.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: f85286904d2d45738c4b415f3503d4ab
+timeCreated: 1756820965
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Data/Move.meta b/Assets/Scripts/Fishing2/Move.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Move.meta
rename to Assets/Scripts/Fishing2/Move.meta
diff --git a/Assets/Scripts/Fishing2/Move/MoveComponent.cs b/Assets/Scripts/Fishing2/Move/MoveComponent.cs
new file mode 100644
index 000000000..b0167f789
--- /dev/null
+++ b/Assets/Scripts/Fishing2/Move/MoveComponent.cs
@@ -0,0 +1,62 @@
+using System.Collections.Generic;
+using NBC;
+using NBC.Entitas;
+using Unity.Mathematics;
+
+namespace NBF.Fishing2
+{
+ public class MoveComponent : Entity
+ {
+ public float3 PreTarget
+ {
+ get { return this.Targets[this.N - 1]; }
+ }
+
+ public float3 NextTarget
+ {
+ get { return this.Targets[this.N]; }
+ }
+
+ // 开启移动协程的时间
+ public long BeginTime;
+
+ // 每个点的开始时间
+ public long StartTime { get; set; }
+
+ // 开启移动协程的Unit的位置
+ public float3 StartPos;
+
+ public float3 RealPos
+ {
+ get { return this.Targets[0]; }
+ }
+
+ private long needTime;
+
+ public long NeedTime
+ {
+ get { return this.needTime; }
+ set { this.needTime = value; }
+ }
+
+ public long MoveTimer;
+
+ public float Speed; // m/s
+
+ public FTask tcs;
+
+ public List Targets = new List();
+
+ public float3 FinalTarget
+ {
+ get { return this.Targets[^1]; }
+ }
+
+ public int N;
+ public int TurnTime;
+ public bool IsTurnHorizontal;
+
+ public quaternion From;
+ public quaternion To;
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Data/Move/MoveComponent.cs.meta b/Assets/Scripts/Fishing2/Move/MoveComponent.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Move/MoveComponent.cs.meta
rename to Assets/Scripts/Fishing2/Move/MoveComponent.cs.meta
diff --git a/Assets/Scripts/Fishing2/Data/Role.meta b/Assets/Scripts/Fishing2/Role.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Role.meta
rename to Assets/Scripts/Fishing2/Role.meta
diff --git a/Assets/Scripts/Fishing2/Data/System/RoleSystem.cs b/Assets/Scripts/Fishing2/Role/Role.cs
similarity index 65%
rename from Assets/Scripts/Fishing2/Data/System/RoleSystem.cs
rename to Assets/Scripts/Fishing2/Role/Role.cs
index 1a28b2026..636a27053 100644
--- a/Assets/Scripts/Fishing2/Data/System/RoleSystem.cs
+++ b/Assets/Scripts/Fishing2/Role/Role.cs
@@ -1,10 +1,15 @@
using NBC;
+using NBC.Entitas;
using NBC.Entitas.Interface;
namespace NBF.Fishing2
{
- public static class RoleSystem
+ public class Role : Entity
{
+ public long RoomId { get; set; }
+ public RoleInfo Info { get; set; }
+
+
public class RoleDestroySystem : DestroySystem
{
protected override void Destroy(Role self)
@@ -14,22 +19,21 @@ namespace NBF.Fishing2
}
}
- public static async FTask GetRoleInfo(this Role self)
+ public async FTask GetRoleInfo()
{
var response = (Game2C_GetRoleInfoResponse)await Net.Call(new C2Game_GetRoleInfoRequest());
- self.RoomId = response.RoomId;
- self.Info = response.RoleInfo;
+ RoomId = response.RoomId;
+ Info = response.RoleInfo;
}
- public static MapUnitInfo GetMapUnitInfo(this Role self)
+ public MapUnitInfo GetMapUnitInfo()
{
MapUnitInfo mapUnit = new MapUnitInfo();
- mapUnit.Id = self.Id;
+ mapUnit.Id = Id;
mapUnit.RoleInfo = new RoleSimpleInfo()
{
-
};
-
+
return mapUnit;
}
}
diff --git a/Assets/Scripts/Fishing2/Data/Role/Role.cs.meta b/Assets/Scripts/Fishing2/Role/Role.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Role/Role.cs.meta
rename to Assets/Scripts/Fishing2/Role/Role.cs.meta
diff --git a/Assets/Scripts/Fishing2/Data/Unit.meta b/Assets/Scripts/Fishing2/Unit.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit.meta
rename to Assets/Scripts/Fishing2/Unit.meta
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear.meta b/Assets/Scripts/Fishing2/Unit/Gear.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear.meta
rename to Assets/Scripts/Fishing2/Unit/Gear.meta
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear/Child.meta b/Assets/Scripts/Fishing2/Unit/Gear/Child.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear/Child.meta
rename to Assets/Scripts/Fishing2/Unit/Gear/Child.meta
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearBaitComponent.cs b/Assets/Scripts/Fishing2/Unit/Gear/Child/GearBaitComponent.cs
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearBaitComponent.cs
rename to Assets/Scripts/Fishing2/Unit/Gear/Child/GearBaitComponent.cs
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearBaitComponent.cs.meta b/Assets/Scripts/Fishing2/Unit/Gear/Child/GearBaitComponent.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearBaitComponent.cs.meta
rename to Assets/Scripts/Fishing2/Unit/Gear/Child/GearBaitComponent.cs.meta
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearBobberComponent.cs b/Assets/Scripts/Fishing2/Unit/Gear/Child/GearBobberComponent.cs
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearBobberComponent.cs
rename to Assets/Scripts/Fishing2/Unit/Gear/Child/GearBobberComponent.cs
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearBobberComponent.cs.meta b/Assets/Scripts/Fishing2/Unit/Gear/Child/GearBobberComponent.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearBobberComponent.cs.meta
rename to Assets/Scripts/Fishing2/Unit/Gear/Child/GearBobberComponent.cs.meta
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearHookComponent.cs b/Assets/Scripts/Fishing2/Unit/Gear/Child/GearHookComponent.cs
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearHookComponent.cs
rename to Assets/Scripts/Fishing2/Unit/Gear/Child/GearHookComponent.cs
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearHookComponent.cs.meta b/Assets/Scripts/Fishing2/Unit/Gear/Child/GearHookComponent.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearHookComponent.cs.meta
rename to Assets/Scripts/Fishing2/Unit/Gear/Child/GearHookComponent.cs.meta
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearLineComponent.cs b/Assets/Scripts/Fishing2/Unit/Gear/Child/GearLineComponent.cs
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearLineComponent.cs
rename to Assets/Scripts/Fishing2/Unit/Gear/Child/GearLineComponent.cs
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearLineComponent.cs.meta b/Assets/Scripts/Fishing2/Unit/Gear/Child/GearLineComponent.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearLineComponent.cs.meta
rename to Assets/Scripts/Fishing2/Unit/Gear/Child/GearLineComponent.cs.meta
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearLureComponent.cs b/Assets/Scripts/Fishing2/Unit/Gear/Child/GearLureComponent.cs
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearLureComponent.cs
rename to Assets/Scripts/Fishing2/Unit/Gear/Child/GearLureComponent.cs
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearLureComponent.cs.meta b/Assets/Scripts/Fishing2/Unit/Gear/Child/GearLureComponent.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearLureComponent.cs.meta
rename to Assets/Scripts/Fishing2/Unit/Gear/Child/GearLureComponent.cs.meta
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearReelComponent.cs b/Assets/Scripts/Fishing2/Unit/Gear/Child/GearReelComponent.cs
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearReelComponent.cs
rename to Assets/Scripts/Fishing2/Unit/Gear/Child/GearReelComponent.cs
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearReelComponent.cs.meta b/Assets/Scripts/Fishing2/Unit/Gear/Child/GearReelComponent.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearReelComponent.cs.meta
rename to Assets/Scripts/Fishing2/Unit/Gear/Child/GearReelComponent.cs.meta
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearRodComponent.cs b/Assets/Scripts/Fishing2/Unit/Gear/Child/GearRodComponent.cs
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearRodComponent.cs
rename to Assets/Scripts/Fishing2/Unit/Gear/Child/GearRodComponent.cs
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearRodComponent.cs.meta b/Assets/Scripts/Fishing2/Unit/Gear/Child/GearRodComponent.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearRodComponent.cs.meta
rename to Assets/Scripts/Fishing2/Unit/Gear/Child/GearRodComponent.cs.meta
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearWeightComponent.cs b/Assets/Scripts/Fishing2/Unit/Gear/Child/GearWeightComponent.cs
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearWeightComponent.cs
rename to Assets/Scripts/Fishing2/Unit/Gear/Child/GearWeightComponent.cs
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearWeightComponent.cs.meta b/Assets/Scripts/Fishing2/Unit/Gear/Child/GearWeightComponent.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear/Child/GearWeightComponent.cs.meta
rename to Assets/Scripts/Fishing2/Unit/Gear/Child/GearWeightComponent.cs.meta
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear/UnitGearComponent.cs b/Assets/Scripts/Fishing2/Unit/Gear/UnitGearComponent.cs
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear/UnitGearComponent.cs
rename to Assets/Scripts/Fishing2/Unit/Gear/UnitGearComponent.cs
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Gear/UnitGearComponent.cs.meta b/Assets/Scripts/Fishing2/Unit/Gear/UnitGearComponent.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Gear/UnitGearComponent.cs.meta
rename to Assets/Scripts/Fishing2/Unit/Gear/UnitGearComponent.cs.meta
diff --git a/Assets/Scripts/Fishing2/Data/Unit/MapUnit.cs b/Assets/Scripts/Fishing2/Unit/MapUnit.cs
similarity index 77%
rename from Assets/Scripts/Fishing2/Data/Unit/MapUnit.cs
rename to Assets/Scripts/Fishing2/Unit/MapUnit.cs
index 5c8be8b47..730b53029 100644
--- a/Assets/Scripts/Fishing2/Data/Unit/MapUnit.cs
+++ b/Assets/Scripts/Fishing2/Unit/MapUnit.cs
@@ -61,5 +61,25 @@ namespace NBF.Fishing2
}
#endregion
+
+
+ public void SetUnitInfo(MapUnitInfo unitInfo)
+ {
+ NumericComponent numericComponent = AddComponent();
+ foreach (var kv in unitInfo.KV)
+ {
+ numericComponent.Set(kv.Key, kv.Value);
+ }
+ }
+
+ public UnitConfig Config()
+ {
+ return UnitConfig.Get(ConfigId);
+ }
+
+ public UnitType UnitType()
+ {
+ return Config().Type;
+ }
}
}
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/Data/Unit/MapUnit.cs.meta b/Assets/Scripts/Fishing2/Unit/MapUnit.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/MapUnit.cs.meta
rename to Assets/Scripts/Fishing2/Unit/MapUnit.cs.meta
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Parts.meta b/Assets/Scripts/Fishing2/Unit/Parts.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Parts.meta
rename to Assets/Scripts/Fishing2/Unit/Parts.meta
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Parts/UnitFlashlightComponent.cs b/Assets/Scripts/Fishing2/Unit/Parts/UnitFlashlightComponent.cs
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Parts/UnitFlashlightComponent.cs
rename to Assets/Scripts/Fishing2/Unit/Parts/UnitFlashlightComponent.cs
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Parts/UnitFlashlightComponent.cs.meta b/Assets/Scripts/Fishing2/Unit/Parts/UnitFlashlightComponent.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Parts/UnitFlashlightComponent.cs.meta
rename to Assets/Scripts/Fishing2/Unit/Parts/UnitFlashlightComponent.cs.meta
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Skin.meta b/Assets/Scripts/Fishing2/Unit/Skin.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Skin.meta
rename to Assets/Scripts/Fishing2/Unit/Skin.meta
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Skin/UnitSkinComponent.cs b/Assets/Scripts/Fishing2/Unit/Skin/UnitSkinComponent.cs
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Skin/UnitSkinComponent.cs
rename to Assets/Scripts/Fishing2/Unit/Skin/UnitSkinComponent.cs
diff --git a/Assets/Scripts/Fishing2/Data/Unit/Skin/UnitSkinComponent.cs.meta b/Assets/Scripts/Fishing2/Unit/Skin/UnitSkinComponent.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/Skin/UnitSkinComponent.cs.meta
rename to Assets/Scripts/Fishing2/Unit/Skin/UnitSkinComponent.cs.meta
diff --git a/Assets/Scripts/Fishing2/Data/Unit/UnitEventType.cs b/Assets/Scripts/Fishing2/Unit/UnitEventType.cs
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/UnitEventType.cs
rename to Assets/Scripts/Fishing2/Unit/UnitEventType.cs
diff --git a/Assets/Scripts/Fishing2/Data/Unit/UnitEventType.cs.meta b/Assets/Scripts/Fishing2/Unit/UnitEventType.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/UnitEventType.cs.meta
rename to Assets/Scripts/Fishing2/Unit/UnitEventType.cs.meta
diff --git a/Assets/Scripts/Fishing2/Data/Unit/UnitStateArgs.cs b/Assets/Scripts/Fishing2/Unit/UnitStateArgs.cs
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/UnitStateArgs.cs
rename to Assets/Scripts/Fishing2/Unit/UnitStateArgs.cs
diff --git a/Assets/Scripts/Fishing2/Data/Unit/UnitStateArgs.cs.meta b/Assets/Scripts/Fishing2/Unit/UnitStateArgs.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/Data/Unit/UnitStateArgs.cs.meta
rename to Assets/Scripts/Fishing2/Unit/UnitStateArgs.cs.meta
diff --git a/Assets/Scripts/Fishing2/Unit/Unity.meta b/Assets/Scripts/Fishing2/Unit/Unity.meta
new file mode 100644
index 000000000..751b8d7cb
--- /dev/null
+++ b/Assets/Scripts/Fishing2/Unit/Unity.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: b2120457449841468649709d6b193c35
+timeCreated: 1756821388
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/View/Unit/UnitHUDComponent.cs b/Assets/Scripts/Fishing2/Unit/Unity/UnitHUDComponent.cs
similarity index 100%
rename from Assets/Scripts/Fishing2/View/Unit/UnitHUDComponent.cs
rename to Assets/Scripts/Fishing2/Unit/Unity/UnitHUDComponent.cs
diff --git a/Assets/Scripts/Fishing2/View/Unit/UnitHUDComponent.cs.meta b/Assets/Scripts/Fishing2/Unit/Unity/UnitHUDComponent.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/View/Unit/UnitHUDComponent.cs.meta
rename to Assets/Scripts/Fishing2/Unit/Unity/UnitHUDComponent.cs.meta
diff --git a/Assets/Scripts/Fishing2/Unit/Unity/UnitUnityComponent.cs b/Assets/Scripts/Fishing2/Unit/Unity/UnitUnityComponent.cs
new file mode 100644
index 000000000..0b76af1a9
--- /dev/null
+++ b/Assets/Scripts/Fishing2/Unit/Unity/UnitUnityComponent.cs
@@ -0,0 +1,49 @@
+using NBC;
+using NBC.Entitas;
+using NBC.Entitas.Interface;
+using UnityEngine;
+
+namespace NBF.Fishing2
+{
+ ///
+ /// Unit 对应的unity对象组件
+ ///
+ public class UnitUnityComponent : Entity
+ {
+ public GameObject GameObject { get; set; }
+
+ public Transform Transform { get; set; }
+
+ public Animator Animator { get; set; }
+
+ public async FTask InitUnityObject()
+ {
+ var gameObject = PrefabsHelper.CreatePlayer(SceneSettings.Instance.Node);
+ GameObject = gameObject;
+ Transform = gameObject.transform;
+ Animator = gameObject.GetComponent();
+ }
+
+
+ public class UnitUnityComponentDestroySystem : DestroySystem
+ {
+ protected override void Destroy(UnitUnityComponent self)
+ {
+ self.Animator = null;
+ self.GameObject = null;
+ self.Transform = null;
+ }
+ }
+
+
+ // public static void InitGameObject(this UnitUnityComponent self)
+ // {
+ // var unit = self.Parent as MapUnit;
+ // var prefab = PrefabsHelper.CreatePlayer(SceneSettings.Instance.Node);
+ //
+ // self.GameObject = prefab;
+ // self.Transform = prefab.transform;
+ // self.Animator = prefab.GetComponent();
+ // }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/View/Unit/UnitUnityComponent.cs.meta b/Assets/Scripts/Fishing2/Unit/Unity/UnitUnityComponent.cs.meta
similarity index 100%
rename from Assets/Scripts/Fishing2/View/Unit/UnitUnityComponent.cs.meta
rename to Assets/Scripts/Fishing2/Unit/Unity/UnitUnityComponent.cs.meta
diff --git a/Assets/Scripts/Fishing2/View.meta b/Assets/Scripts/Fishing2/View.meta
deleted file mode 100644
index 80f84625c..000000000
--- a/Assets/Scripts/Fishing2/View.meta
+++ /dev/null
@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: 944bb9e5d3fe4517bc6d12f723f98f87
-timeCreated: 1756305300
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/View/Helper.meta b/Assets/Scripts/Fishing2/View/Helper.meta
deleted file mode 100644
index fc6b732c8..000000000
--- a/Assets/Scripts/Fishing2/View/Helper.meta
+++ /dev/null
@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: 3148c2caaafd4a099b9bc156fce7a3f7
-timeCreated: 1756450740
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/View/System.meta b/Assets/Scripts/Fishing2/View/System.meta
deleted file mode 100644
index e698c5bdc..000000000
--- a/Assets/Scripts/Fishing2/View/System.meta
+++ /dev/null
@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: ce6182010e784256ba7127a8ffa8d056
-timeCreated: 1756364880
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/View/System/UnitUnityComponentSystem.cs b/Assets/Scripts/Fishing2/View/System/UnitUnityComponentSystem.cs
deleted file mode 100644
index 0df513450..000000000
--- a/Assets/Scripts/Fishing2/View/System/UnitUnityComponentSystem.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using NBC;
-using NBC.Entitas.Interface;
-using UnityEngine;
-
-namespace NBF.Fishing2
-{
- public static partial class UnitUnityComponentSystem
- {
- public class UnitUnityComponentAwakeSystem : AwakeSystem
- {
- protected override void Awake(UnitUnityComponent self)
- {
- Log.Info("UnitUnityComponentAwakeSystem");
- self.InitGameObject();
- }
- }
-
- public class UnitUnityComponentDestroySystem : DestroySystem
- {
- protected override void Destroy(UnitUnityComponent self)
- {
- self.Animator = null;
- self.GameObject = null;
- self.Transform = null;
- }
- }
-
-
- public static void InitGameObject(this UnitUnityComponent self)
- {
- var unit = self.Parent as MapUnit;
- var prefab = PrefabsHelper.CreatePlayer(SceneSettings.Instance.Node);
-
- self.GameObject = prefab;
- self.Transform = prefab.transform;
- self.Animator = prefab.GetComponent();
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/View/System/UnitUnityComponentSystem.cs.meta b/Assets/Scripts/Fishing2/View/System/UnitUnityComponentSystem.cs.meta
deleted file mode 100644
index f57c27aac..000000000
--- a/Assets/Scripts/Fishing2/View/System/UnitUnityComponentSystem.cs.meta
+++ /dev/null
@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: f218930cc1994aaf88752a49dc9aa4b1
-timeCreated: 1756049422
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/View/Unit.meta b/Assets/Scripts/Fishing2/View/Unit.meta
deleted file mode 100644
index 3bfe47b61..000000000
--- a/Assets/Scripts/Fishing2/View/Unit.meta
+++ /dev/null
@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: a0e14a90077c49ed84df06845dc694f0
-timeCreated: 1755919232
\ No newline at end of file
diff --git a/Assets/Scripts/Fishing2/View/Unit/UnitUnityComponent.cs b/Assets/Scripts/Fishing2/View/Unit/UnitUnityComponent.cs
deleted file mode 100644
index d500d82d7..000000000
--- a/Assets/Scripts/Fishing2/View/Unit/UnitUnityComponent.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using NBC.Entitas;
-using UnityEngine;
-
-namespace NBF.Fishing2
-{
- ///
- /// Unit 对应的unity对象组件
- ///
- public class UnitUnityComponent : Entity
- {
- public GameObject GameObject { get; set; }
-
- public Transform Transform { get; set; }
-
- public Animator Animator { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Assets/Scripts/Global.cs b/Assets/Scripts/Global.cs
new file mode 100644
index 000000000..f4080da32
--- /dev/null
+++ b/Assets/Scripts/Global.cs
@@ -0,0 +1,26 @@
+using System;
+using UnityEngine;
+
+namespace NBF
+{
+ public class Global : MonoBehaviour
+ {
+ public static Global Instance { get; private set; }
+
+ ///
+ /// 主摄像机
+ ///
+ public Camera MainCamera { get; private set; }
+
+ ///
+ /// 摄像机配置
+ ///
+ public CameraScriptObject CameraConfig { get; private set; }
+
+ private void Awake()
+ {
+ Instance = this;
+ CameraConfig = Resources.Load(nameof(CameraConfig));
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Global.cs.meta b/Assets/Scripts/Global.cs.meta
new file mode 100644
index 000000000..f295d135b
--- /dev/null
+++ b/Assets/Scripts/Global.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 55a2b6b470ce459c8ca8cda7eadb8934
+timeCreated: 1756823233
\ No newline at end of file
diff --git a/Assets/Scripts/Init.cs b/Assets/Scripts/Init.cs
index 831979b0a..487a78502 100644
--- a/Assets/Scripts/Init.cs
+++ b/Assets/Scripts/Init.cs
@@ -45,7 +45,6 @@ namespace NBF
QualitySettings.vSyncCount = 0;
InitLanguage();
- InitService();
InitUI();
if (!playVideo)
{
@@ -98,30 +97,6 @@ namespace NBF
#endregion
- #region Service
-
- // private static readonly List Services = new List();
- private static readonly Dictionary Services = new Dictionary();
-
- private void AddService() where T : MonoService, new()
- {
- var service = this.GetComponent();
- if (!service)
- {
- service = gameObject.AddComponent();
- }
-
- Services[typeof(T)] = service;
- }
-
- private void InitService()
- {
- AddService();
- AddService();
- }
-
- #endregion
-
public void StartGame()
{
PermanentCommon.Init();
@@ -135,13 +110,6 @@ namespace NBF
private void LoadData()
{
ConfigAssets.Init();
-
- // var inventoryManager = GetComponent();
- // if (inventoryManager == null)
- // {
- // inventoryManager = gameObject.AddComponent();
- // }
- //InventoryManager
}
#region New
diff --git a/Assets/Scripts/NBC/Runtime/Core/App.cs b/Assets/Scripts/NBC/Runtime/Core/App.cs
index d1e3b755f..bcb6a3957 100644
--- a/Assets/Scripts/NBC/Runtime/Core/App.cs
+++ b/Assets/Scripts/NBC/Runtime/Core/App.cs
@@ -4,7 +4,7 @@ using UnityEngine;
namespace NBC
{
- public class App : MonoBehaviour
+ public partial class App : MonoBehaviour
{
public static App Inst { get; private set; }
diff --git a/Assets/Scripts/OnSceneCreate_Init.cs b/Assets/Scripts/OnSceneCreate_Init.cs
index 3d265f938..f156b9b52 100644
--- a/Assets/Scripts/OnSceneCreate_Init.cs
+++ b/Assets/Scripts/OnSceneCreate_Init.cs
@@ -13,6 +13,9 @@ namespace NBF.Fishing2
Log.Info("OnSceneCreate_Init=== root");
scene.AddComponent();
scene.AddComponent();
+ scene.AddComponent();
+ scene.AddComponent();
+ scene.AddComponent();
}
await FTask.CompletedTask;