Throwing Knife Added

This commit is contained in:
CortexCore 2023-10-25 17:26:42 +08:00
parent 3e39e627bc
commit c5f638d9d2
31 changed files with 2432 additions and 310 deletions

View File

@ -138,6 +138,11 @@ MonoBehaviour:
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 5e50b5a1c5542da46b92f4cf7bbd5043
m_Address: Assets/Throwing Knife
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: 819d03717e2ae4f4a8216ff1ba94ff77, type: 2}
m_SchemaSet:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 MiB

After

Width:  |  Height:  |  Size: 3.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 KiB

View File

@ -21,7 +21,7 @@ MonoBehaviour:
quality: 0
factoryProperties:
- rid: 806583526086934675
instance: {fileID: 5322756313667207077, guid: 6c561c5784df77f4aa248f741584c96f,
instance: {fileID: 5322756313667207077, guid: 2c021b0fb224edb47a64a22e6736d50c,
type: 3}
references:
version: 2

View File

@ -0,0 +1,36 @@
%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: 11500000, guid: e85133da5368bfe4b845d18f4e7def30, type: 3}
m_Name: Throwing Knife
m_EditorClassIdentifier:
displayName: "\u98DE\u5200"
description: "\u5FEB\u5207\u5B89\u9759,\u81F4\u547D"
addressablePath: Assets/Throwing Knife
prefab: {fileID: 944092592603409112, guid: 1f4b86271ef90774495a3444f525ca20, type: 3}
squareIcon: {fileID: 2800000, guid: 8b7801fa09bb3cc47a85b7e2d329eab7, type: 3}
rectangleIcon: {fileID: 0}
quality: 3
factoryProperties:
- rid: 806583611772633090
instance: {fileID: 2322573603674746577, guid: 2317f3177236a6d4d9bc28b8d669fca2,
type: 3}
references:
version: 2
RefIds:
- rid: 806583611772633090
type: {class: EquipmentAsSlot, ns: BITFALL, asm: BITFALL.Entities.Equipment}
data:
slot:
rid: 806583611772633091
- rid: 806583611772633091
type: {class: EquipmentAsThrow, ns: BITFALL, asm: BITFALL.Entities.Equipment}
data:

View File

@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!221 &22100000
AnimatorOverrideController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: ThrowKnifeController
m_Controller: {fileID: 9100000, guid: fb4196238dafc7d4d82517684cd52530, type: 2}
m_Clips:
- m_OriginalClip: {fileID: 7400000, guid: 46f6bba0b7dfc524c814da620942f888, type: 2}
m_OverrideClip: {fileID: -3064973872704187395, guid: 1ff0237e9622de84988e8f0bdf68f4d6,
type: 3}
- m_OriginalClip: {fileID: 7400000, guid: 73f4040677932bd4eb75341b67350857, type: 2}
m_OverrideClip: {fileID: 7365072474967213234, guid: 1ff0237e9622de84988e8f0bdf68f4d6,
type: 3}
- m_OriginalClip: {fileID: 7400000, guid: 68182865c01bbae4fb3027ea32634e3f, type: 2}
m_OverrideClip: {fileID: 2902082503132113307, guid: 1ff0237e9622de84988e8f0bdf68f4d6,
type: 3}

View File

@ -0,0 +1,135 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: ThrowingKnife_BaseColor
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.59999996
- _GlossyReflections: 1
- _Metallic: 0.133
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 1
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.03773582, g: 0.03773582, b: 0.03773582, a: 1}
- _Color: {r: 0.03773582, g: 0.03773582, b: 0.03773582, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
--- !u!114 &1189962668262198536
MonoBehaviour:
m_ObjectHideFlags: 11
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: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7

View File

@ -0,0 +1,135 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: ThrowingKnife_BlackGloss
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.939759
- _GlossyReflections: 1
- _Metallic: 1
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.939759
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.0999927, g: 0.0999927, b: 0.0999927, a: 1}
- _Color: {r: 0.09999267, g: 0.09999267, b: 0.09999267, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
--- !u!114 &5498279817427653980
MonoBehaviour:
m_ObjectHideFlags: 11
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: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7

View File

@ -0,0 +1,135 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-3279616786578298441
MonoBehaviour:
m_ObjectHideFlags: 11
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: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: ThrowingKnife_BladeColor
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.89698803
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.89698803
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,135 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: ThrowingKnife_Red
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.87349397
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.87349397
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 0, b: 0.041134827, a: 1}
- _Color: {r: 1, g: 0, b: 0.041134797, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
--- !u!114 &8155839787953355811
MonoBehaviour:
m_ObjectHideFlags: 11
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: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7

View File

@ -0,0 +1,225 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &93883969787178225
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 3894949043146936249}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.00000086426724
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -5568371526223589888, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_Layer
value: 10
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_Name
value: Static_Throwing Knife
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_Layer
value: 10
objectReference: {fileID: 0}
- target: {fileID: 8513859187771203891, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_Layer
value: 10
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
insertIndex: -1
addedObject: {fileID: 37206092563123207}
m_SourcePrefab: {fileID: 100100000, guid: a5afe13492c9acf478def44319cb3619, type: 3}
--- !u!4 &488415728299002650 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
m_PrefabInstance: {fileID: 93883969787178225}
m_PrefabAsset: {fileID: 0}
--- !u!1 &976404984353100192 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
m_PrefabInstance: {fileID: 93883969787178225}
m_PrefabAsset: {fileID: 0}
--- !u!65 &37206092563123207
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 976404984353100192}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 0.06720734, y: 0.015033718, z: 0.35746002}
m_Center: {x: -0.0017528534, y: -0.005294976, z: 0.15318671}
--- !u!1001 &944092594687977695
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2084569607, guid: d8b5a76c92d6b3a4592b14e21ad018c0, type: 3}
propertyPath: asset
value:
objectReference: {fileID: 11400000, guid: 5e50b5a1c5542da46b92f4cf7bbd5043,
type: 2}
- target: {fileID: 4258070652695701351, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
propertyPath: rmsCount
value: 2
objectReference: {fileID: 0}
- target: {fileID: 4258070652695701351, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
propertyPath: outlineColor.b
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4258070652695701351, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
propertyPath: outlineColor.g
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4258070653194797568, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
propertyPath: m_Icon
value:
objectReference: {fileID: 2800000, guid: 8b7801fa09bb3cc47a85b7e2d329eab7, type: 3}
- target: {fileID: 4258070653194797568, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
propertyPath: m_Name
value: Throwing Knife Variant
objectReference: {fileID: 0}
- target: {fileID: 4258070653194797575, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
propertyPath: m_LocalPosition.x
value: 29.227583
objectReference: {fileID: 0}
- target: {fileID: 4258070653194797575, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.054
objectReference: {fileID: 0}
- target: {fileID: 4258070653194797575, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
propertyPath: m_LocalPosition.z
value: -31.572662
objectReference: {fileID: 0}
- target: {fileID: 4258070653194797575, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4258070653194797575, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4258070653194797575, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4258070653194797575, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4258070653194797575, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4258070653194797575, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4258070653194797575, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects:
- targetCorrespondingSourceObject: {fileID: 4258070652695701350, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
insertIndex: -1
addedObject: {fileID: 488415728299002650}
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: d8b5a76c92d6b3a4592b14e21ad018c0, type: 3}
--- !u!4 &3894949043146936249 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4258070652695701350, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
m_PrefabInstance: {fileID: 944092594687977695}
m_PrefabAsset: {fileID: 0}

View File

@ -33,6 +33,16 @@ PrefabInstance:
propertyPath: m_Name
value: Weapon_TacticalKnife Variant
objectReference: {fileID: 0}
- target: {fileID: 4258070653194797574, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
propertyPath: m_Mass
value: 0.255
objectReference: {fileID: 0}
- target: {fileID: 4258070653194797574, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
propertyPath: m_AngularDrag
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4258070653194797575, guid: d8b5a76c92d6b3a4592b14e21ad018c0,
type: 3}
propertyPath: m_LocalPosition.x

View File

@ -1362,6 +1362,7 @@ MonoBehaviour:
- {fileID: 8789266898436862045}
- {fileID: 1506499515248164262}
- {fileID: 4913029694326725564}
joints: []
rigidbody: {fileID: 650759566046424193}
--- !u!114 &300229368
MonoBehaviour:
@ -2511,6 +2512,7 @@ Transform:
- {fileID: 4138942853584030110}
- {fileID: 1074771797319587490}
- {fileID: 9120422628210139297}
- {fileID: 5165649342843401771}
- {fileID: 3989134628387755881}
m_Father: {fileID: 2648601869858448235}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -3088,6 +3090,79 @@ Transform:
m_Children: []
m_Father: {fileID: 2019605867538852436}
m_LocalEulerAnglesHint: {x: -10, y: 0, z: 0}
--- !u!1 &8325772932023106936
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8778599738524981189}
- component: {fileID: 3138050711118661386}
- component: {fileID: 295134024824408557}
m_Layer: 7
m_Name: CameraRoot
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8778599738524981189
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8325772932023106936}
serializedVersion: 2
m_LocalRotation: {x: -0.00017264773, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5165649342843401771}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1773428102 &3138050711118661386
ParentConstraint:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8325772932023106936}
m_Enabled: 1
serializedVersion: 2
m_Weight: 1
m_TranslationAtRest: {x: 0, y: 0, z: 0}
m_RotationAtRest: {x: -0.019783963, y: 0, z: 0}
m_TranslationOffsets:
- {x: 0, y: 0, z: 0}
m_RotationOffsets:
- {x: -90, y: 0, z: -180}
m_AffectTranslationX: 1
m_AffectTranslationY: 1
m_AffectTranslationZ: 1
m_AffectRotationX: 1
m_AffectRotationY: 1
m_AffectRotationZ: 1
m_Active: 1
m_IsLocked: 0
m_Sources:
- sourceTransform: {fileID: 2054254639170952763}
weight: 1
--- !u!114 &295134024824408557
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8325772932023106936}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 98ce129373beee341b6f0723f3fb2ce7, type: 3}
m_Name:
m_EditorClassIdentifier:
locationAdditive: {fileID: 843716438194269699}
--- !u!1 &8587898794680105710
GameObject:
m_ObjectHideFlags: 0
@ -6159,6 +6234,365 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 4192940043719826356}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &4628200443042091456
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 2019605867538852436}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8483079287735800029, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -7982445368288305232, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -7805527542236588859, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -7083826889706597962, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -6761239244867884074, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -6565134293425240629, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -6179275997006789232, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -5568371526223589888, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -3799896878483850562, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -3686551328258449376, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -2853424563086286810, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -2853424563086286810, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: -2107066420424512121, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -1800213932466231045, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_CastShadows
value: 0
objectReference: {fileID: 0}
- target: {fileID: -1800213932466231045, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_UpdateWhenOffscreen
value: 1
objectReference: {fileID: 0}
- target: {fileID: -1745863489998566550, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -457497680185661411, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: 422738843169862328, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Name
value: Weapon_ThrowingKnife
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: 2192180338147824518, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_CastShadows
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2192180338147824518, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_UpdateWhenOffscreen
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2192180338147824518, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: 0bdc17ca1b76bc640b010f622a6886c3, type: 2}
- target: {fileID: 4387719810744567721, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: 4824860256124165047, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: 5074512353664290214, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_CastShadows
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5074512353664290214, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_UpdateWhenOffscreen
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6003611815629638046, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: 8153101253863224186, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_CastShadows
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8153101253863224186, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_UpdateWhenOffscreen
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8260868571131455172, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: 8315903294366468851, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: 8513859187771203891, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects:
- targetCorrespondingSourceObject: {fileID: -8679921383154817045, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
insertIndex: -1
addedObject: {fileID: 8778599738524981189}
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
insertIndex: -1
addedObject: {fileID: 6304939419498623454}
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
insertIndex: -1
addedObject: {fileID: 2269618926873949942}
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
insertIndex: -1
addedObject: {fileID: 3269250633790738649}
m_SourcePrefab: {fileID: 100100000, guid: 2457bdeea68be7942b83d81070b7e9b5, type: 3}
--- !u!137 &456800702483242086 stripped
SkinnedMeshRenderer:
m_CorrespondingSourceObject: {fileID: 5074512353664290214, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
m_PrefabInstance: {fileID: 4628200443042091456}
m_PrefabAsset: {fileID: 0}
--- !u!4 &2054254639170952763 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -2542134114980474885, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
m_PrefabInstance: {fileID: 4628200443042091456}
m_PrefabAsset: {fileID: 0}
--- !u!137 &2827962871058561339 stripped
SkinnedMeshRenderer:
m_CorrespondingSourceObject: {fileID: -1800213932466231045, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
m_PrefabInstance: {fileID: 4628200443042091456}
m_PrefabAsset: {fileID: 0}
--- !u!137 &3539558469337834170 stripped
SkinnedMeshRenderer:
m_CorrespondingSourceObject: {fileID: 8153101253863224186, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
m_PrefabInstance: {fileID: 4628200443042091456}
m_PrefabAsset: {fileID: 0}
--- !u!4 &5165649342843401771 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
m_PrefabInstance: {fileID: 4628200443042091456}
m_PrefabAsset: {fileID: 0}
--- !u!1 &5547240782841867409 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
m_PrefabInstance: {fileID: 4628200443042091456}
m_PrefabAsset: {fileID: 0}
--- !u!95 &6304939419498623454
Animator:
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5547240782841867409}
m_Enabled: 1
m_Avatar: {fileID: 9000000, guid: 644cb63bc5228d44e901a3251d09e8cd, type: 3}
m_Controller: {fileID: 22100000, guid: 30a50c33877c30d48a67402cc09c1029, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!114 &2269618926873949942
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5547240782841867409}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a6ac57edc8fc02840a5887fc4ad996e1, type: 3}
m_Name:
m_EditorClassIdentifier:
debug: 0
animator: {fileID: 6304939419498623454}
layerInfos: []
--- !u!114 &3269250633790738649
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5547240782841867409}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9f1e70fb5667ce84ab5295a61fa76234, type: 3}
m_Name:
m_EditorClassIdentifier:
stateMachine:
states: []
_currentStateName:
debug: 0
transitionOnNextFrame: 0
item: {fileID: 11400000, guid: 5e50b5a1c5542da46b92f4cf7bbd5043, type: 2}
animator: {fileID: 2269618926873949942}
renderers:
- {fileID: 456800702483242086}
- {fileID: 3539558469337834170}
- {fileID: 6797791864527372870}
- {fileID: 2827962871058561339}
cameraTransform: {fileID: 2054254639170952763}
meleeService:
rid: 806583611772633088
throwPoint: {fileID: 5165649342843401771}
throwForce: 16
throwAction: {fileID: 2849415906997320802, guid: e0e9267cab824e8489fc27d83f1d07b7,
type: 3}
references:
version: 2
RefIds:
- rid: 806583611772633088
type: {class: MeleeServiceSingleton, ns: BITFALL.Melee, asm: BITFALL.Melee.Runtime}
data:
--- !u!137 &6797791864527372870 stripped
SkinnedMeshRenderer:
m_CorrespondingSourceObject: {fileID: 2192180338147824518, guid: 2457bdeea68be7942b83d81070b7e9b5,
type: 3}
m_PrefabInstance: {fileID: 4628200443042091456}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &4960656506693216971
PrefabInstance:
m_ObjectHideFlags: 0

View File

@ -13,7 +13,7 @@ GameObject:
- component: {fileID: 1303898904214839384}
- component: {fileID: 7713224582118482445}
m_Layer: 16
m_Name: Bouncing Betty
m_Name: Prop Bouncing Betty
m_TagString: Untagged
m_Icon: {fileID: 2974397684917235467, guid: 0000000000000000d000000000000000, type: 0}
m_NavMeshLayer: 0

View File

@ -14,7 +14,7 @@ GameObject:
- component: {fileID: 2790648435517538154}
- component: {fileID: 6550306330222230957}
m_Layer: 16
m_Name: Grenade
m_Name: Prop Grenade
m_TagString: Untagged
m_Icon: {fileID: 2974397684917235467, guid: 0000000000000000d000000000000000, type: 0}
m_NavMeshLayer: 0

View File

@ -0,0 +1,192 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &2860288370872289594
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalPosition.x
value: 24.532635
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.429
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalPosition.z
value: -31.00585
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -5568371526223589888, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_Layer
value: 16
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_Icon
value:
objectReference: {fileID: 2800000, guid: 8b7801fa09bb3cc47a85b7e2d329eab7, type: 3}
- target: {fileID: 919132149155446097, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_Name
value: Prop Throwing Knife
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_Layer
value: 16
objectReference: {fileID: 0}
- target: {fileID: 8513859187771203891, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
propertyPath: m_Layer
value: 16
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
insertIndex: -1
addedObject: {fileID: 1326478578008943497}
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
insertIndex: -1
addedObject: {fileID: 1162520792426995438}
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
insertIndex: -1
addedObject: {fileID: 1059363781722993272}
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
insertIndex: -1
addedObject: {fileID: 626853534020189990}
m_SourcePrefab: {fileID: 100100000, guid: a5afe13492c9acf478def44319cb3619, type: 3}
--- !u!1 &3130178554240382059 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: a5afe13492c9acf478def44319cb3619,
type: 3}
m_PrefabInstance: {fileID: 2860288370872289594}
m_PrefabAsset: {fileID: 0}
--- !u!54 &1326478578008943497
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3130178554240382059}
serializedVersion: 4
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_CenterOfMass: {x: 0, y: 0, z: 0}
m_InertiaTensor: {x: 1, y: 1, z: 1}
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 2
m_Constraints: 0
m_CollisionDetection: 3
--- !u!65 &1162520792426995438
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3130178554240382059}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 0.07580185, y: 0.077313334, z: 0.35261536}
m_Center: {x: -0.002090454, y: -0.005558327, z: -0.15432549}
--- !u!114 &1059363781722993272
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3130178554240382059}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f5706f4e6c5bdac4eb8decf5c7b3a4ba, type: 3}
m_Name:
m_EditorClassIdentifier:
prefab: {fileID: 3894949042580695768, guid: 1f4b86271ef90774495a3444f525ca20, type: 3}
rigidbody: {fileID: 1326478578008943497}
--- !u!114 &626853534020189990
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3130178554240382059}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ddbd9772dd26e3048a27118849c3b7a2, type: 3}
m_Name:
m_EditorClassIdentifier:
rigidbody: {fileID: 1326478578008943497}
damage: 100
force: 512
layerMask:
serializedVersion: 2
m_Bits: 513

View File

@ -12,7 +12,7 @@ GameObject:
m_Layer: 9
m_Name: Hitbox
m_TagString: Untagged
m_Icon: {fileID: 0}
m_Icon: {fileID: 2974397684917235467, guid: 0000000000000000d000000000000000, type: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1

View File

@ -989,22 +989,22 @@ ConfigurableJoint:
spring: 0
damper: 0
m_LowAngularXLimit:
limit: 0
limit: -177
bounciness: 0
contactDistance: 0
m_HighAngularXLimit:
limit: 0
limit: -1.3722992
bounciness: 0
contactDistance: 0
m_AngularYZLimitSpring:
spring: 0
damper: 0
m_AngularYLimit:
limit: 0
limit: 36.547386
bounciness: 0
contactDistance: 0
m_AngularZLimit:
limit: 0
limit: 45.004425
bounciness: 0
contactDistance: 0
m_TargetPosition: {x: 0, y: 0, z: 0}
@ -2502,22 +2502,22 @@ ConfigurableJoint:
spring: 0
damper: 0
m_LowAngularXLimit:
limit: 0
limit: -177
bounciness: 0
contactDistance: 0
m_HighAngularXLimit:
limit: 0
limit: -0.08393097
bounciness: 0
contactDistance: 0
m_AngularYZLimitSpring:
spring: 0
damper: 0
m_AngularYLimit:
limit: 0
limit: 83.52953
bounciness: 0
contactDistance: 0
m_AngularZLimit:
limit: 0
limit: 75.923065
bounciness: 0
contactDistance: 0
m_TargetPosition: {x: 0, y: 0, z: 0}

File diff suppressed because it is too large Load Diff

View File

@ -51,7 +51,7 @@ namespace BITFALL.Throws
{
isHolding = false;
base.Entry();
animator.Play(BITConstant.Player.Draw);
animator.Play(BITConstant.Player.Draw);
}
private void OnThrow(InputAction.CallbackContext obj)
@ -82,6 +82,7 @@ namespace BITFALL.Throws
if (!_equipmentContainer.TryUseEquip<EquipmentAsThrow>()) return;
var instance = _assetableThrow.GetInstance();
if (!instance.TryGetComponent<Rigidbody>(out var _rigidbody)) return;
_rigidbody.rotation = throwPoint.rotation;
_rigidbody.position = throwPoint.position;
_rigidbody.AddForce(throwPoint.forward * throwForce, ForceMode.VelocityChange);
}

View File

@ -0,0 +1,52 @@
using System;
using System.Collections;
using System.Collections.Generic;
using BITKit;
using UnityEngine;
using UnityEngine.Animations;
namespace BITFALL.Props
{
public class Prop_ReplaceOnSleep : MonoBehaviour
{
[SerializeField] private Transform prefab;
[SerializeField] private new Rigidbody rigidbody;
private readonly IntervalUpdate _interval = new(0.16f);
private Collider _collider;
private void FixedUpdate()
{
if (rigidbody.IsSleeping() && _interval.AllowUpdate)
{
ReplaceImmediate(_collider.transform);
}
}
public void ReplaceImmediate(Transform root=null)
{
var _transform = transform;
var instance = Instantiate(prefab);
instance.SetPositionAndRotation(_transform.position, _transform.rotation);
if (root is not null)
{
instance.SetParentConstraint(root);
if (instance.TryGetComponent<Rigidbody>(out var _rigidbody))
{
//_rigidbody.isKinematic = true;
_rigidbody.isKinematic = true;
}
}
Destroy(gameObject);
}
private void OnCollisionEnter(Collision other)
{
_collider = other.collider;
}
private void OnCollisionStay(Collision other)
{
_collider = other.collider;
}
}
}

View File

@ -0,0 +1,57 @@
using System;
using System.Collections;
using System.Collections.Generic;
using BITKit;
using BITKit.Entities;
using Cysharp.Threading.Tasks;
using UnityEngine;
namespace BITFALL.Props
{
public class Prop_Throw : MonoBehaviour
{
[SerializeField] private new Rigidbody rigidbody;
[SerializeField] private int damage;
[SerializeField] private int force;
[SerializeField] private LayerMask layerMask;
private void FixedUpdate()
{
if (Physics.Linecast(rigidbody.position, rigidbody.position + rigidbody.velocity * Time.fixedDeltaTime,
out var hit,
layerMask
))
{
var _rigidbody = hit.rigidbody;
if(hit.collider.transform.TryGetComponent<IDamagable>(out var damagable))
{
damagable.GiveDamage(new DamageMessage()
{
Target = damagable.Entity,
Damage = damage,
Location = new Location()
{
position = hit.point,
rotation = Quaternion.LookRotation(hit.normal),
forward = hit.normal,
}
});
if(damagable.Rigidbody is not null)
{
_rigidbody = damagable.Rigidbody;
}
}
if (_rigidbody)
{
_rigidbody.AddForceAtPositionAsync((hit.point-rigidbody.position).normalized * force, hit.point, ForceMode.Impulse).Forget();
}
rigidbody.Sleep();
if (TryGetComponent<Prop_ReplaceOnSleep>(out var replace))
{
replace.ReplaceImmediate(hit.collider.transform);
}
}
}
}
}

View File

@ -20,6 +20,11 @@ namespace BITKit.Entities.Movement
public Vector3 GroundVelocity { get; }
public Vector3 AngularVelocity { get; }
public bool IsGrounded { get; }
[Inject(true)]
private IHealth health;
public void SyncMovement(Vector3 velocity, Vector3 position, Quaternion rotation, bool isGrounded)
{
}
@ -37,6 +42,20 @@ namespace BITKit.Entities.Movement
}
public event Action<object> OnCommand;
public override void OnAwake()
{
base.OnAwake();
if (health is not null)
{
health.OnSetAlive += OnSetAlive;
}
}
private void OnSetAlive(bool obj)
{
rigidbody.isKinematic = !obj;
}
public override void OnFixedUpdate(float deltaTime)
{
rigidbody.MovePosition(rigidbody.position + Velocity * deltaTime

View File

@ -1,5 +1,8 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using BITKit.Entities;
using UnityEngine;
@ -10,44 +13,37 @@ namespace BITKit
[SerializeField] private IntervalUpdate respawnInterval;
private bool requestRespawn;
[Inject] private IHealth _health;
private int _initialHp;
private CancellationTokenSource _cancellationTokenSource;
public override void OnAwake()
{
_initialHp=_health.HealthPoint;
_health.OnSetAlive += OnSetAlive;
_health.OnSetHealthPoint += OnSetHP;
}
public override void OnUpdate(float deltaTime)
{
if (requestRespawn && respawnInterval.AllowUpdate)
{
requestRespawn = false;
Execute();
}
}
public void OnSetAlive(bool alive)
private async void OnSetAlive(bool alive)
{
if (alive)
{
requestRespawn = false;
_cancellationTokenSource?.Cancel();
}
else
{
respawnInterval.Reset();
requestRespawn = true;
_cancellationTokenSource?.Cancel();
_cancellationTokenSource = new CancellationTokenSource();
try
{
await Task.Delay(TimeSpan.FromSeconds(respawnInterval.Interval), _cancellationTokenSource.Token);
destroyCancellationToken.ThrowIfCancellationRequested();
Execute();
}
catch (OperationCanceledException){}
}
}
public void OnSetHP(int hp)
{
}
public void Execute()
{
if (TryGetComponent<IHealth>(out var health))
{
health.HealthPoint = 100;
}
if (_health.IsAlive is false)
_health.HealthPoint = _initialHp;
}
}

View File

@ -13,18 +13,40 @@ namespace BITKit.Entities
[SerializeField] private Animator animator;
[SerializeField] private Rigidbody[] rigidbodies;
[SerializeField] private Collider[] ragdollColliders;
[SerializeField] private Joint joint;
[SerializeField] private Joint[] joints;
[SerializeField] private new Rigidbody rigidbody;
private CancellationToken _cancellationToken;
[Inject]
private IHealth _health;
private readonly Dictionary<Joint,ConfigurableJointMotion> _jointXMotions=new();
private readonly Dictionary<Joint,ConfigurableJointMotion> _jointYMotions=new();
private readonly Dictionary<Joint,ConfigurableJointMotion> _jointZMotions=new();
private readonly Dictionary<Joint,ConfigurableJointMotion> _jointAngularXMotions=new();
private readonly Dictionary<Joint,ConfigurableJointMotion> _jointAngularYMotions=new();
private readonly Dictionary<Joint,ConfigurableJointMotion> _jointAngularZMotions=new();
public override void OnAwake()
{
_health.OnSetAlive += OnSetAlive;
_health.OnSetHealthPoint += OnSetHP;
_cancellationToken = entity.Get<CancellationToken>();
foreach (var x in joints)
{
switch (x)
{
case ConfigurableJoint configurableJoint:
_jointXMotions.Add(configurableJoint,configurableJoint.xMotion);
_jointYMotions.Add(configurableJoint,configurableJoint.yMotion);
_jointZMotions.Add(configurableJoint,configurableJoint.zMotion);
_jointAngularXMotions.Add(configurableJoint,configurableJoint.angularXMotion);
_jointAngularYMotions.Add(configurableJoint,configurableJoint.angularYMotion);
_jointAngularZMotions.Add(configurableJoint,configurableJoint.angularZMotion);
break;
}
}
}
private async void OnSetAlive(bool alive)
private async void OnSetAlive(bool alive)
{
IsPhysics = !alive;
if (animator)
@ -38,15 +60,29 @@ namespace BITKit.Entities
}
catch (OperationCanceledException)
{
}
if (alive is false && joint is not null)
foreach (var joint in joints)
{
Destroy(joint);
switch (joint)
{
case ConfigurableJoint configurableJoint:
configurableJoint.xMotion = alive ? _jointXMotions[joint] : ConfigurableJointMotion.Free;
configurableJoint.yMotion = alive ? _jointYMotions[joint] : ConfigurableJointMotion.Free;
configurableJoint.zMotion = alive ? _jointZMotions[joint] : ConfigurableJointMotion.Free;
configurableJoint.angularXMotion =
alive ? _jointAngularXMotions[joint] : ConfigurableJointMotion.Free;
configurableJoint.angularYMotion =
alive ? _jointAngularYMotions[joint] : ConfigurableJointMotion.Free;
configurableJoint.angularZMotion =
alive ? _jointAngularZMotions[joint] : ConfigurableJointMotion.Free;
break;
}
}
}
public void OnSetHP(int hp)
{
}

View File

@ -61,7 +61,7 @@ namespace BITKit.Entities
}
else if(attribute?.CanBeNull is false)
{
BIT4Log.Warning<Entity>($"{name}未找到{type.FullName}");
BIT4Log.Warning<Entity>($"{name}未找到{obj.GetType().Name}需要的{type.FullName}");
BIT4Log.Warning<Entity>(genericEvent.GetDiagnostics());
}
}

View File

@ -0,0 +1,56 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Animations;
using UnityEngine.Assertions;
namespace BITKit
{
public static class ConstraintExtensions
{
public static ParentConstraint SetParentConstraint(this Transform target, Transform parentSource,
ParentConstraint constraint = null)
{
Assert.IsTrue(!constraint || target == constraint.transform);
if (!constraint)
{
if (!parentSource) return null;
constraint = target.gameObject.AddComponent<ParentConstraint>();
}
// 清空已有约束
constraint.constraintActive = false;
for (int i = constraint.sourceCount - 1; i >= 0; i--)
{
constraint.RemoveSource(i);
}
// 无约束
if (!parentSource) return constraint;
// 设置新约束
constraint.AddSource(new ConstraintSource
{
sourceTransform = parentSource,
weight = 1,
});
// 设置 Position offset
var positionOffset = parentSource.InverseTransformPoint(target.position);
constraint.SetTranslationOffset(0, positionOffset);
// 设置 Rotation offset
var localForward = parentSource.InverseTransformDirection(target.forward);
var localUpward = parentSource.InverseTransformDirection(target.up);
var rotationOffset = Quaternion.LookRotation(localForward, localUpward).eulerAngles;
constraint.SetRotationOffset(0, rotationOffset);
// 激活约束
constraint.constraintActive = true;
return constraint;
}
}
}

View File

@ -24,7 +24,6 @@ namespace BITKit.Physics
[SerializeField] private Optional<ConfigurableJointMotion> overrideMotion;
[SerializeField] private Optional<ConfigurableJointMotion> overrideAngularMotion;
private void Start()
{
foreach (var x in jointConfigures)
@ -45,12 +44,10 @@ namespace BITKit.Physics
{
jointConfigure.joint.angularXDrive = drive;
jointConfigure.joint.angularYZDrive = drive;
// jointConfigure.joint.targetRotation =
// Quaternion.Lerp(
// Quaternion.identity,
// Quaternion.Inverse(jointConfigure.animate.localRotation) * jointConfigure.InitialRotation,
// Blend
// );
jointConfigure.joint.xDrive = drive;
jointConfigure.joint.yDrive = drive;
jointConfigure.joint.zDrive = drive;
jointConfigure.joint.targetRotation = Quaternion.Inverse(jointConfigure.animate.localRotation) *
jointConfigure.InitialRotation;
jointConfigure.joint.targetPosition = jointConfigure.animate.localPosition;