From 49cf70aaad185baead8b2fe6cba7af9b9f7a73e5 Mon Sep 17 00:00:00 2001 From: liuliang <597380732@qq.com> Date: Fri, 6 Dec 2024 11:05:06 +0800 Subject: [PATCH] add --- Assets/Scenes/SampleScene.unity | 239 +++++++++++++++++++++++++++++--- Assets/common | 2 +- Assets/role/Capsule.prefab | 103 ++++++++++++++ Assets/role/Capsule.prefab.meta | 7 + 4 files changed, 332 insertions(+), 19 deletions(-) create mode 100644 Assets/role/Capsule.prefab create mode 100644 Assets/role/Capsule.prefab.meta diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 4460fa2..97b2514 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -432,7 +432,7 @@ SpriteRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_Sprite: {fileID: 21300000, guid: 30f24a49e65cf1e4090e348eda66977d, type: 3} + m_Sprite: {fileID: 21300000, guid: ebb8f39c7c40b6345bfc40ace0649b44, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 m_FlipY: 0 @@ -456,7 +456,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 684814320} - m_RootOrder: 0 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &684814317 GameObject: @@ -471,7 +471,7 @@ GameObject: - component: {fileID: 684814321} m_Layer: 0 m_Name: role - m_TagString: Untagged + m_TagString: Player m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 @@ -490,11 +490,12 @@ MonoBehaviour: m_EditorClassIdentifier: retbutton: {fileID: 0} ClosureObj: {fileID: 0} + camp: 0 hp: 100 gold: 10 physicalArmor: 10 magicArmor: 5 - Navigation: {fileID: 684814321} + Navigation: {fileID: 0} AnimationTree: - value: - {fileID: 21300000, guid: 7a9ea5910ce547648b91fb17f66423b0, type: 3} @@ -560,6 +561,8 @@ MonoBehaviour: spriteRenderer: {fileID: 583170112} image: {fileID: 0} isAnimationPlay: 1 + mycollider: {fileID: 710186235} + attackClass: {fileID: 710186237} --- !u!4 &684814320 Transform: m_ObjectHideFlags: 0 @@ -567,36 +570,97 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 684814317} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: -0.000016338323, y: 0.0018721817, z: 0.008726542, w: 0.9999602} m_LocalPosition: {x: -0.58, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: + - {fileID: 710186234} - {fileID: 583170113} m_Father: {fileID: 0} m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &684814321 -MonoBehaviour: + m_LocalEulerAnglesHint: {x: -0.004, y: 0.215, z: 1} +--- !u!58 &684814321 +CircleCollider2D: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 684814317} m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + serializedVersion: 2 + m_Radius: 0.87 +--- !u!1 &710186233 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 710186234} + - component: {fileID: 710186235} + - component: {fileID: 710186237} + m_Layer: 0 + m_Name: attack + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &710186234 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 710186233} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.48, y: 2.89, z: 1} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 684814320} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!58 &710186235 +CircleCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 710186233} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + serializedVersion: 2 + m_Radius: 10 +--- !u!114 &710186237 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 710186233} + m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 28012bb73bbdd3a4f881dda28759bfa4, type: 3} + m_Script: {fileID: 11500000, guid: 90e9cd2fc0a74084fbf1a89015db94a9, type: 3} m_Name: m_EditorClassIdentifier: - retbutton: {fileID: 0} - ClosureObj: {fileID: 0} - waypoints: - - {fileID: 458058778} - - {fileID: 303846379} - - {fileID: 1005265240} - - {fileID: 1977627629} - - {fileID: 993414601} - moveSpeed: 1 + bulletPrefab: {fileID: 7840616707395102003, guid: 6bc080effd29ebb47845866eeb973e8d, type: 3} + role: {fileID: 684814318} + attackScope: 0 + damageTyp: 2 --- !u!1 &993414599 GameObject: m_ObjectHideFlags: 0 @@ -765,6 +829,145 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1943095639 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1943095642} + - component: {fileID: 1943095641} + - component: {fileID: 1943095645} + - component: {fileID: 1943095643} + m_Layer: 0 + m_Name: testEnemy + m_TagString: Enemy + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!212 &1943095641 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1943095639} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 7482667652216324306, guid: 75f5f34dc1b5347e0b8351032682f224, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!4 &1943095642 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1943095639} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -3.1, y: -1.7, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!61 &1943095643 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1943095639} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0.21133333} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.28866667} + oldSize: {x: 1, y: 1} + newSize: {x: 1, y: 1} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 1, y: 1} + m_EdgeRadius: 0 +--- !u!114 &1943095645 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1943095639} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c596dfec7e7bbd240b33b61a885ae327, type: 3} + m_Name: + m_EditorClassIdentifier: + retbutton: {fileID: 0} + ClosureObj: {fileID: 0} + camp: 1 + hp: 100 + gold: 10 + physicalArmor: 10 + magicArmor: 5 + Navigation: {fileID: 0} + AnimationTree: [] + animationHighlight: 0 + spriteRenderer: {fileID: 0} + image: {fileID: 0} + isAnimationPlay: 0 + mycollider: {fileID: 0} + attackClass: {fileID: 0} --- !u!1 &1977627627 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/common b/Assets/common index bd7bc9c..0dc89a3 160000 --- a/Assets/common +++ b/Assets/common @@ -1 +1 @@ -Subproject commit bd7bc9cfad21045ad385db645eb08b708dde73e2 +Subproject commit 0dc89a3bef3f3eaa1d1e9be3189b70697b37f87c diff --git a/Assets/role/Capsule.prefab b/Assets/role/Capsule.prefab new file mode 100644 index 0000000..a01128a --- /dev/null +++ b/Assets/role/Capsule.prefab @@ -0,0 +1,103 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &7840616707395102003 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7840616707395102000} + - component: {fileID: 7840616707395102001} + - component: {fileID: 7840616707395102002} + m_Layer: 0 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7840616707395102000 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7840616707395102003} + m_LocalRotation: {x: -0, y: -0, z: 0.43471515, w: 0.900568} + m_LocalPosition: {x: -7.0642476, y: -9.047724, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 51.534} +--- !u!212 &7840616707395102001 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7840616707395102003} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: -9095717837082945937, guid: 207ee8102dd4143d288186ef0be518ee, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 2} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!114 &7840616707395102002 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7840616707395102003} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 25a4f829952155e48bbe3abf99b78f2e, type: 3} + m_Name: + m_EditorClassIdentifier: + role: {fileID: 0} + attackObj: {fileID: 0} + myBulletType: 0 + bulletMoveType: 0 diff --git a/Assets/role/Capsule.prefab.meta b/Assets/role/Capsule.prefab.meta new file mode 100644 index 0000000..0b9cd13 --- /dev/null +++ b/Assets/role/Capsule.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6bc080effd29ebb47845866eeb973e8d +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: