0209
This commit is contained in:
parent
9128200125
commit
aa5852efed
|
|
@ -67646,6 +67646,63 @@ Transform:
|
||||||
m_CorrespondingSourceObject: {fileID: 4597037973276494, guid: 8d0244df748238943ac8e51af488e706, type: 3}
|
m_CorrespondingSourceObject: {fileID: 4597037973276494, guid: 8d0244df748238943ac8e51af488e706, type: 3}
|
||||||
m_PrefabInstance: {fileID: 615340618}
|
m_PrefabInstance: {fileID: 615340618}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1001 &615584948
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransformParent: {fileID: 0}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 21
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 8.636278
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 17
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 0.8524391
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: -0.16007066
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: -0.15300687
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0.4736179
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: -7.352
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: -24.576
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 59.717
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 791703799912573729, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: Arrow
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_RemovedGameObjects: []
|
||||||
|
m_AddedGameObjects: []
|
||||||
|
m_AddedComponents: []
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
||||||
--- !u!1001 &616674964
|
--- !u!1001 &616674964
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -134322,7 +134379,6 @@ MonoBehaviour:
|
||||||
playerStats: {fileID: 1432447530}
|
playerStats: {fileID: 1432447530}
|
||||||
statWindowPanel: {fileID: 1241367432}
|
statWindowPanel: {fileID: 1241367432}
|
||||||
maxHealthText: {fileID: 30997077}
|
maxHealthText: {fileID: 30997077}
|
||||||
strengthText: {fileID: 516038585}
|
|
||||||
damageText: {fileID: 310564600}
|
damageText: {fileID: 310564600}
|
||||||
speedText: {fileID: 1904720884}
|
speedText: {fileID: 1904720884}
|
||||||
--- !u!1001 &1241488882
|
--- !u!1001 &1241488882
|
||||||
|
|
@ -226827,63 +226883,6 @@ RectTransform:
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 626.0214, y: 41.1114}
|
m_SizeDelta: {x: 626.0214, y: 41.1114}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!1001 &2648821084237718780
|
|
||||||
PrefabInstance:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Modification:
|
|
||||||
serializedVersion: 3
|
|
||||||
m_TransformParent: {fileID: 0}
|
|
||||||
m_Modifications:
|
|
||||||
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.x
|
|
||||||
value: 20.56694
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.y
|
|
||||||
value: 8.539
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.z
|
|
||||||
value: 15.368852
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.w
|
|
||||||
value: 0.7071068
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.x
|
|
||||||
value: -0.7071068
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.z
|
|
||||||
value: -0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 123676116441231771, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 791703799912573729, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
|
||||||
propertyPath: m_Name
|
|
||||||
value: "Meshy_AI_\uC5B4\uB460_\uC18D\uC131_\uD654\uC0B4_0205073412_texture"
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
m_RemovedComponents: []
|
|
||||||
m_RemovedGameObjects: []
|
|
||||||
m_AddedGameObjects: []
|
|
||||||
m_AddedComponents: []
|
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
|
||||||
--- !u!114 &2779298193566403588
|
--- !u!114 &2779298193566403588
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -227291,10 +227290,14 @@ PrefabInstance:
|
||||||
propertyPath: minLength
|
propertyPath: minLength
|
||||||
value: 0.2
|
value: 0.2
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 8345435216483992478, guid: c34da37720b95c84887eda34e2d90e5b, type: 3}
|
||||||
|
propertyPath: m_SlopeLimit
|
||||||
|
value: 47.82
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 8965661853020836870, guid: c34da37720b95c84887eda34e2d90e5b, type: 3}
|
- target: {fileID: 8965661853020836870, guid: c34da37720b95c84887eda34e2d90e5b, type: 3}
|
||||||
propertyPath: arrowPrefab
|
propertyPath: arrowPrefab
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 791703799912573729, guid: e9867839af14eb14ca3d49ee41fc5390, type: 3}
|
objectReference: {fileID: 147436, guid: 640cca9678bf09a4799b1ab7c403edbc, type: 3}
|
||||||
- target: {fileID: 8965661853020836870, guid: c34da37720b95c84887eda34e2d90e5b, type: 3}
|
- target: {fileID: 8965661853020836870, guid: c34da37720b95c84887eda34e2d90e5b, type: 3}
|
||||||
propertyPath: weaponHitBox
|
propertyPath: weaponHitBox
|
||||||
value:
|
value:
|
||||||
|
|
@ -227307,6 +227310,14 @@ PrefabInstance:
|
||||||
propertyPath: enemyLayer.m_Bits
|
propertyPath: enemyLayer.m_Bits
|
||||||
value: 64
|
value: 64
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 8965661853020836870, guid: c34da37720b95c84887eda34e2d90e5b, type: 3}
|
||||||
|
propertyPath: defaultParticlePrefab
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 2943732763553649162, guid: 7af7365e5854aed458abd798049cc5b2, type: 3}
|
||||||
|
- target: {fileID: 8965661853020836870, guid: c34da37720b95c84887eda34e2d90e5b, type: 3}
|
||||||
|
propertyPath: defaultProjectilePrefab
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 121798, guid: 9114871a5af053448bc045ecc1767950, type: 3}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_RemovedGameObjects: []
|
m_RemovedGameObjects: []
|
||||||
m_AddedGameObjects: []
|
m_AddedGameObjects: []
|
||||||
|
|
@ -227926,4 +227937,4 @@ SceneRoots:
|
||||||
- {fileID: 600231664}
|
- {fileID: 600231664}
|
||||||
- {fileID: 1927423250}
|
- {fileID: 1927423250}
|
||||||
- {fileID: 2067270637}
|
- {fileID: 2067270637}
|
||||||
- {fileID: 2648821084237718780}
|
- {fileID: 615584948}
|
||||||
|
|
|
||||||
|
|
@ -147,9 +147,13 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
arrowName: "\uAE30\uBCF8 \uD654\uC0B4"
|
arrowName: "\uAE30\uBCF8 \uD654\uC0B4"
|
||||||
damage: 15
|
elementType: 0
|
||||||
speed: 20
|
baseDamage: 15
|
||||||
range: 15
|
elementDamage: 5
|
||||||
|
elementDuration: 3
|
||||||
|
projectilePrefab: {fileID: 121798, guid: 9114871a5af053448bc045ecc1767950, type: 3}
|
||||||
|
visualModel: {fileID: 2943732763553649162}
|
||||||
pickupUI: {fileID: 0}
|
pickupUI: {fileID: 0}
|
||||||
uiDisplayRange: 3
|
uiDisplayRange: 3
|
||||||
visualModel: {fileID: 2943732763553649162}
|
pickupCollider: {fileID: 0}
|
||||||
|
physicsCollider: {fileID: 0}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,110 @@
|
||||||
%YAML 1.1
|
%YAML 1.1
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &7595155655589483660
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 8239858726604814994}
|
||||||
|
- component: {fileID: 1961651355806644708}
|
||||||
|
- component: {fileID: 1334155314612116751}
|
||||||
|
- component: {fileID: 6382818895195866341}
|
||||||
|
m_Layer: 8
|
||||||
|
m_Name: Model
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &8239858726604814994
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7595155655589483660}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 123676116441231771}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &1961651355806644708
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7595155655589483660}
|
||||||
|
m_Mesh: {fileID: 5461320835613783329, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
|
--- !u!23 &1334155314612116751
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7595155655589483660}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 53e451589827e0b46a0989770553d5d7, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!65 &6382818895195866341
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7595155655589483660}
|
||||||
|
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.55, y: 1.99, z: 0.38}
|
||||||
|
m_Center: {x: -0.15, y: 0, z: 0}
|
||||||
--- !u!1001 &449757124165146224
|
--- !u!1001 &449757124165146224
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -8,6 +113,18 @@ PrefabInstance:
|
||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_TransformParent: {fileID: 0}
|
m_TransformParent: {fileID: 0}
|
||||||
m_Modifications:
|
m_Modifications:
|
||||||
|
- target: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
|
propertyPath: m_LocalScale.x
|
||||||
|
value: 0.3
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
|
propertyPath: m_LocalScale.y
|
||||||
|
value: 0.3
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
|
propertyPath: m_LocalScale.z
|
||||||
|
value: 0.3
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
- target: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
value: 0
|
value: 0
|
||||||
|
|
@ -22,31 +139,31 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
- target: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
propertyPath: m_LocalRotation.w
|
propertyPath: m_LocalRotation.w
|
||||||
value: 0.45588595
|
value: 0.8524391
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
- target: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
propertyPath: m_LocalRotation.x
|
propertyPath: m_LocalRotation.x
|
||||||
value: 0.30701947
|
value: -0.16007066
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
- target: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
propertyPath: m_LocalRotation.y
|
propertyPath: m_LocalRotation.y
|
||||||
value: 0.6000814
|
value: -0.15300687
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
- target: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
propertyPath: m_LocalRotation.z
|
propertyPath: m_LocalRotation.z
|
||||||
value: -0.5812138
|
value: 0.4736179
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
- target: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
propertyPath: m_LocalEulerAnglesHint.x
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
value: 102.18201
|
value: -7.352
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
- target: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
propertyPath: m_LocalEulerAnglesHint.y
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
value: -475.63202
|
value: -24.576
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
- target: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
propertyPath: m_LocalEulerAnglesHint.z
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
value: -589.921
|
value: 59.717
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: -7511558181221131132, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
- target: {fileID: -7511558181221131132, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
propertyPath: m_Materials.Array.data[0]
|
propertyPath: m_Materials.Array.data[0]
|
||||||
|
|
@ -60,49 +177,38 @@ PrefabInstance:
|
||||||
propertyPath: m_Layer
|
propertyPath: m_Layer
|
||||||
value: 8
|
value: 8
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents:
|
||||||
|
- {fileID: -5754084199372789682, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
|
- {fileID: -7511558181221131132, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
m_RemovedGameObjects: []
|
m_RemovedGameObjects: []
|
||||||
m_AddedGameObjects: []
|
m_AddedGameObjects:
|
||||||
m_AddedComponents:
|
- targetCorrespondingSourceObject: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
|
||||||
insertIndex: -1
|
insertIndex: -1
|
||||||
addedObject: {fileID: -3399849508453939123}
|
addedObject: {fileID: 8239858726604814994}
|
||||||
|
m_AddedComponents:
|
||||||
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
insertIndex: -1
|
insertIndex: -1
|
||||||
addedObject: {fileID: -2262200229160577635}
|
addedObject: {fileID: -2262200229160577635}
|
||||||
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
insertIndex: -1
|
insertIndex: -1
|
||||||
addedObject: {fileID: 8027594905793114800}
|
addedObject: {fileID: -3219543398048858031}
|
||||||
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
insertIndex: -1
|
insertIndex: -1
|
||||||
addedObject: {fileID: -3219543398048858031}
|
addedObject: {fileID: 8963769884477349526}
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
|
insertIndex: -1
|
||||||
|
addedObject: {fileID: 8099978972415731377}
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
|
--- !u!4 &123676116441231771 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 449757124165146224}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!1 &791703799912573729 stripped
|
--- !u!1 &791703799912573729 stripped
|
||||||
GameObject:
|
GameObject:
|
||||||
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 6ecc17433e8741d4c990408160a2a534, type: 3}
|
||||||
m_PrefabInstance: {fileID: 449757124165146224}
|
m_PrefabInstance: {fileID: 449757124165146224}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!65 &-3399849508453939123
|
|
||||||
BoxCollider:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 791703799912573729}
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_IncludeLayers:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Bits: 0
|
|
||||||
m_ExcludeLayers:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Bits: 0
|
|
||||||
m_LayerOverridePriority: 0
|
|
||||||
m_IsTrigger: 1
|
|
||||||
m_ProvidesContacts: 0
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 3
|
|
||||||
m_Size: {x: 1.1670706, y: 1.9896994, z: 0.41080707}
|
|
||||||
m_Center: {x: -0.0006635487, y: -0.00016829376, z: 0.0003863276}
|
|
||||||
--- !u!54 &-2262200229160577635
|
--- !u!54 &-2262200229160577635
|
||||||
Rigidbody:
|
Rigidbody:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -130,7 +236,30 @@ Rigidbody:
|
||||||
m_Interpolate: 0
|
m_Interpolate: 0
|
||||||
m_Constraints: 0
|
m_Constraints: 0
|
||||||
m_CollisionDetection: 0
|
m_CollisionDetection: 0
|
||||||
--- !u!135 &8027594905793114800
|
--- !u!114 &-3219543398048858031
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 791703799912573729}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 1c61ccbf2fc5f2144872ea56d89cb755, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
arrowName: "\uC880\uB354 \uC388 \uD654\uC0B4"
|
||||||
|
elementType: 1
|
||||||
|
baseDamage: 15
|
||||||
|
elementDamage: 5
|
||||||
|
elementDuration: 10
|
||||||
|
projectilePrefab: {fileID: 147436, guid: 640cca9678bf09a4799b1ab7c403edbc, type: 3}
|
||||||
|
visualModel: {fileID: 791703799912573729}
|
||||||
|
pickupUI: {fileID: 0}
|
||||||
|
uiDisplayRange: 3
|
||||||
|
pickupCollider: {fileID: 0}
|
||||||
|
physicsCollider: {fileID: 6382818895195866341}
|
||||||
|
--- !u!135 &8963769884477349526
|
||||||
SphereCollider:
|
SphereCollider:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
|
@ -149,9 +278,9 @@ SphereCollider:
|
||||||
m_ProvidesContacts: 0
|
m_ProvidesContacts: 0
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_Radius: 2.9
|
m_Radius: 7.4
|
||||||
m_Center: {x: -0.0006635487, y: -0.00016829367, z: 0.00038632748}
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &-3219543398048858031
|
--- !u!114 &8099978972415731377
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
|
@ -160,13 +289,11 @@ MonoBehaviour:
|
||||||
m_GameObject: {fileID: 791703799912573729}
|
m_GameObject: {fileID: 791703799912573729}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: 1c61ccbf2fc5f2144872ea56d89cb755, type: 3}
|
m_Script: {fileID: 11500000, guid: a6c21ad6c40d2664e8034a59f902166d, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
arrowName: "\uC880\uB354 \uC388 \uD654\uC0B4"
|
weaponRenderer: {fileID: 0}
|
||||||
damage: 15
|
highlightColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
|
||||||
speed: 20
|
blinkSpeed: 0.91
|
||||||
range: 15
|
minIntensity: 0.5
|
||||||
pickupUI: {fileID: 0}
|
maxIntensity: 1.54
|
||||||
uiDisplayRange: 3
|
|
||||||
visualModel: {fileID: 791703799912573729}
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,58 @@
|
||||||
%YAML 1.1
|
%YAML 1.1
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &2332262291692491342
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1946310677813001208}
|
||||||
|
- component: {fileID: 3765162744786089407}
|
||||||
|
m_Layer: 6
|
||||||
|
m_Name: Sensor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1946310677813001208
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2332262291692491342}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 6300812397143730918}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!135 &3765162744786089407
|
||||||
|
SphereCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2332262291692491342}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 1
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Radius: 6.54
|
||||||
|
m_Center: {x: 0, y: 0.72, z: 0}
|
||||||
--- !u!1001 &6300812397144125510
|
--- !u!1001 &6300812397144125510
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -376,9 +429,23 @@ PrefabInstance:
|
||||||
propertyPath: m_Controller
|
propertyPath: m_Controller
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 9100000, guid: 6c71df38704934aa1940c7c9f7d5832c, type: 2}
|
objectReference: {fileID: 9100000, guid: 6c71df38704934aa1940c7c9f7d5832c, type: 2}
|
||||||
|
- target: {fileID: 9500000, guid: 74236a73e891a4540a264993ac8d337b, type: 3}
|
||||||
|
propertyPath: m_WarningMessage
|
||||||
|
value: "\nBinding warning: Some generic clip(s) animate transforms that are
|
||||||
|
already bound by a Humanoid avatar. These transforms can only be changed
|
||||||
|
by Humanoid clips.\n\tTransform 'jaw_2'\n\tTransform 'thigh_l'\n\tTransform
|
||||||
|
'jaw'\n\tTransform 'pelvis'\n\tTransform 'thigh_r'\n\tTransform 'index_03_l'\n\tTransform
|
||||||
|
'lowerarm_l'\n\tTransform 'pinky_03_l'\n\tTransform 'neck_01'\n\tTransform
|
||||||
|
'pinky_03_r'\n\tand more ...\n\tFrom animation clip 'spawn'\n\tFrom animation
|
||||||
|
clip 'damage'\n\tFrom animation clip 'die'\n\tFrom animation clip 'idle'\n\tFrom
|
||||||
|
animation clip 'run'\n\tFrom animation clip 'walk'"
|
||||||
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_RemovedGameObjects: []
|
m_RemovedGameObjects: []
|
||||||
m_AddedGameObjects: []
|
m_AddedGameObjects:
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 400032, guid: 74236a73e891a4540a264993ac8d337b, type: 3}
|
||||||
|
insertIndex: -1
|
||||||
|
addedObject: {fileID: 1946310677813001208}
|
||||||
m_AddedComponents:
|
m_AddedComponents:
|
||||||
- targetCorrespondingSourceObject: {fileID: 100032, guid: 74236a73e891a4540a264993ac8d337b, type: 3}
|
- targetCorrespondingSourceObject: {fileID: 100032, guid: 74236a73e891a4540a264993ac8d337b, type: 3}
|
||||||
insertIndex: -1
|
insertIndex: -1
|
||||||
|
|
@ -386,13 +453,15 @@ PrefabInstance:
|
||||||
- targetCorrespondingSourceObject: {fileID: 100032, guid: 74236a73e891a4540a264993ac8d337b, type: 3}
|
- targetCorrespondingSourceObject: {fileID: 100032, guid: 74236a73e891a4540a264993ac8d337b, type: 3}
|
||||||
insertIndex: -1
|
insertIndex: -1
|
||||||
addedObject: {fileID: 981958185210013997}
|
addedObject: {fileID: 981958185210013997}
|
||||||
- targetCorrespondingSourceObject: {fileID: 100032, guid: 74236a73e891a4540a264993ac8d337b, type: 3}
|
|
||||||
insertIndex: -1
|
|
||||||
addedObject: {fileID: 5060863330968847304}
|
|
||||||
- targetCorrespondingSourceObject: {fileID: 100032, guid: 74236a73e891a4540a264993ac8d337b, type: 3}
|
- targetCorrespondingSourceObject: {fileID: 100032, guid: 74236a73e891a4540a264993ac8d337b, type: 3}
|
||||||
insertIndex: -1
|
insertIndex: -1
|
||||||
addedObject: {fileID: 4824808582826185509}
|
addedObject: {fileID: 4824808582826185509}
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 74236a73e891a4540a264993ac8d337b, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 74236a73e891a4540a264993ac8d337b, type: 3}
|
||||||
|
--- !u!4 &6300812397143730918 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 400032, guid: 74236a73e891a4540a264993ac8d337b, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 6300812397144125510}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!1 &6300812397144094342 stripped
|
--- !u!1 &6300812397144094342 stripped
|
||||||
GameObject:
|
GameObject:
|
||||||
m_CorrespondingSourceObject: {fileID: 100032, guid: 74236a73e891a4540a264993ac8d337b, type: 3}
|
m_CorrespondingSourceObject: {fileID: 100032, guid: 74236a73e891a4540a264993ac8d337b, type: 3}
|
||||||
|
|
@ -460,27 +529,6 @@ MonoBehaviour:
|
||||||
chaseSpeed: 6
|
chaseSpeed: 6
|
||||||
patrolRadius: 5
|
patrolRadius: 5
|
||||||
patrolInterval: 2
|
patrolInterval: 2
|
||||||
--- !u!135 &5060863330968847304
|
|
||||||
SphereCollider:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 6300812397144094342}
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_IncludeLayers:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Bits: 0
|
|
||||||
m_ExcludeLayers:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Bits: 0
|
|
||||||
m_LayerOverridePriority: 0
|
|
||||||
m_IsTrigger: 1
|
|
||||||
m_ProvidesContacts: 0
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 3
|
|
||||||
m_Radius: 12.01
|
|
||||||
m_Center: {x: 0, y: 0.81, z: 0}
|
|
||||||
--- !u!136 &4824808582826185509
|
--- !u!136 &4824808582826185509
|
||||||
CapsuleCollider:
|
CapsuleCollider:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,58 @@
|
||||||
%YAML 1.1
|
%YAML 1.1
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &2969904318739096879
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 5393496004951472949}
|
||||||
|
- component: {fileID: 1622078647137820196}
|
||||||
|
m_Layer: 6
|
||||||
|
m_Name: Sensor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &5393496004951472949
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2969904318739096879}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 7037573943750790056}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!135 &1622078647137820196
|
||||||
|
SphereCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2969904318739096879}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 1
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Radius: 6.77
|
||||||
|
m_Center: {x: 0, y: 0.9, z: 0}
|
||||||
--- !u!1001 &7037573943750398246
|
--- !u!1001 &7037573943750398246
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -301,15 +354,16 @@ PrefabInstance:
|
||||||
value: "\nBinding warning: Some generic clip(s) animate transforms that are
|
value: "\nBinding warning: Some generic clip(s) animate transforms that are
|
||||||
already bound by a Humanoid avatar. These transforms can only be changed
|
already bound by a Humanoid avatar. These transforms can only be changed
|
||||||
by Humanoid clips.\n\tTransform 'jaw_1'\n\tTransform 'pelvis'\n\tTransform
|
by Humanoid clips.\n\tTransform 'jaw_1'\n\tTransform 'pelvis'\n\tTransform
|
||||||
'middle_03_r'\n\tTransform 'index_03_l'\n\tTransform 'lowerarm_l'\n\tTransform
|
'index_03_l'\n\tTransform 'lowerarm_l'\n\tTransform 'neck_01'\n\tTransform
|
||||||
'neck_01'\n\tTransform 'clavicle_l'\n\tTransform 'ring_02_l'\n\tTransform
|
'ring_02_l'\n\tTransform 'hand_l'\n\tTransform 'index_03_r'\n\tTransform
|
||||||
'ball_l'\n\tTransform 'hand_l'\n\tand more ...\n\tFrom animation clip 'spawn'\n\tFrom
|
'jaw_1'\n\tTransform 'ring_03_r'\n\tand more ...\n\tFrom animation clip 'spawn'"
|
||||||
animation clip 'die'\n\tFrom animation clip 'gethit'\n\tFrom animation clip
|
|
||||||
'idle'\n\tFrom animation clip 'run'\n\tFrom animation clip 'walk'"
|
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_RemovedGameObjects: []
|
m_RemovedGameObjects: []
|
||||||
m_AddedGameObjects: []
|
m_AddedGameObjects:
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 400014, guid: 3c2d7f13adf114e5e917e1f1ec0dfe43, type: 3}
|
||||||
|
insertIndex: -1
|
||||||
|
addedObject: {fileID: 5393496004951472949}
|
||||||
m_AddedComponents:
|
m_AddedComponents:
|
||||||
- targetCorrespondingSourceObject: {fileID: 100014, guid: 3c2d7f13adf114e5e917e1f1ec0dfe43, type: 3}
|
- targetCorrespondingSourceObject: {fileID: 100014, guid: 3c2d7f13adf114e5e917e1f1ec0dfe43, type: 3}
|
||||||
insertIndex: -1
|
insertIndex: -1
|
||||||
|
|
@ -317,9 +371,6 @@ PrefabInstance:
|
||||||
- targetCorrespondingSourceObject: {fileID: 100014, guid: 3c2d7f13adf114e5e917e1f1ec0dfe43, type: 3}
|
- targetCorrespondingSourceObject: {fileID: 100014, guid: 3c2d7f13adf114e5e917e1f1ec0dfe43, type: 3}
|
||||||
insertIndex: -1
|
insertIndex: -1
|
||||||
addedObject: {fileID: 8964470652111950350}
|
addedObject: {fileID: 8964470652111950350}
|
||||||
- targetCorrespondingSourceObject: {fileID: 100014, guid: 3c2d7f13adf114e5e917e1f1ec0dfe43, type: 3}
|
|
||||||
insertIndex: -1
|
|
||||||
addedObject: {fileID: 5071862508309103296}
|
|
||||||
- targetCorrespondingSourceObject: {fileID: 100014, guid: 3c2d7f13adf114e5e917e1f1ec0dfe43, type: 3}
|
- targetCorrespondingSourceObject: {fileID: 100014, guid: 3c2d7f13adf114e5e917e1f1ec0dfe43, type: 3}
|
||||||
insertIndex: -1
|
insertIndex: -1
|
||||||
addedObject: {fileID: 7540009469660171729}
|
addedObject: {fileID: 7540009469660171729}
|
||||||
|
|
@ -399,27 +450,6 @@ Rigidbody:
|
||||||
m_Interpolate: 0
|
m_Interpolate: 0
|
||||||
m_Constraints: 80
|
m_Constraints: 80
|
||||||
m_CollisionDetection: 0
|
m_CollisionDetection: 0
|
||||||
--- !u!135 &5071862508309103296
|
|
||||||
SphereCollider:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 7037573943750301576}
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_IncludeLayers:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Bits: 0
|
|
||||||
m_ExcludeLayers:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Bits: 0
|
|
||||||
m_LayerOverridePriority: 0
|
|
||||||
m_IsTrigger: 1
|
|
||||||
m_ProvidesContacts: 0
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 3
|
|
||||||
m_Radius: 7.76
|
|
||||||
m_Center: {x: 0, y: 0.96, z: 0}
|
|
||||||
--- !u!136 &7540009469660171729
|
--- !u!136 &7540009469660171729
|
||||||
CapsuleCollider:
|
CapsuleCollider:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -465,3 +495,8 @@ NavMeshAgent:
|
||||||
m_BaseOffset: 0
|
m_BaseOffset: 0
|
||||||
m_WalkableMask: 4294967295
|
m_WalkableMask: 4294967295
|
||||||
m_ObstacleAvoidanceType: 4
|
m_ObstacleAvoidanceType: 4
|
||||||
|
--- !u!4 &7037573943750790056 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 400014, guid: 3c2d7f13adf114e5e917e1f1ec0dfe43, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 7037573943750398246}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
|
|
||||||
|
|
@ -1446,7 +1446,6 @@ GameObject:
|
||||||
- component: {fileID: 186042788264501781}
|
- component: {fileID: 186042788264501781}
|
||||||
- component: {fileID: 1727176290165168055}
|
- component: {fileID: 1727176290165168055}
|
||||||
- component: {fileID: 8274003280596335008}
|
- component: {fileID: 8274003280596335008}
|
||||||
- component: {fileID: 4377375783899676698}
|
|
||||||
- component: {fileID: 3230568340763030921}
|
- component: {fileID: 3230568340763030921}
|
||||||
- component: {fileID: -3738201542468800832}
|
- component: {fileID: -3738201542468800832}
|
||||||
m_Layer: 6
|
m_Layer: 6
|
||||||
|
|
@ -1472,6 +1471,7 @@ Transform:
|
||||||
- {fileID: 4808302775237808581}
|
- {fileID: 4808302775237808581}
|
||||||
- {fileID: 3942939034497495350}
|
- {fileID: 3942939034497495350}
|
||||||
- {fileID: 6080021456397241365}
|
- {fileID: 6080021456397241365}
|
||||||
|
- {fileID: 8585626370423984187}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!95 &186042788264501781
|
--- !u!95 &186042788264501781
|
||||||
|
|
@ -1557,27 +1557,6 @@ NavMeshAgent:
|
||||||
m_BaseOffset: 0
|
m_BaseOffset: 0
|
||||||
m_WalkableMask: 4294967295
|
m_WalkableMask: 4294967295
|
||||||
m_ObstacleAvoidanceType: 4
|
m_ObstacleAvoidanceType: 4
|
||||||
--- !u!135 &4377375783899676698
|
|
||||||
SphereCollider:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 5674935864780053661}
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_IncludeLayers:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Bits: 0
|
|
||||||
m_ExcludeLayers:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Bits: 0
|
|
||||||
m_LayerOverridePriority: 0
|
|
||||||
m_IsTrigger: 1
|
|
||||||
m_ProvidesContacts: 0
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 3
|
|
||||||
m_Radius: 8.44
|
|
||||||
m_Center: {x: 0, y: 0.84, z: 0}
|
|
||||||
--- !u!136 &3230568340763030921
|
--- !u!136 &3230568340763030921
|
||||||
CapsuleCollider:
|
CapsuleCollider:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -2561,6 +2540,59 @@ Transform:
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 392990763145656856}
|
m_Father: {fileID: 392990763145656856}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &7586692832569694160
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 8585626370423984187}
|
||||||
|
- component: {fileID: 4467293074579004200}
|
||||||
|
m_Layer: 6
|
||||||
|
m_Name: Sensor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &8585626370423984187
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7586692832569694160}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 8892907556271350198}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!135 &4467293074579004200
|
||||||
|
SphereCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7586692832569694160}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 1
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Radius: 7.17
|
||||||
|
m_Center: {x: 0, y: 0.78, z: 0}
|
||||||
--- !u!1 &7609060446780508730
|
--- !u!1 &7609060446780508730
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -1454,7 +1454,6 @@ GameObject:
|
||||||
- component: {fileID: 165297179063843592}
|
- component: {fileID: 165297179063843592}
|
||||||
- component: {fileID: -5927759587507764226}
|
- component: {fileID: -5927759587507764226}
|
||||||
- component: {fileID: 1514289710616282544}
|
- component: {fileID: 1514289710616282544}
|
||||||
- component: {fileID: 8202243285445189301}
|
|
||||||
- component: {fileID: 5769769960016074036}
|
- component: {fileID: 5769769960016074036}
|
||||||
m_Layer: 6
|
m_Layer: 6
|
||||||
m_Name: ThrowMonster
|
m_Name: ThrowMonster
|
||||||
|
|
@ -1479,6 +1478,7 @@ Transform:
|
||||||
- {fileID: 5907653275365802218}
|
- {fileID: 5907653275365802218}
|
||||||
- {fileID: 6833022782011454118}
|
- {fileID: 6833022782011454118}
|
||||||
- {fileID: 4112453188265187233}
|
- {fileID: 4112453188265187233}
|
||||||
|
- {fileID: 4683465359942669632}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 95.636, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 95.636, z: 0}
|
||||||
--- !u!95 &2734043935891789976
|
--- !u!95 &2734043935891789976
|
||||||
|
|
@ -1606,27 +1606,6 @@ Rigidbody:
|
||||||
m_Interpolate: 0
|
m_Interpolate: 0
|
||||||
m_Constraints: 112
|
m_Constraints: 112
|
||||||
m_CollisionDetection: 0
|
m_CollisionDetection: 0
|
||||||
--- !u!135 &8202243285445189301
|
|
||||||
SphereCollider:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3587750552762439828}
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_IncludeLayers:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Bits: 0
|
|
||||||
m_ExcludeLayers:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Bits: 0
|
|
||||||
m_LayerOverridePriority: 0
|
|
||||||
m_IsTrigger: 1
|
|
||||||
m_ProvidesContacts: 0
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 3
|
|
||||||
m_Radius: 8.34
|
|
||||||
m_Center: {x: 0, y: 1.05, z: -0.94}
|
|
||||||
--- !u!136 &5769769960016074036
|
--- !u!136 &5769769960016074036
|
||||||
CapsuleCollider:
|
CapsuleCollider:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -2978,6 +2957,59 @@ Transform:
|
||||||
- {fileID: 5352976558832282297}
|
- {fileID: 5352976558832282297}
|
||||||
m_Father: {fileID: 1769251054866216705}
|
m_Father: {fileID: 1769251054866216705}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &8225558622838794286
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4683465359942669632}
|
||||||
|
- component: {fileID: 7412136412098159124}
|
||||||
|
m_Layer: 6
|
||||||
|
m_Name: Sensor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4683465359942669632
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8225558622838794286}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 5494800343343911850}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!135 &7412136412098159124
|
||||||
|
SphereCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8225558622838794286}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Radius: 6.76
|
||||||
|
m_Center: {x: 0, y: 1.26, z: 0}
|
||||||
--- !u!1 &8582791187988676601
|
--- !u!1 &8582791187988676601
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -1326,10 +1326,9 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 4cd093bc63aea8c479444860a2c373b2, type: 3}
|
m_Script: {fileID: 11500000, guid: 4cd093bc63aea8c479444860a2c373b2, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
arrowPrefab: {fileID: 4837848417474938111, guid: 3b643e0e16165f6439347e8d8b238fa6, type: 3}
|
|
||||||
firePoint: {fileID: 839746164049513834}
|
firePoint: {fileID: 839746164049513834}
|
||||||
pAnim: {fileID: 7686364893196566162}
|
pAnim: {fileID: 7686364893196566162}
|
||||||
normalDamage: 10
|
playerStats: {fileID: 0}
|
||||||
normalRange: 15
|
normalRange: 15
|
||||||
normalSpeed: 20
|
normalSpeed: 20
|
||||||
attackCooldown: 0.5
|
attackCooldown: 0.5
|
||||||
|
|
@ -1344,6 +1343,15 @@ MonoBehaviour:
|
||||||
- chargeTime: 3
|
- chargeTime: 3
|
||||||
damageMult: 2.5
|
damageMult: 2.5
|
||||||
rangeMult: 1.5
|
rangeMult: 1.5
|
||||||
|
enableAutoAim: 1
|
||||||
|
autoAimRange: 15
|
||||||
|
autoAimAngle: 45
|
||||||
|
aimAssistStrength: 0.4
|
||||||
|
enemyLayer:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
onlyMaxCharge: 1
|
||||||
|
defaultProjectilePrefab: {fileID: 0}
|
||||||
--- !u!114 &8160405634931995834
|
--- !u!114 &8160405634931995834
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -1413,18 +1421,14 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
baseMaxHealth: 1000
|
baseMaxHealth: 1000
|
||||||
baseMoveSpeed: 5
|
baseMoveSpeed: 5
|
||||||
baseStrength: 10
|
|
||||||
baseAttackDamage: 10
|
baseAttackDamage: 10
|
||||||
bonusMaxHealth: 0
|
bonusMaxHealth: 0
|
||||||
bonusMoveSpeed: 0
|
bonusMoveSpeed: 0
|
||||||
bonusStrength: 0
|
|
||||||
bonusAttackDamage: 0
|
bonusAttackDamage: 0
|
||||||
weaponDamage: 0
|
weaponDamage: 0
|
||||||
weightToSpeedPenalty: 0.1
|
|
||||||
runSpeedMultiplier: 1.5
|
runSpeedMultiplier: 1.5
|
||||||
finalMaxHealth: 0
|
finalMaxHealth: 0
|
||||||
finalMoveSpeed: 0
|
finalMoveSpeed: 0
|
||||||
finalStrength: 0
|
|
||||||
finalAttackDamage: 0
|
finalAttackDamage: 0
|
||||||
--- !u!114 &8385686067015665091
|
--- !u!114 &8385686067015665091
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,15 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 640cca9678bf09a4799b1ab7c403edbc
|
||||||
|
timeCreated: 1499121568
|
||||||
|
licenseType: Store
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 57772
|
||||||
|
packageName: Epic Toon FX
|
||||||
|
packageVersion: 1.81
|
||||||
|
assetPath: Assets/Epic Toon FX/Prefabs/Combat/Missiles/Fireball/FireballMissileFire.prefab
|
||||||
|
uploadId: 567564
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,15 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9114871a5af053448bc045ecc1767950
|
||||||
|
timeCreated: 1499191485
|
||||||
|
licenseType: Store
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 57772
|
||||||
|
packageName: Epic Toon FX
|
||||||
|
packageVersion: 1.81
|
||||||
|
assetPath: Assets/Epic Toon FX/Prefabs/Combat/Missiles/Fireball/FireballMissilePink.prefab
|
||||||
|
uploadId: 567564
|
||||||
|
|
@ -3,6 +3,8 @@ using UnityEngine.AI;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 몬스터 기본 클래스 (공통 기능만)
|
/// 몬스터 기본 클래스 (공통 기능만)
|
||||||
/// - 공격 방식은 자식 클래스에서 구현
|
/// - 공격 방식은 자식 클래스에서 구현
|
||||||
|
|
@ -87,6 +89,8 @@ public abstract class MonsterClass : MonoBehaviour, IDamageable
|
||||||
Collider col = GetComponent<Collider>();
|
Collider col = GetComponent<Collider>();
|
||||||
if (col != null) col.enabled = true;
|
if (col != null) col.enabled = true;
|
||||||
|
|
||||||
|
if (agent != null) agent.speed = moveSpeed; // 스피드 초기화
|
||||||
|
|
||||||
OnResetStats();
|
OnResetStats();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -225,14 +229,9 @@ public abstract class MonsterClass : MonoBehaviour, IDamageable
|
||||||
protected void ReturnToPool() => gameObject.SetActive(false);
|
protected void ReturnToPool() => gameObject.SetActive(false);
|
||||||
|
|
||||||
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
// ⭐ 공격 이벤트 (여기가 중요!)
|
// ⭐ 공격 이벤트
|
||||||
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 애니메이션 이벤트: 공격 시작
|
|
||||||
/// - 부모는 기본적으로 무기를 켬
|
|
||||||
/// - 자식(원거리)은 이걸 Override 해서 화살 발사로 바꿈
|
|
||||||
/// </summary>
|
|
||||||
public virtual void OnAttackStart()
|
public virtual void OnAttackStart()
|
||||||
{
|
{
|
||||||
isAttacking = true;
|
isAttacking = true;
|
||||||
|
|
@ -261,4 +260,107 @@ public abstract class MonsterClass : MonoBehaviour, IDamageable
|
||||||
yield return new WaitForSeconds(attackRestDuration);
|
yield return new WaitForSeconds(attackRestDuration);
|
||||||
isResting = false;
|
isResting = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
// ⭐ 상태 이상 시스템 (추가된 부분)
|
||||||
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 상태이상 적용 (PlayerArrow에서 호출)
|
||||||
|
/// </summary>
|
||||||
|
public void ApplyStatusEffect(StatusEffectType type, float damage, float duration)
|
||||||
|
{
|
||||||
|
if (isDead) return;
|
||||||
|
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case StatusEffectType.Burn:
|
||||||
|
StartCoroutine(BurnCoroutine(damage, duration));
|
||||||
|
break;
|
||||||
|
case StatusEffectType.Slow:
|
||||||
|
StartCoroutine(SlowCoroutine(damage, duration));
|
||||||
|
break;
|
||||||
|
case StatusEffectType.Poison:
|
||||||
|
StartCoroutine(PoisonCoroutine(damage, duration));
|
||||||
|
break;
|
||||||
|
case StatusEffectType.Shock:
|
||||||
|
TakeDamage(damage); // 충격 데미지 즉시 적용
|
||||||
|
StartCoroutine(StunCoroutine(0.5f)); // 0.5초 스턴
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 화상: 일정 시간 동안 0.5초마다 틱 데미지
|
||||||
|
/// </summary>
|
||||||
|
private IEnumerator BurnCoroutine(float tickDamage, float duration)
|
||||||
|
{
|
||||||
|
float elapsed = 0f;
|
||||||
|
float tickInterval = 0.5f;
|
||||||
|
while (elapsed < duration)
|
||||||
|
{
|
||||||
|
TakeDamage(tickDamage * tickInterval);
|
||||||
|
yield return new WaitForSeconds(tickInterval);
|
||||||
|
elapsed += tickInterval;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 슬로우: 이동속도를 일시적으로 감소
|
||||||
|
/// </summary>
|
||||||
|
private IEnumerator SlowCoroutine(float amount, float duration)
|
||||||
|
{
|
||||||
|
// NavMeshAgent가 있는 경우 속도 조절
|
||||||
|
if (agent != null)
|
||||||
|
{
|
||||||
|
float originalSpeed = agent.speed;
|
||||||
|
agent.speed *= (1f - Mathf.Clamp01(amount / 100f));
|
||||||
|
yield return new WaitForSeconds(duration);
|
||||||
|
agent.speed = originalSpeed; // 원래 속도로 복구
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// NavMeshAgent가 없으면 그냥 대기
|
||||||
|
yield return new WaitForSeconds(duration);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 독: 지속 데미지 (1초마다)
|
||||||
|
/// </summary>
|
||||||
|
private IEnumerator PoisonCoroutine(float tickDamage, float duration)
|
||||||
|
{
|
||||||
|
float elapsed = 0f;
|
||||||
|
float tickInterval = 1f;
|
||||||
|
while (elapsed < duration)
|
||||||
|
{
|
||||||
|
TakeDamage(tickDamage * tickInterval);
|
||||||
|
yield return new WaitForSeconds(tickInterval);
|
||||||
|
elapsed += tickInterval;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 스턴: 짧은 시간 동안 행동 정지
|
||||||
|
/// </summary>
|
||||||
|
private IEnumerator StunCoroutine(float duration)
|
||||||
|
{
|
||||||
|
if (agent != null)
|
||||||
|
{
|
||||||
|
agent.isStopped = true;
|
||||||
|
if (animator != null) animator.speed = 0; // 애니메이션도 멈춤 (선택사항)
|
||||||
|
|
||||||
|
yield return new WaitForSeconds(duration);
|
||||||
|
|
||||||
|
if (!isDead)
|
||||||
|
{
|
||||||
|
agent.isStopped = false;
|
||||||
|
if (animator != null) animator.speed = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
yield return new WaitForSeconds(duration);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,51 +1,304 @@
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 발사된 화살 발사체 (파티클 프리팹에 부착됨)
|
||||||
|
/// SphereCast 기반 정밀 충돌 감지 (기존 100% 유지)
|
||||||
|
/// [NEW] 속성 데미지(DoT) 시스템 추가
|
||||||
|
/// </summary>
|
||||||
public class PlayerArrow : MonoBehaviour
|
public class PlayerArrow : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
[Header("--- 정밀 피격 판정 설정 ---")]
|
||||||
|
[SerializeField] private float raycastDistance = 0.8f;
|
||||||
|
[SerializeField] private float raycastRadius = 0.08f;
|
||||||
|
[SerializeField] private LayerMask hitLayers;
|
||||||
|
[SerializeField] private Transform arrowTip;
|
||||||
|
|
||||||
|
[Header("--- 디버그 시각화 ---")]
|
||||||
|
[SerializeField] private bool showDebugRay = true;
|
||||||
|
|
||||||
|
// 화살 스탯
|
||||||
private float damage;
|
private float damage;
|
||||||
private float speed;
|
private float speed;
|
||||||
private float range;
|
private float range;
|
||||||
private Vector3 startPos;
|
private Vector3 startPos;
|
||||||
|
private Vector3 shootDirection;
|
||||||
private bool isFired = false;
|
private bool isFired = false;
|
||||||
|
private bool hasHit = false;
|
||||||
|
|
||||||
public void Initialize(float dmg, float arrowSpeed, float maxRange)
|
// [NEW] 속성 데미지 시스템
|
||||||
|
private ArrowElementType elementType = ArrowElementType.None;
|
||||||
|
private float elementDamage = 0f;
|
||||||
|
private float elementDuration = 0f;
|
||||||
|
|
||||||
|
// Raycast 추적용
|
||||||
|
private Vector3 previousPosition;
|
||||||
|
private Rigidbody rb;
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
rb = GetComponent<Rigidbody>();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
if (arrowTip == null)
|
||||||
|
{
|
||||||
|
Transform tip = transform.Find("ArrowTip");
|
||||||
|
if (tip == null) tip = transform.Find("Tip");
|
||||||
|
arrowTip = tip ?? transform;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hitLayers.value == 0)
|
||||||
|
{
|
||||||
|
hitLayers = LayerMask.GetMask("Enemy", "EnemyHitBox", "Wall", "Ground", "Default");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// [MODIFIED] 초기화 — 속성 정보 포함 (7개 파라미터)
|
||||||
|
/// PlayerAttack.OnShootArrow()에서 호출됩니다.
|
||||||
|
/// </summary>
|
||||||
|
public void Initialize(
|
||||||
|
float dmg,
|
||||||
|
float arrowSpeed,
|
||||||
|
float maxRange,
|
||||||
|
Vector3 direction,
|
||||||
|
ArrowElementType element,
|
||||||
|
float elemDmg,
|
||||||
|
float elemDur)
|
||||||
{
|
{
|
||||||
this.damage = dmg;
|
this.damage = dmg;
|
||||||
this.speed = arrowSpeed;
|
this.speed = arrowSpeed;
|
||||||
this.range = maxRange;
|
this.range = maxRange;
|
||||||
|
this.shootDirection = direction.normalized;
|
||||||
this.startPos = transform.position;
|
this.startPos = transform.position;
|
||||||
|
this.previousPosition = transform.position;
|
||||||
this.isFired = true;
|
this.isFired = true;
|
||||||
|
|
||||||
Rigidbody rb = GetComponent<Rigidbody>();
|
// [NEW] 속성 정보 저장
|
||||||
|
this.elementType = element;
|
||||||
|
this.elementDamage = elemDmg;
|
||||||
|
this.elementDuration = elemDur;
|
||||||
|
|
||||||
|
// 발사 방향으로 회전
|
||||||
|
if (shootDirection != Vector3.zero)
|
||||||
|
{
|
||||||
|
transform.rotation = Quaternion.LookRotation(shootDirection);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rigidbody 설정
|
||||||
|
if (rb == null) rb = GetComponent<Rigidbody>();
|
||||||
|
|
||||||
if (rb != null)
|
if (rb != null)
|
||||||
{
|
{
|
||||||
rb.useGravity = false; // Á÷¼± ¹ß»ç
|
rb.useGravity = false;
|
||||||
rb.velocity = transform.forward * speed;
|
rb.isKinematic = false;
|
||||||
|
rb.collisionDetectionMode = CollisionDetectionMode.ContinuousDynamic;
|
||||||
|
rb.velocity = shootDirection * speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
Destroy(gameObject, 5f); // 5ÃÊ µÚ ÀÚµ¿ »èÁ¦
|
Destroy(gameObject, 5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update()
|
/// <summary>
|
||||||
|
/// [하위 호환성] 방향 없는 3-파라미터 버전
|
||||||
|
/// </summary>
|
||||||
|
public void Initialize(float dmg, float arrowSpeed, float maxRange)
|
||||||
{
|
{
|
||||||
if (!isFired) return;
|
Initialize(dmg, arrowSpeed, maxRange, transform.forward,
|
||||||
if (Vector3.Distance(startPos, transform.position) >= range)
|
ArrowElementType.None, 0f, 0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
if (!isFired || hasHit) return;
|
||||||
|
|
||||||
|
// 사거리 체크
|
||||||
|
float traveledDistance = Vector3.Distance(startPos, transform.position);
|
||||||
|
if (traveledDistance >= range)
|
||||||
{
|
{
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 정밀 충돌 감지
|
||||||
|
CheckPrecisionCollision();
|
||||||
|
|
||||||
|
previousPosition = transform.position;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SphereCast 기반 정밀 충돌 (기존 로직 100% 유지)
|
||||||
|
/// </summary>
|
||||||
|
private void CheckPrecisionCollision()
|
||||||
|
{
|
||||||
|
Vector3 tipPosition = arrowTip != null ? arrowTip.position : transform.position;
|
||||||
|
|
||||||
|
Vector3 direction = rb != null && rb.velocity.magnitude > 0.1f
|
||||||
|
? rb.velocity.normalized
|
||||||
|
: transform.forward;
|
||||||
|
|
||||||
|
float frameDistance = Vector3.Distance(previousPosition, transform.position);
|
||||||
|
float checkDistance = Mathf.Max(frameDistance, raycastDistance);
|
||||||
|
|
||||||
|
RaycastHit hit;
|
||||||
|
bool didHit = Physics.SphereCast(
|
||||||
|
tipPosition,
|
||||||
|
raycastRadius,
|
||||||
|
direction,
|
||||||
|
out hit,
|
||||||
|
checkDistance,
|
||||||
|
hitLayers
|
||||||
|
);
|
||||||
|
|
||||||
|
if (showDebugRay)
|
||||||
|
{
|
||||||
|
Debug.DrawRay(tipPosition, direction * checkDistance, didHit ? Color.red : Color.green, 0.1f);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (didHit)
|
||||||
|
{
|
||||||
|
HandleHit(hit.collider, hit.point);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// [MODIFIED] 충돌 처리 — 속성 데미지 적용 추가
|
||||||
|
/// </summary>
|
||||||
|
private void HandleHit(Collider hitCollider, Vector3 hitPoint)
|
||||||
|
{
|
||||||
|
if (hasHit) return;
|
||||||
|
hasHit = true;
|
||||||
|
|
||||||
|
// 적 감지 (Tag 또는 Layer)
|
||||||
|
bool isEnemy = hitCollider.CompareTag("Enemy");
|
||||||
|
|
||||||
|
// EnemyHitBox 레이어 체크 (레이어가 존재하는 경우에만)
|
||||||
|
int enemyHitBoxLayerIndex = LayerMask.NameToLayer("EnemyHitBox");
|
||||||
|
if (!isEnemy && enemyHitBoxLayerIndex != -1)
|
||||||
|
{
|
||||||
|
isEnemy = hitCollider.gameObject.layer == enemyHitBoxLayerIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isEnemy)
|
||||||
|
{
|
||||||
|
// MonsterClass를 찾아 데미지 적용
|
||||||
|
MonsterClass monster = hitCollider.GetComponentInParent<MonsterClass>();
|
||||||
|
if (monster == null) monster = hitCollider.GetComponent<MonsterClass>();
|
||||||
|
|
||||||
|
if (monster != null)
|
||||||
|
{
|
||||||
|
// 1. 기본 데미지 적용
|
||||||
|
monster.TakeDamage(damage);
|
||||||
|
Debug.Log($"적 명중! 기본데미지: {damage}");
|
||||||
|
|
||||||
|
// 2. [NEW] 속성 효과 적용
|
||||||
|
ApplyElementEffect(monster);
|
||||||
|
}
|
||||||
|
|
||||||
|
Destroy(gameObject, 0.05f);
|
||||||
|
}
|
||||||
|
else if (hitCollider.CompareTag("Wall") || hitCollider.CompareTag("Ground"))
|
||||||
|
{
|
||||||
|
Debug.Log($"벽/바닥 충돌! 위치: {hitPoint}");
|
||||||
|
Destroy(gameObject, 0.05f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 기타 충돌 (Unknown)
|
||||||
|
Destroy(gameObject, 0.05f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// [NEW] 속성 효과 적용
|
||||||
|
/// MonsterClass에 ApplyStatusEffect 메서드가 있어야 합니다.
|
||||||
|
/// </summary>
|
||||||
|
private void ApplyElementEffect(MonsterClass monster)
|
||||||
|
{
|
||||||
|
if (elementType == ArrowElementType.None || elementDamage <= 0f) return;
|
||||||
|
|
||||||
|
// MonsterClass에 ApplyStatusEffect가 있는지 확인
|
||||||
|
switch (elementType)
|
||||||
|
{
|
||||||
|
case ArrowElementType.Fire:
|
||||||
|
monster.ApplyStatusEffect(StatusEffectType.Burn, elementDamage, elementDuration);
|
||||||
|
Debug.Log($"화염 효과! {elementDamage} 데미지 x {elementDuration}초");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ArrowElementType.Ice:
|
||||||
|
monster.ApplyStatusEffect(StatusEffectType.Slow, elementDamage, elementDuration);
|
||||||
|
Debug.Log($"빙결 효과! 슬로우 {elementDuration}초");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ArrowElementType.Poison:
|
||||||
|
monster.ApplyStatusEffect(StatusEffectType.Poison, elementDamage, elementDuration);
|
||||||
|
Debug.Log($"독 효과! {elementDamage} 데미지 x {elementDuration}초");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ArrowElementType.Lightning:
|
||||||
|
monster.ApplyStatusEffect(StatusEffectType.Shock, elementDamage, elementDuration);
|
||||||
|
Debug.Log($"감전 효과! {elementDamage} 범위 데미지");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 백업 충돌 감지 (OnTriggerEnter) — 기존 로직 유지
|
||||||
|
/// </summary>
|
||||||
private void OnTriggerEnter(Collider other)
|
private void OnTriggerEnter(Collider other)
|
||||||
{
|
{
|
||||||
if (other.CompareTag("Enemy"))
|
if (hasHit) return;
|
||||||
|
|
||||||
|
bool isEnemy = other.CompareTag("Enemy");
|
||||||
|
int enemyHitBoxLayerIndex = LayerMask.NameToLayer("EnemyHitBox");
|
||||||
|
if (!isEnemy && enemyHitBoxLayerIndex != -1)
|
||||||
{
|
{
|
||||||
var monster = other.GetComponent<MonsterClass>();
|
isEnemy = other.gameObject.layer == enemyHitBoxLayerIndex;
|
||||||
if (monster != null) monster.TakeDamage(damage);
|
}
|
||||||
Destroy(gameObject);
|
|
||||||
|
if (isEnemy)
|
||||||
|
{
|
||||||
|
HandleHit(other, other.ClosestPoint(transform.position));
|
||||||
}
|
}
|
||||||
else if (other.CompareTag("Wall") || other.CompareTag("Ground"))
|
else if (other.CompareTag("Wall") || other.CompareTag("Ground"))
|
||||||
{
|
{
|
||||||
Destroy(gameObject);
|
hasHit = true;
|
||||||
|
Destroy(gameObject, 0.05f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gizmo 디버그 시각화 — 기존 로직 유지 + 속성 색상 추가
|
||||||
|
/// </summary>
|
||||||
|
private void OnDrawGizmos()
|
||||||
|
{
|
||||||
|
if (!Application.isPlaying || !isFired || !showDebugRay) return;
|
||||||
|
|
||||||
|
Vector3 tipPosition = arrowTip != null ? arrowTip.position : transform.position;
|
||||||
|
Vector3 direction = rb != null && rb.velocity.magnitude > 0.1f
|
||||||
|
? rb.velocity.normalized
|
||||||
|
: transform.forward;
|
||||||
|
|
||||||
|
Gizmos.color = hasHit ? Color.red : Color.green;
|
||||||
|
Gizmos.DrawWireSphere(tipPosition, raycastRadius);
|
||||||
|
Gizmos.DrawWireSphere(tipPosition + direction * raycastDistance, raycastRadius);
|
||||||
|
|
||||||
|
Gizmos.color = Color.yellow;
|
||||||
|
Gizmos.DrawLine(tipPosition, tipPosition + direction * raycastDistance);
|
||||||
|
|
||||||
|
// [NEW] 속성별 색상 표시
|
||||||
|
switch (elementType)
|
||||||
|
{
|
||||||
|
case ArrowElementType.Fire: Gizmos.color = Color.red; break;
|
||||||
|
case ArrowElementType.Ice: Gizmos.color = Color.cyan; break;
|
||||||
|
case ArrowElementType.Poison: Gizmos.color = Color.green; break;
|
||||||
|
case ArrowElementType.Lightning: Gizmos.color = Color.yellow; break;
|
||||||
|
}
|
||||||
|
if (elementType != ArrowElementType.None)
|
||||||
|
{
|
||||||
|
Gizmos.DrawWireSphere(transform.position, 0.5f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
46
Assets/Scripts/Player/Combat/ArrowData.cs
Normal file
46
Assets/Scripts/Player/Combat/ArrowData.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
// ============================================
|
||||||
|
// 📁 파일명: ArrowData.cs
|
||||||
|
// 📂 경로: Assets/Scripts/Data/ArrowData.cs
|
||||||
|
// ============================================
|
||||||
|
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 화살 정보를 담는 데이터 구조체
|
||||||
|
/// ArrowPickup.GetArrowData() → PlayerAttack.SetCurrentArrow() 로 전달됩니다.
|
||||||
|
/// </summary>
|
||||||
|
[System.Serializable]
|
||||||
|
public struct ArrowData
|
||||||
|
{
|
||||||
|
[Header("--- 기본 정보 ---")]
|
||||||
|
public string arrowName; // 화살 이름 (UI 표시용)
|
||||||
|
public ArrowElementType elementType; // 속성 타입
|
||||||
|
|
||||||
|
[Header("--- 스탯 ---")]
|
||||||
|
public float baseDamage; // 기본 데미지
|
||||||
|
public float elementDamage; // 속성 추가 데미지
|
||||||
|
public float elementDuration; // 속성 지속시간 (초)
|
||||||
|
|
||||||
|
[Header("--- 프리팹 ---")]
|
||||||
|
public GameObject projectilePrefab; // 발사할 파티클 프리팹
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 기본 화살 데이터 생성
|
||||||
|
/// </summary>
|
||||||
|
public static ArrowData Default => new ArrowData
|
||||||
|
{
|
||||||
|
arrowName = "기본 화살",
|
||||||
|
elementType = ArrowElementType.None,
|
||||||
|
baseDamage = 10f,
|
||||||
|
elementDamage = 0f,
|
||||||
|
elementDuration = 0f,
|
||||||
|
projectilePrefab = null
|
||||||
|
};
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return $"[{arrowName}] 속성={elementType}, " +
|
||||||
|
$"기본데미지={baseDamage}, 속성데미지={elementDamage}, " +
|
||||||
|
$"지속시간={elementDuration}s";
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/Player/Combat/ArrowData.cs.meta
Normal file
11
Assets/Scripts/Player/Combat/ArrowData.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c430602335150a441b03b4d3e64debef
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
17
Assets/Scripts/Player/Combat/ArrowElementType.cs
Normal file
17
Assets/Scripts/Player/Combat/ArrowElementType.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
// ============================================
|
||||||
|
// 📁 파일명: ArrowElementType.cs
|
||||||
|
// 📂 경로: Assets/Scripts/Data/ArrowElementType.cs
|
||||||
|
// ============================================
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 화살 속성 타입 열거형
|
||||||
|
/// PlayerAttack, PlayerArrow, ArrowPickup에서 참조합니다.
|
||||||
|
/// </summary>
|
||||||
|
public enum ArrowElementType
|
||||||
|
{
|
||||||
|
None, // 무속성 (기본 화살)
|
||||||
|
Fire, // 불 - 지속 데미지 (DoT)
|
||||||
|
Ice, // 얼음 - 이동속도 감소 (슬로우)
|
||||||
|
Poison, // 독 - 지속 데미지 + 방어력 감소
|
||||||
|
Lightning // 번개 - 즉발 범위 데미지
|
||||||
|
}
|
||||||
11
Assets/Scripts/Player/Combat/ArrowElementType.cs.meta
Normal file
11
Assets/Scripts/Player/Combat/ArrowElementType.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2f3bcf9fff09afa43a9f9d08e49ccea3
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -5,12 +5,13 @@ using System.Collections.Generic;
|
||||||
public class PlayerAttack : MonoBehaviour
|
public class PlayerAttack : MonoBehaviour
|
||||||
{
|
{
|
||||||
[Header("--- 활 설정 ---")]
|
[Header("--- 활 설정 ---")]
|
||||||
[SerializeField] private GameObject arrowPrefab;
|
|
||||||
[SerializeField] private Transform firePoint;
|
[SerializeField] private Transform firePoint;
|
||||||
[SerializeField] private PlayerAnimator pAnim;
|
[SerializeField] private PlayerAnimator pAnim;
|
||||||
|
|
||||||
|
[Header("--- 스탯 참조 ---")]
|
||||||
|
[SerializeField] private Stats playerStats;
|
||||||
|
|
||||||
[Header("--- 일반 공격 (좌클릭) ---")]
|
[Header("--- 일반 공격 (좌클릭) ---")]
|
||||||
[SerializeField] private float normalDamage = 10f;
|
|
||||||
[SerializeField] private float normalRange = 15f;
|
[SerializeField] private float normalRange = 15f;
|
||||||
[SerializeField] private float normalSpeed = 20f;
|
[SerializeField] private float normalSpeed = 20f;
|
||||||
[SerializeField] private float attackCooldown = 0.5f;
|
[SerializeField] private float attackCooldown = 0.5f;
|
||||||
|
|
@ -28,16 +29,25 @@ public class PlayerAttack : MonoBehaviour
|
||||||
|
|
||||||
[SerializeField] private List<ChargeStage> chargeStages;
|
[SerializeField] private List<ChargeStage> chargeStages;
|
||||||
|
|
||||||
[Header("--- 🎯 에임 보정 설정 ---")]
|
[Header("--- 에임 보정 설정 ---")]
|
||||||
[SerializeField] private bool enableAutoAim = true; // 자동 조준 켜기/끄기
|
[SerializeField] private bool enableAutoAim = true;
|
||||||
[SerializeField] private float autoAimRange = 15f; // 자동 조준 감지 범위
|
[SerializeField] private float autoAimRange = 15f;
|
||||||
[SerializeField] private float autoAimAngle = 45f; // 마우스 커서 기준 각도 (넓을수록 감지 잘됨)
|
[SerializeField] private float autoAimAngle = 45f;
|
||||||
[Range(0f, 1f)]
|
[Range(0f, 1f)]
|
||||||
[Tooltip("에임 보정 강도 (0: 보정 없음, 1: 완전 자동 조준)")]
|
[SerializeField] private float aimAssistStrength = 0.4f;
|
||||||
[SerializeField] private float aimAssistStrength = 0.4f; // 40% 보정 (에임핵 느낌)
|
[SerializeField] private LayerMask enemyLayer;
|
||||||
[SerializeField] private LayerMask enemyLayer; // 적 레이어
|
[SerializeField] private bool onlyMaxCharge = true;
|
||||||
[Tooltip("차징 최대 단계에서만 자동 조준 활성화")]
|
|
||||||
[SerializeField] private bool onlyMaxCharge = true; // 최대 차징에서만 작동
|
// ============================================
|
||||||
|
// [NEW] 파티클 기반 화살 시스템
|
||||||
|
// ============================================
|
||||||
|
[Header("--- 파티클 화살 시스템 ---")]
|
||||||
|
[SerializeField] private GameObject defaultProjectilePrefab; // 기본 발사체 프리팹
|
||||||
|
|
||||||
|
private GameObject _currentProjectilePrefab;
|
||||||
|
private ArrowElementType _currentElementType = ArrowElementType.None;
|
||||||
|
private float _currentElementDamage = 0f;
|
||||||
|
private float _currentElementDuration = 0f;
|
||||||
|
|
||||||
private float _lastAttackTime;
|
private float _lastAttackTime;
|
||||||
private float _chargeTimer;
|
private float _chargeTimer;
|
||||||
|
|
@ -48,20 +58,24 @@ public class PlayerAttack : MonoBehaviour
|
||||||
private float _pendingDamage;
|
private float _pendingDamage;
|
||||||
private float _pendingSpeed;
|
private float _pendingSpeed;
|
||||||
private float _pendingRange;
|
private float _pendingRange;
|
||||||
|
|
||||||
// 🎯 발사 방향 저장
|
|
||||||
private Vector3 _pendingShootDirection;
|
private Vector3 _pendingShootDirection;
|
||||||
|
|
||||||
public bool IsCharging => _isCharging;
|
public bool IsCharging => _isCharging;
|
||||||
public bool IsAttacking
|
public bool IsAttacking { get => _isAttacking; set => _isAttacking = value; }
|
||||||
{
|
|
||||||
get => _isAttacking;
|
|
||||||
set => _isAttacking = value;
|
|
||||||
}
|
|
||||||
public float ChargeProgress => Mathf.Clamp01(_chargeTimer / maxChargeTime);
|
public float ChargeProgress => Mathf.Clamp01(_chargeTimer / maxChargeTime);
|
||||||
|
|
||||||
|
// [NEW] 외부에서 현재 속성 확인용
|
||||||
|
public ArrowElementType CurrentElement => _currentElementType;
|
||||||
|
public GameObject CurrentProjectilePrefab => _currentProjectilePrefab;
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
if (playerStats == null) playerStats = GetComponentInParent<Stats>();
|
||||||
|
|
||||||
|
// 기본 발사체 프리팹 설정
|
||||||
|
if (_currentProjectilePrefab == null)
|
||||||
|
_currentProjectilePrefab = defaultProjectilePrefab;
|
||||||
|
|
||||||
if (chargeStages == null || chargeStages.Count == 0)
|
if (chargeStages == null || chargeStages.Count == 0)
|
||||||
{
|
{
|
||||||
chargeStages = new List<ChargeStage>
|
chargeStages = new List<ChargeStage>
|
||||||
|
|
@ -75,48 +89,79 @@ public class PlayerAttack : MonoBehaviour
|
||||||
float calculatedMaxTime = 0f;
|
float calculatedMaxTime = 0f;
|
||||||
foreach (var stage in chargeStages)
|
foreach (var stage in chargeStages)
|
||||||
{
|
{
|
||||||
if (stage.chargeTime > calculatedMaxTime)
|
if (stage.chargeTime > calculatedMaxTime) calculatedMaxTime = stage.chargeTime;
|
||||||
calculatedMaxTime = stage.chargeTime;
|
|
||||||
}
|
}
|
||||||
maxChargeTime = Mathf.Max(calculatedMaxTime, 0.1f);
|
maxChargeTime = Mathf.Max(calculatedMaxTime, 0.1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (_isCharging)
|
if (_isCharging) _chargeTimer += Time.deltaTime;
|
||||||
{
|
|
||||||
_chargeTimer += Time.deltaTime;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- [1] 일반 공격 ---
|
// ============================================
|
||||||
|
// [NEW] 화살 장착 (SwapArrow 대체)
|
||||||
|
// ============================================
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ArrowPickup에서 습득 시 호출합니다.
|
||||||
|
/// 파티클 프리팹 + 속성 정보를 저장합니다.
|
||||||
|
/// </summary>
|
||||||
|
public void SetCurrentArrow(ArrowData data)
|
||||||
|
{
|
||||||
|
if (data.projectilePrefab != null)
|
||||||
|
_currentProjectilePrefab = data.projectilePrefab;
|
||||||
|
else
|
||||||
|
_currentProjectilePrefab = defaultProjectilePrefab;
|
||||||
|
|
||||||
|
_currentElementType = data.elementType;
|
||||||
|
_currentElementDamage = data.elementDamage;
|
||||||
|
_currentElementDuration = data.elementDuration;
|
||||||
|
|
||||||
|
Debug.Log($"화살 장착: [{data.arrowName}] 속성={data.elementType}, " +
|
||||||
|
$"속성데미지={data.elementDamage}, 지속시간={data.elementDuration}s");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 기본 화살로 초기화
|
||||||
|
/// </summary>
|
||||||
|
public void ResetArrow()
|
||||||
|
{
|
||||||
|
_currentProjectilePrefab = defaultProjectilePrefab;
|
||||||
|
_currentElementType = ArrowElementType.None;
|
||||||
|
_currentElementDamage = 0f;
|
||||||
|
_currentElementDuration = 0f;
|
||||||
|
Debug.Log("화살 초기화: 기본 화살");
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================
|
||||||
|
// 일반 공격 (좌클릭) — 기존 로직 100% 유지
|
||||||
|
// ============================================
|
||||||
|
|
||||||
public void PerformNormalAttack()
|
public void PerformNormalAttack()
|
||||||
{
|
{
|
||||||
if (Time.time < _lastAttackTime + attackCooldown) return;
|
if (Time.time < _lastAttackTime + attackCooldown || _isAttacking) return;
|
||||||
if (_isAttacking) return;
|
|
||||||
|
|
||||||
_pendingDamage = normalDamage;
|
_pendingDamage = (playerStats != null) ? playerStats.TotalAttackDamage : 10f;
|
||||||
_pendingSpeed = normalSpeed;
|
_pendingSpeed = normalSpeed;
|
||||||
_pendingRange = normalRange;
|
_pendingRange = normalRange;
|
||||||
|
|
||||||
// 🎯 마우스 방향 계산 (일반 공격은 자동 조준 없음)
|
|
||||||
_pendingShootDirection = GetMouseDirection();
|
_pendingShootDirection = GetMouseDirection();
|
||||||
|
|
||||||
_lastAttackTime = Time.time;
|
_lastAttackTime = Time.time;
|
||||||
|
|
||||||
if (pAnim != null) pAnim.TriggerThrow();
|
if (pAnim != null) pAnim.TriggerThrow();
|
||||||
|
|
||||||
StartCoroutine(AttackRoutine());
|
StartCoroutine(AttackRoutine());
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- [2] 차징 시작 ---
|
// ============================================
|
||||||
|
// 차징 공격 (우클릭) — 기존 로직 100% 유지
|
||||||
|
// ============================================
|
||||||
|
|
||||||
public void StartCharging()
|
public void StartCharging()
|
||||||
{
|
{
|
||||||
if (_waitForRelease) return;
|
if (_waitForRelease) return;
|
||||||
|
|
||||||
_isCharging = true;
|
_isCharging = true;
|
||||||
_chargeTimer = 0f;
|
_chargeTimer = 0f;
|
||||||
|
|
||||||
if (pAnim != null) pAnim.SetCharging(true);
|
if (pAnim != null) pAnim.SetCharging(true);
|
||||||
if (CinemachineShake.Instance != null) CinemachineShake.Instance.SetZoom(true);
|
if (CinemachineShake.Instance != null) CinemachineShake.Instance.SetZoom(true);
|
||||||
}
|
}
|
||||||
|
|
@ -125,19 +170,16 @@ public class PlayerAttack : MonoBehaviour
|
||||||
{
|
{
|
||||||
_isCharging = false;
|
_isCharging = false;
|
||||||
_chargeTimer = 0f;
|
_chargeTimer = 0f;
|
||||||
|
|
||||||
if (pAnim != null) pAnim.SetCharging(false);
|
if (pAnim != null) pAnim.SetCharging(false);
|
||||||
if (CinemachineShake.Instance != null) CinemachineShake.Instance.SetZoom(false);
|
if (CinemachineShake.Instance != null) CinemachineShake.Instance.SetZoom(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- [3] 차징 취소 ---
|
|
||||||
public void CancelCharging()
|
public void CancelCharging()
|
||||||
{
|
{
|
||||||
ResetChargingEffects();
|
ResetChargingEffects();
|
||||||
_waitForRelease = false;
|
_waitForRelease = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- [4] 차징 발사 ---
|
|
||||||
public void ReleaseAttack()
|
public void ReleaseAttack()
|
||||||
{
|
{
|
||||||
if (!_isCharging) return;
|
if (!_isCharging) return;
|
||||||
|
|
@ -148,80 +190,61 @@ public class PlayerAttack : MonoBehaviour
|
||||||
if (_chargeTimer >= stage.chargeTime) currentStage = stage;
|
if (_chargeTimer >= stage.chargeTime) currentStage = stage;
|
||||||
}
|
}
|
||||||
|
|
||||||
_pendingDamage = normalDamage * currentStage.damageMult;
|
float baseDmg = (playerStats != null) ? playerStats.TotalAttackDamage : 10f;
|
||||||
|
_pendingDamage = baseDmg * currentStage.damageMult;
|
||||||
_pendingSpeed = normalSpeed * currentStage.rangeMult;
|
_pendingSpeed = normalSpeed * currentStage.rangeMult;
|
||||||
_pendingRange = normalRange * currentStage.rangeMult;
|
_pendingRange = normalRange * currentStage.rangeMult;
|
||||||
|
|
||||||
// 🎯 발사 방향 계산 (차징 최대 시 자동 조준)
|
bool isMaxCharge = _chargeTimer >= maxChargeTime * 0.95f;
|
||||||
bool isMaxCharge = _chargeTimer >= maxChargeTime * 0.95f; // 95% 이상이면 최대 차징
|
|
||||||
_pendingShootDirection = GetShootDirection(isMaxCharge);
|
_pendingShootDirection = GetShootDirection(isMaxCharge);
|
||||||
|
|
||||||
if (pAnim != null) pAnim.TriggerThrow();
|
if (pAnim != null) pAnim.TriggerThrow();
|
||||||
|
|
||||||
_waitForRelease = true;
|
_waitForRelease = true;
|
||||||
_lastAttackTime = Time.time;
|
_lastAttackTime = Time.time;
|
||||||
StartCoroutine(AttackRoutine());
|
StartCoroutine(AttackRoutine());
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- [5] 🎯 마우스 방향 계산 ---
|
// ============================================
|
||||||
|
// 에임 보정 시스템 — 기존 로직 100% 유지
|
||||||
|
// ============================================
|
||||||
|
|
||||||
private Vector3 GetMouseDirection()
|
private Vector3 GetMouseDirection()
|
||||||
{
|
{
|
||||||
// 마우스 위치 → 월드 좌표
|
|
||||||
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||||
Plane groundPlane = new Plane(Vector3.up, transform.position);
|
Plane firePlane = new Plane(Vector3.up, firePoint.position);
|
||||||
|
|
||||||
if (groundPlane.Raycast(ray, out float distance))
|
if (firePlane.Raycast(ray, out float distance))
|
||||||
{
|
{
|
||||||
Vector3 worldMousePos = ray.GetPoint(distance);
|
Vector3 worldMousePos = ray.GetPoint(distance);
|
||||||
Vector3 direction = (worldMousePos - firePoint.position).normalized;
|
Vector3 direction = (worldMousePos - firePoint.position).normalized;
|
||||||
direction.y = 0; // 수평 발사
|
direction.y = 0;
|
||||||
return direction;
|
return direction;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 실패 시 플레이어 정면
|
|
||||||
return transform.forward;
|
return transform.forward;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- [6] 🎯 발사 방향 계산 (에임 어시스트 포함) ---
|
|
||||||
private Vector3 GetShootDirection(bool isMaxCharge)
|
private Vector3 GetShootDirection(bool isMaxCharge)
|
||||||
{
|
{
|
||||||
Vector3 mouseDir = GetMouseDirection();
|
Vector3 mouseDir = GetMouseDirection();
|
||||||
|
if (!enableAutoAim || (onlyMaxCharge && !isMaxCharge)) return mouseDir;
|
||||||
|
|
||||||
// 자동 조준 비활성화 또는 최대 차징 아님
|
|
||||||
if (!enableAutoAim || (onlyMaxCharge && !isMaxCharge))
|
|
||||||
{
|
|
||||||
return mouseDir;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 🎯 적 탐색
|
|
||||||
Transform bestTarget = FindBestTarget(mouseDir);
|
Transform bestTarget = FindBestTarget(mouseDir);
|
||||||
|
|
||||||
if (bestTarget != null)
|
if (bestTarget != null)
|
||||||
{
|
{
|
||||||
// 적 방향 계산 (중심부 조준)
|
|
||||||
Vector3 targetPos = bestTarget.position + Vector3.up * 1.2f;
|
Vector3 targetPos = bestTarget.position + Vector3.up * 1.2f;
|
||||||
Vector3 targetDir = (targetPos - firePoint.position).normalized;
|
Vector3 targetDir = (targetPos - firePoint.position).normalized;
|
||||||
targetDir.y = 0; // 수평 발사
|
targetDir.y = 0;
|
||||||
|
|
||||||
// ✨ 에임 어시스트: 마우스 방향과 적 방향을 섞음!
|
|
||||||
// aimAssistStrength = 0.4 → 마우스 60% + 적 40%
|
|
||||||
Vector3 assistedDir = Vector3.Lerp(mouseDir, targetDir, aimAssistStrength);
|
Vector3 assistedDir = Vector3.Lerp(mouseDir, targetDir, aimAssistStrength);
|
||||||
assistedDir.y = 0;
|
|
||||||
assistedDir.Normalize();
|
assistedDir.Normalize();
|
||||||
|
|
||||||
Debug.Log($"🎯 에임 어시스트 활성화! 타겟: {bestTarget.name}, 보정 강도: {aimAssistStrength * 100}%");
|
|
||||||
return assistedDir;
|
return assistedDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 적 없으면 마우스 방향
|
|
||||||
return mouseDir;
|
return mouseDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- [7] 🎯 최적 타겟 찾기 ---
|
|
||||||
private Transform FindBestTarget(Vector3 mouseDirection)
|
private Transform FindBestTarget(Vector3 mouseDirection)
|
||||||
{
|
{
|
||||||
Collider[] enemies = Physics.OverlapSphere(transform.position, autoAimRange, enemyLayer);
|
Collider[] enemies = Physics.OverlapSphere(transform.position, autoAimRange, enemyLayer);
|
||||||
|
|
||||||
if (enemies.Length == 0) return null;
|
if (enemies.Length == 0) return null;
|
||||||
|
|
||||||
Transform bestTarget = null;
|
Transform bestTarget = null;
|
||||||
|
|
@ -230,15 +253,10 @@ public class PlayerAttack : MonoBehaviour
|
||||||
foreach (var enemy in enemies)
|
foreach (var enemy in enemies)
|
||||||
{
|
{
|
||||||
Vector3 dirToEnemy = (enemy.transform.position - transform.position).normalized;
|
Vector3 dirToEnemy = (enemy.transform.position - transform.position).normalized;
|
||||||
|
|
||||||
// 마우스 방향과의 각도 체크
|
|
||||||
float angle = Vector3.Angle(mouseDirection, dirToEnemy);
|
float angle = Vector3.Angle(mouseDirection, dirToEnemy);
|
||||||
if (angle > autoAimAngle) continue; // 각도 범위 밖
|
if (angle > autoAimAngle) continue;
|
||||||
|
|
||||||
// 거리 체크
|
|
||||||
float distance = Vector3.Distance(transform.position, enemy.transform.position);
|
float distance = Vector3.Distance(transform.position, enemy.transform.position);
|
||||||
|
|
||||||
// 점수 계산: 각도 + 거리 (낮을수록 좋음)
|
|
||||||
float score = angle * 0.5f + distance * 0.5f;
|
float score = angle * 0.5f + distance * 0.5f;
|
||||||
|
|
||||||
if (score < bestScore)
|
if (score < bestScore)
|
||||||
|
|
@ -247,50 +265,62 @@ public class PlayerAttack : MonoBehaviour
|
||||||
bestTarget = enemy.transform;
|
bestTarget = enemy.transform;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return bestTarget;
|
return bestTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- [8] 이벤트: 화살 생성 ---
|
// ============================================
|
||||||
|
// [MODIFIED] 화살 생성 — 파티클 프리팹 발사
|
||||||
|
// ============================================
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 애니메이션 이벤트에서 호출됩니다.
|
||||||
|
/// 파티클 프리팹을 Instantiate하고 PlayerArrow 컴포넌트로 이동/충돌을 처리합니다.
|
||||||
|
/// </summary>
|
||||||
public void OnShootArrow()
|
public void OnShootArrow()
|
||||||
{
|
{
|
||||||
if (arrowPrefab == null || firePoint == null) return;
|
if (_currentProjectilePrefab == null || firePoint == null)
|
||||||
|
|
||||||
// 🎯 저장된 방향으로 회전 계산
|
|
||||||
Quaternion shootRotation = Quaternion.LookRotation(_pendingShootDirection);
|
|
||||||
|
|
||||||
// 화살 생성 (계산된 방향으로)
|
|
||||||
GameObject arrow = Instantiate(arrowPrefab, firePoint.position, shootRotation);
|
|
||||||
|
|
||||||
// ArrowItem 초기화
|
|
||||||
ArrowItem arrowItem = arrow.GetComponent<ArrowItem>();
|
|
||||||
if (arrowItem != null)
|
|
||||||
{
|
{
|
||||||
arrowItem.Initialize(_pendingDamage, _pendingSpeed, _pendingRange);
|
Debug.LogWarning("발사체 프리팹 또는 firePoint가 없습니다!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 하위 호환
|
// 파티클 프리팹을 발사 위치에 생성
|
||||||
PlayerArrow arrowScript = arrow.GetComponent<PlayerArrow>();
|
Quaternion rotation = Quaternion.LookRotation(_pendingShootDirection);
|
||||||
if (arrowScript != null)
|
GameObject projectile = Instantiate(_currentProjectilePrefab, firePoint.position, rotation);
|
||||||
|
|
||||||
|
// PlayerArrow 컴포넌트 확인/추가 후 초기화
|
||||||
|
PlayerArrow arrowScript = projectile.GetComponent<PlayerArrow>();
|
||||||
|
if (arrowScript == null)
|
||||||
{
|
{
|
||||||
arrowScript.Initialize(_pendingDamage, _pendingSpeed, _pendingRange);
|
arrowScript = projectile.AddComponent<PlayerArrow>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 발사 정보 + 속성 정보 전달
|
||||||
|
arrowScript.Initialize(
|
||||||
|
_pendingDamage,
|
||||||
|
_pendingSpeed,
|
||||||
|
_pendingRange,
|
||||||
|
_pendingShootDirection,
|
||||||
|
_currentElementType,
|
||||||
|
_currentElementDamage,
|
||||||
|
_currentElementDuration
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- [9] 이벤트: 공격 끝 ---
|
// ============================================
|
||||||
|
// 유틸리티 — 기존 로직 100% 유지
|
||||||
|
// ============================================
|
||||||
|
|
||||||
public void OnAttackEnd()
|
public void OnAttackEnd()
|
||||||
{
|
{
|
||||||
_isAttacking = false;
|
_isAttacking = false;
|
||||||
ResetChargingEffects();
|
ResetChargingEffects();
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- [10] 안전장치 코루틴 ---
|
|
||||||
private IEnumerator AttackRoutine()
|
private IEnumerator AttackRoutine()
|
||||||
{
|
{
|
||||||
_isAttacking = true;
|
_isAttacking = true;
|
||||||
yield return new WaitForSeconds(0.6f);
|
yield return new WaitForSeconds(0.6f);
|
||||||
|
|
||||||
if (_isAttacking)
|
if (_isAttacking)
|
||||||
{
|
{
|
||||||
_isAttacking = false;
|
_isAttacking = false;
|
||||||
|
|
@ -298,59 +328,47 @@ public class PlayerAttack : MonoBehaviour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- [11] 화살 교체 ---
|
// [DEPRECATED] 하위 호환성을 위해 남겨둠
|
||||||
|
[System.Obsolete("SetCurrentArrow(ArrowData)를 사용하세요.")]
|
||||||
public void SwapArrow(GameObject newArrow)
|
public void SwapArrow(GameObject newArrow)
|
||||||
{
|
{
|
||||||
if (newArrow == null) return;
|
if (newArrow == null) return;
|
||||||
arrowPrefab = newArrow;
|
Debug.LogWarning("SwapArrow()는 더 이상 사용되지 않습니다. SetCurrentArrow()를 사용하세요.");
|
||||||
Debug.Log($"화살이 {newArrow.name}(으)로 교체되었습니다!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StartWeaponCollision() { }
|
public void StartWeaponCollision() { }
|
||||||
public void StopWeaponCollision() { }
|
public void StopWeaponCollision() { }
|
||||||
|
|
||||||
// --- [12] 🎯 디버그: 감지 범위 시각화 ---
|
// ============================================
|
||||||
|
// Gizmo 디버그 — 기존 로직 100% 유지
|
||||||
|
// ============================================
|
||||||
|
|
||||||
private void OnDrawGizmosSelected()
|
private void OnDrawGizmosSelected()
|
||||||
{
|
{
|
||||||
if (!enableAutoAim) return;
|
if (!enableAutoAim) return;
|
||||||
|
|
||||||
// 자동 조준 범위 (노란색 원)
|
|
||||||
Gizmos.color = Color.yellow;
|
Gizmos.color = Color.yellow;
|
||||||
Gizmos.DrawWireSphere(transform.position, autoAimRange);
|
Gizmos.DrawWireSphere(transform.position, autoAimRange);
|
||||||
|
|
||||||
// 마우스 방향 (파란색 선)
|
|
||||||
if (Application.isPlaying && firePoint != null)
|
if (Application.isPlaying && firePoint != null)
|
||||||
{
|
{
|
||||||
Vector3 mouseDir = GetMouseDirection();
|
Vector3 mouseDir = GetMouseDirection();
|
||||||
Gizmos.color = Color.blue;
|
Gizmos.color = Color.blue;
|
||||||
Gizmos.DrawRay(firePoint.position, mouseDir * 5f);
|
Gizmos.DrawRay(firePoint.position, mouseDir * 5f);
|
||||||
|
|
||||||
// 🎯 에임 어시스트 방향 (빨간색 선)
|
|
||||||
Transform target = FindBestTarget(mouseDir);
|
Transform target = FindBestTarget(mouseDir);
|
||||||
if (target != null)
|
if (target != null)
|
||||||
{
|
{
|
||||||
Vector3 targetPos = target.position + Vector3.up * 1.2f;
|
Vector3 targetPos = target.position + Vector3.up * 1.2f;
|
||||||
Vector3 targetDir = (targetPos - firePoint.position).normalized;
|
Vector3 targetDir = (targetPos - firePoint.position).normalized;
|
||||||
targetDir.y = 0;
|
targetDir.y = 0;
|
||||||
|
|
||||||
// 보정된 최종 방향
|
|
||||||
Vector3 assistedDir = Vector3.Lerp(mouseDir, targetDir, aimAssistStrength);
|
Vector3 assistedDir = Vector3.Lerp(mouseDir, targetDir, aimAssistStrength);
|
||||||
assistedDir.Normalize();
|
assistedDir.Normalize();
|
||||||
|
|
||||||
Gizmos.color = Color.red;
|
Gizmos.color = Color.red;
|
||||||
Gizmos.DrawRay(firePoint.position, assistedDir * 7f);
|
Gizmos.DrawRay(firePoint.position, assistedDir * 7f);
|
||||||
|
|
||||||
// 타겟 위치 표시
|
|
||||||
Gizmos.color = Color.green;
|
Gizmos.color = Color.green;
|
||||||
Gizmos.DrawWireSphere(targetPos, 0.3f);
|
Gizmos.DrawWireSphere(targetPos, 0.3f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 감지 각도 (연한 초록색 선)
|
|
||||||
Gizmos.color = new Color(0, 1, 0, 0.3f);
|
|
||||||
Vector3 leftBound = Quaternion.Euler(0, -autoAimAngle, 0) * mouseDir;
|
|
||||||
Vector3 rightBound = Quaternion.Euler(0, autoAimAngle, 0) * mouseDir;
|
|
||||||
Gizmos.DrawRay(firePoint.position, leftBound * autoAimRange);
|
|
||||||
Gizmos.DrawRay(firePoint.position, rightBound * autoAimRange);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
16
Assets/Scripts/Player/Combat/StatusEffectType.cs
Normal file
16
Assets/Scripts/Player/Combat/StatusEffectType.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
// ============================================
|
||||||
|
// 📁 파일명: StatusEffectType.cs
|
||||||
|
// 📂 경로: Assets/Scripts/Data/StatusEffectType.cs
|
||||||
|
// ============================================
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 상태이상 타입 열거형
|
||||||
|
/// PlayerArrow → MonsterClass로 전달됩니다.
|
||||||
|
/// </summary>
|
||||||
|
public enum StatusEffectType
|
||||||
|
{
|
||||||
|
Burn, // 화상 - 일정 시간 동안 틱 데미지
|
||||||
|
Slow, // 슬로우 - 이동속도 감소
|
||||||
|
Poison, // 중독 - 틱 데미지 + 방어력 감소
|
||||||
|
Shock // 감전 - 즉발 범위 데미지 + 짧은 스턴
|
||||||
|
}
|
||||||
11
Assets/Scripts/Player/Combat/StatusEffectType.cs.meta
Normal file
11
Assets/Scripts/Player/Combat/StatusEffectType.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5dd71a2f9aa04c44a9341718cbcb47ad
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -1,212 +1,227 @@
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 바닥에 떨어진 화살 아이템 (발사체로도 사용 가능)
|
/// 바닥에 떨어진 화살 아이템 (아이템 전용 — 발사체 기능 제거됨)
|
||||||
/// 모드 전환: 아이템 모드 ↔ 발사 모드
|
/// 습득 시 PlayerAttack에 파티클 프리팹 + 속성 정보를 전달합니다.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ArrowItem : MonoBehaviour
|
public class ArrowPickup : MonoBehaviour
|
||||||
{
|
{
|
||||||
[Header("--- 화살 정보 ---")]
|
[Header("--- 화살 아이템 정보 ---")]
|
||||||
[SerializeField] private string arrowName = "기본 화살";
|
[SerializeField] private string arrowName = "기본 화살";
|
||||||
[SerializeField] private float damage = 15f;
|
[SerializeField] private ArrowElementType elementType = ArrowElementType.None;
|
||||||
[SerializeField] private float speed = 20f;
|
|
||||||
[SerializeField] private float range = 15f;
|
|
||||||
|
|
||||||
[Header("--- UI 표시 (아이템 모드) ---")]
|
[Header("--- 스탯 ---")]
|
||||||
|
[SerializeField] private float baseDamage = 15f;
|
||||||
|
[SerializeField] private float elementDamage = 5f;
|
||||||
|
[SerializeField] private float elementDuration = 3f;
|
||||||
|
|
||||||
|
[Header("--- 발사체 파티클 ---")]
|
||||||
|
[Tooltip("이 화살이 장착될 때 발사할 파티클 프리팹")]
|
||||||
|
[SerializeField] private GameObject projectilePrefab;
|
||||||
|
|
||||||
|
[Header("--- 비주얼 (필드 아이템) ---")]
|
||||||
|
[SerializeField] private GameObject visualModel;
|
||||||
|
|
||||||
|
[Header("--- UI 표시 ---")]
|
||||||
[SerializeField] private GameObject pickupUI;
|
[SerializeField] private GameObject pickupUI;
|
||||||
[SerializeField] private float uiDisplayRange = 3f;
|
[SerializeField] private float uiDisplayRange = 3f;
|
||||||
|
|
||||||
[Header("--- 비주얼 ---")]
|
[Header("--- Collider 설정 (자동 탐지) ---")]
|
||||||
[SerializeField] private GameObject visualModel; // 화살 모델
|
[Tooltip("아이템 습득용 Sphere Collider (Trigger)")]
|
||||||
|
[SerializeField] private Collider pickupCollider;
|
||||||
|
[Tooltip("바닥 충돌용 Box Collider (물리)")]
|
||||||
|
[SerializeField] private Collider physicsCollider;
|
||||||
|
|
||||||
private Transform playerTransform;
|
private Transform playerTransform;
|
||||||
private Rigidbody rb;
|
private Rigidbody rb;
|
||||||
private Collider col;
|
|
||||||
|
|
||||||
// 모드 구분
|
/// <summary>
|
||||||
private bool isItemMode = true; // true: 아이템 모드, false: 발사 모드
|
/// [NEW] ArrowData 구조체로 정보 패키징
|
||||||
private Vector3 startPos;
|
/// </summary>
|
||||||
private bool isFired = false;
|
public ArrowData GetArrowData()
|
||||||
|
{
|
||||||
|
return new ArrowData
|
||||||
|
{
|
||||||
|
arrowName = this.arrowName,
|
||||||
|
elementType = this.elementType,
|
||||||
|
baseDamage = this.baseDamage,
|
||||||
|
elementDamage = this.elementDamage,
|
||||||
|
elementDuration = this.elementDuration,
|
||||||
|
projectilePrefab = this.projectilePrefab
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
rb = GetComponent<Rigidbody>();
|
rb = GetComponent<Rigidbody>();
|
||||||
col = GetComponent<Collider>();
|
|
||||||
|
if (pickupCollider == null || physicsCollider == null)
|
||||||
|
{
|
||||||
|
AutoDetectColliders();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Collider 자동 탐지 (기존 로직 유지)
|
||||||
|
/// </summary>
|
||||||
|
private void AutoDetectColliders()
|
||||||
|
{
|
||||||
|
Collider[] allColliders = GetComponents<Collider>();
|
||||||
|
|
||||||
|
foreach (Collider col in allColliders)
|
||||||
|
{
|
||||||
|
if (col is SphereCollider && pickupCollider == null)
|
||||||
|
{
|
||||||
|
pickupCollider = col;
|
||||||
|
Debug.Log($"습득용 Collider: {col.GetType().Name}");
|
||||||
|
}
|
||||||
|
else if (col is BoxCollider && physicsCollider == null)
|
||||||
|
{
|
||||||
|
physicsCollider = col;
|
||||||
|
Debug.Log($"물리용 Collider: {col.GetType().Name}");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
if (isItemMode)
|
SetupAsItem();
|
||||||
{
|
|
||||||
SetupAsItem();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
/// <summary>
|
||||||
{
|
/// 아이템 모드 설정 (기존 로직 유지 + 단순화)
|
||||||
if (isItemMode)
|
/// </summary>
|
||||||
{
|
|
||||||
UpdateItemMode();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UpdateProjectileMode();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#region 아이템 모드
|
|
||||||
|
|
||||||
private void SetupAsItem()
|
private void SetupAsItem()
|
||||||
{
|
{
|
||||||
// 플레이어 찾기
|
|
||||||
GameObject player = GameObject.FindGameObjectWithTag("Player");
|
GameObject player = GameObject.FindGameObjectWithTag("Player");
|
||||||
if (player != null)
|
if (player != null)
|
||||||
{
|
{
|
||||||
playerTransform = player.transform;
|
playerTransform = player.transform;
|
||||||
}
|
}
|
||||||
|
|
||||||
// UI 숨기기
|
if (pickupUI != null) pickupUI.SetActive(false);
|
||||||
if (pickupUI != null)
|
|
||||||
|
// Collider 설정
|
||||||
|
if (pickupCollider != null)
|
||||||
{
|
{
|
||||||
pickupUI.SetActive(false);
|
pickupCollider.enabled = true;
|
||||||
|
pickupCollider.isTrigger = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 물리 설정 (바닥에 떨어진 아이템)
|
if (physicsCollider != null)
|
||||||
|
{
|
||||||
|
physicsCollider.enabled = true;
|
||||||
|
physicsCollider.isTrigger = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 물리 설정
|
||||||
if (rb != null)
|
if (rb != null)
|
||||||
{
|
{
|
||||||
rb.useGravity = true;
|
rb.useGravity = true;
|
||||||
rb.isKinematic = false;
|
rb.isKinematic = false;
|
||||||
}
|
rb.collisionDetectionMode = CollisionDetectionMode.ContinuousDynamic;
|
||||||
|
|
||||||
if (col != null)
|
|
||||||
{
|
|
||||||
col.isTrigger = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateItemMode()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (playerTransform == null || pickupUI == null) return;
|
if (playerTransform == null || pickupUI == null) return;
|
||||||
|
|
||||||
// 플레이어와의 거리 체크 (UI 표시용)
|
|
||||||
float distance = Vector3.Distance(transform.position, playerTransform.position);
|
float distance = Vector3.Distance(transform.position, playerTransform.position);
|
||||||
bool isNear = distance <= uiDisplayRange;
|
pickupUI.SetActive(distance <= uiDisplayRange);
|
||||||
|
|
||||||
pickupUI.SetActive(isNear);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// PlayerInteraction에서 호출
|
/// [MODIFIED] PlayerInteraction에서 'E' 키를 눌렀을 때 호출
|
||||||
|
/// 기존: SwapArrow(gameObject) → 변경: SetCurrentArrow(ArrowData)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Pickup(PlayerAttack playerAttack)
|
public void Pickup(PlayerAttack playerAttack)
|
||||||
{
|
{
|
||||||
if (playerAttack == null) return;
|
if (playerAttack == null) return;
|
||||||
|
|
||||||
// 자기 자신을 복제해서 발사용 프리팹으로 제공
|
// ArrowData를 패키징하여 PlayerAttack에 전달
|
||||||
GameObject arrowPrefab = gameObject;
|
ArrowData data = GetArrowData();
|
||||||
playerAttack.SwapArrow(arrowPrefab);
|
playerAttack.SetCurrentArrow(data);
|
||||||
|
|
||||||
Debug.Log($"화살이 [{arrowName}](으)로 교체되었습니다!");
|
Debug.Log($"[{arrowName}] 화살 습득! 속성: {elementType}");
|
||||||
|
|
||||||
// 아이템 제거
|
// 아이템 제거
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 발사 모드
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// PlayerAttack에서 호출 (발사 초기화)
|
/// 몬스터 드롭 시 화살 정보 설정 (기존 함수 유지)
|
||||||
/// </summary>
|
|
||||||
public void Initialize(float dmg, float arrowSpeed, float maxRange)
|
|
||||||
{
|
|
||||||
Debug.Log($"🏹 화살 발사! 방향: {transform.forward}, 속도: {arrowSpeed}");
|
|
||||||
|
|
||||||
// 발사 모드로 전환
|
|
||||||
isItemMode = false;
|
|
||||||
isFired = true;
|
|
||||||
|
|
||||||
// 스탯 설정
|
|
||||||
this.damage = dmg;
|
|
||||||
this.speed = arrowSpeed;
|
|
||||||
this.range = maxRange;
|
|
||||||
this.startPos = transform.position;
|
|
||||||
|
|
||||||
// UI 숨기기
|
|
||||||
if (pickupUI != null)
|
|
||||||
{
|
|
||||||
pickupUI.SetActive(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 물리 설정 (발사체)
|
|
||||||
if (rb != null)
|
|
||||||
{
|
|
||||||
rb.useGravity = false;
|
|
||||||
rb.isKinematic = false;
|
|
||||||
|
|
||||||
// ✅ [중요] transform.forward 방향으로 발사
|
|
||||||
// 화살이 Z축(파란 화살표) 방향을 앞으로 향하고 있어야 함!
|
|
||||||
Vector3 shootDirection = transform.forward;
|
|
||||||
rb.velocity = shootDirection * speed;
|
|
||||||
|
|
||||||
Debug.Log($"📍 발사 방향: {shootDirection}, 속도 벡터: {rb.velocity}");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (col != null)
|
|
||||||
{
|
|
||||||
col.isTrigger = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 5초 후 자동 삭제
|
|
||||||
Destroy(gameObject, 5f);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateProjectileMode()
|
|
||||||
{
|
|
||||||
if (!isFired) return;
|
|
||||||
|
|
||||||
// 최대 사거리 체크
|
|
||||||
if (Vector3.Distance(startPos, transform.position) >= range)
|
|
||||||
{
|
|
||||||
Destroy(gameObject);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnTriggerEnter(Collider other)
|
|
||||||
{
|
|
||||||
// 아이템 모드에서는 충돌 무시
|
|
||||||
if (isItemMode) return;
|
|
||||||
|
|
||||||
// 발사 모드: 적 또는 벽 충돌
|
|
||||||
if (other.CompareTag("Enemy"))
|
|
||||||
{
|
|
||||||
var monster = other.GetComponent<MonsterClass>();
|
|
||||||
if (monster != null)
|
|
||||||
{
|
|
||||||
monster.TakeDamage(damage);
|
|
||||||
}
|
|
||||||
Destroy(gameObject);
|
|
||||||
}
|
|
||||||
else if (other.CompareTag("Wall") || other.CompareTag("Ground"))
|
|
||||||
{
|
|
||||||
Destroy(gameObject);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 외부 설정용
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 몬스터 드롭 시 화살 정보 설정
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SetArrowData(string name, float dmg, float spd, float rng)
|
public void SetArrowData(string name, float dmg, float spd, float rng)
|
||||||
{
|
{
|
||||||
arrowName = name;
|
arrowName = name;
|
||||||
damage = dmg;
|
baseDamage = dmg;
|
||||||
speed = spd;
|
}
|
||||||
range = rng;
|
|
||||||
|
/// <summary>
|
||||||
|
/// [NEW] 속성 정보까지 포함한 전체 세팅 함수
|
||||||
|
/// </summary>
|
||||||
|
public void SetArrowDataFull(
|
||||||
|
string name,
|
||||||
|
ArrowElementType element,
|
||||||
|
float baseDmg,
|
||||||
|
float elemDmg,
|
||||||
|
float elemDur,
|
||||||
|
GameObject particlePrefab)
|
||||||
|
{
|
||||||
|
arrowName = name;
|
||||||
|
elementType = element;
|
||||||
|
baseDamage = baseDmg;
|
||||||
|
elementDamage = elemDmg;
|
||||||
|
elementDuration = elemDur;
|
||||||
|
projectilePrefab = particlePrefab;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 바닥 충돌 시 속도 감쇠 (기존 로직 유지)
|
||||||
|
/// </summary>
|
||||||
|
private void OnCollisionEnter(Collision collision)
|
||||||
|
{
|
||||||
|
if (rb != null && collision.gameObject.CompareTag("Ground"))
|
||||||
|
{
|
||||||
|
rb.velocity *= 0.5f;
|
||||||
|
rb.angularVelocity *= 0.5f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 디버그 시각화
|
||||||
|
|
||||||
|
private void OnDrawGizmosSelected()
|
||||||
|
{
|
||||||
|
if (pickupCollider != null && pickupCollider.enabled)
|
||||||
|
{
|
||||||
|
Gizmos.color = Color.green;
|
||||||
|
if (pickupCollider is SphereCollider sphere)
|
||||||
|
{
|
||||||
|
Gizmos.DrawWireSphere(transform.position + sphere.center, sphere.radius);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (physicsCollider != null && physicsCollider.enabled)
|
||||||
|
{
|
||||||
|
Gizmos.color = Color.blue;
|
||||||
|
if (physicsCollider is BoxCollider box)
|
||||||
|
{
|
||||||
|
Gizmos.matrix = transform.localToWorldMatrix;
|
||||||
|
Gizmos.DrawWireCube(box.center, box.size);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// [NEW] 속성 색상 표시
|
||||||
|
switch (elementType)
|
||||||
|
{
|
||||||
|
case ArrowElementType.Fire: Gizmos.color = Color.red; break;
|
||||||
|
case ArrowElementType.Ice: Gizmos.color = Color.cyan; break;
|
||||||
|
case ArrowElementType.Poison: Gizmos.color = new Color(0.5f, 1f, 0f); break;
|
||||||
|
case ArrowElementType.Lightning: Gizmos.color = Color.yellow; break;
|
||||||
|
default: Gizmos.color = Color.white; break;
|
||||||
|
}
|
||||||
|
Gizmos.DrawWireSphere(transform.position, 0.3f);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
||||||
|
|
@ -16,29 +16,48 @@ public class PlayerInteraction : MonoBehaviour
|
||||||
Collider[] hits = Physics.OverlapSphere(transform.position, interactRange, itemLayer);
|
Collider[] hits = Physics.OverlapSphere(transform.position, interactRange, itemLayer);
|
||||||
foreach (var hit in hits)
|
foreach (var hit in hits)
|
||||||
{
|
{
|
||||||
if (hit.TryGetComponent<ArrowItem>(out var arrowItem))
|
// [MODIFIED] ArrowItem 제거 → ArrowPickup으로 통일
|
||||||
|
if (hit.TryGetComponent<ArrowPickup>(out var arrowPickup))
|
||||||
{
|
{
|
||||||
PickupArrow(arrowItem);
|
PickupArrow(arrowPickup);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hit.TryGetComponent<EquippableItem>(out var item))
|
if (hit.TryGetComponent<EquippableItem>(out var item))
|
||||||
{
|
{
|
||||||
// ✨ [수정] 힘 제한 없이 무조건 습득 가능하도록 변경
|
|
||||||
EquipWeapon(item);
|
EquipWeapon(item);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hit.TryGetComponent<HealthPotion>(out var potion)) { potion.Use(GetComponent<PlayerHealth>()); break; }
|
if (hit.TryGetComponent<HealthPotion>(out var potion))
|
||||||
if (hit.TryGetComponent<HealthAltar>(out var altar)) { altar.Use(GetComponent<PlayerHealth>()); break; }
|
{
|
||||||
|
potion.Use(GetComponent<PlayerHealth>());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hit.TryGetComponent<HealthAltar>(out var altar))
|
||||||
|
{
|
||||||
|
altar.Use(GetComponent<PlayerHealth>());
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PickupArrow(ArrowItem arrowItem)
|
/// <summary>
|
||||||
|
/// [MODIFIED] ArrowPickup을 직접 처리
|
||||||
|
/// 기존: ArrowItem 타입 → 변경: ArrowPickup 타입으로 통일
|
||||||
|
/// </summary>
|
||||||
|
private void PickupArrow(ArrowPickup arrowPickup)
|
||||||
{
|
{
|
||||||
if (arrowItem == null) return;
|
if (arrowPickup == null) return;
|
||||||
|
|
||||||
PlayerAttack playerAttack = GetComponent<PlayerAttack>();
|
PlayerAttack playerAttack = GetComponent<PlayerAttack>();
|
||||||
if (playerAttack != null) arrowItem.Pickup(playerAttack);
|
if (playerAttack != null)
|
||||||
|
{
|
||||||
|
// ArrowPickup.Pickup() 내부에서
|
||||||
|
// playerAttack.SetCurrentArrow(ArrowData)를 호출합니다
|
||||||
|
arrowPickup.Pickup(playerAttack);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EquipWeapon(EquippableItem item)
|
private void EquipWeapon(EquippableItem item)
|
||||||
|
|
@ -50,7 +69,6 @@ public class PlayerInteraction : MonoBehaviour
|
||||||
if (playerStats != null)
|
if (playerStats != null)
|
||||||
{
|
{
|
||||||
playerStats.weaponDamage = item.Config.BaseDamage;
|
playerStats.weaponDamage = item.Config.BaseDamage;
|
||||||
// ✨ [제거] UpdateWeaponWeight 호출 삭제
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FindObjectOfType<PlayerStatsUI>()?.UpdateStatTexts();
|
FindObjectOfType<PlayerStatsUI>()?.UpdateStatTexts();
|
||||||
|
|
@ -62,8 +80,14 @@ public class PlayerInteraction : MonoBehaviour
|
||||||
if (playerStats != null)
|
if (playerStats != null)
|
||||||
{
|
{
|
||||||
playerStats.weaponDamage = 0;
|
playerStats.weaponDamage = 0;
|
||||||
// ✨ [제거] ResetWeight 호출 삭제
|
|
||||||
FindObjectOfType<PlayerStatsUI>()?.UpdateStatTexts();
|
FindObjectOfType<PlayerStatsUI>()?.UpdateStatTexts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// [NEW] 무기 해제 시 화살도 초기화
|
||||||
|
PlayerAttack playerAttack = GetComponent<PlayerAttack>();
|
||||||
|
if (playerAttack != null)
|
||||||
|
{
|
||||||
|
playerAttack.ResetArrow();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3,6 +3,6 @@ public enum StatType
|
||||||
{
|
{
|
||||||
Health,
|
Health,
|
||||||
Speed,
|
Speed,
|
||||||
Strength,
|
// Strength,
|
||||||
Damage
|
Damage
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user