Merge branch 'main' of https://scove-vault.duckdns.org/scove/HALLUCINATION
This commit is contained in:
@@ -31,7 +31,6 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 22430624}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 0, y: 0.5}
|
||||
@@ -101,13 +100,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 117034}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0.2588187, y: 0, z: 0, w: 0.96592593}
|
||||
m_LocalPosition: {x: -0.0133, y: 0.5573, z: -0.0121}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 405752}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &3352832
|
||||
MeshFilter:
|
||||
@@ -134,6 +133,11 @@ MeshRenderer:
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
@@ -156,9 +160,11 @@ MeshRenderer:
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!1 &125278
|
||||
GameObject:
|
||||
@@ -194,7 +200,6 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 22430624}
|
||||
m_Father: {fileID: 405752}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
@@ -218,7 +223,9 @@ Canvas:
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 0
|
||||
m_AdditionalShaderChannelsFlag: 25
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
@@ -310,7 +317,6 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 22430624}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@@ -390,7 +396,6 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 22430624}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 0, y: 0.5}
|
||||
@@ -470,7 +475,6 @@ RectTransform:
|
||||
- {fileID: 22490896}
|
||||
- {fileID: 22451678}
|
||||
m_Father: {fileID: 22475414}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@@ -611,6 +615,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 199660}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0.39214686, y: 0.2389014, z: -20.878284}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
@@ -619,7 +624,6 @@ Transform:
|
||||
- {fileID: 463598}
|
||||
- {fileID: 22475414}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!136 &13694850
|
||||
CapsuleCollider:
|
||||
@@ -629,8 +633,17 @@ CapsuleCollider:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 199660}
|
||||
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: 2
|
||||
m_Radius: 0.35
|
||||
m_Height: 1.08
|
||||
m_Direction: 1
|
||||
@@ -648,7 +661,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
openCloseEvents: 0
|
||||
openCloseWindow: 0
|
||||
openCloseWindow: 1
|
||||
selectedToolbar: 0
|
||||
inputType: 0
|
||||
actionInput:
|
||||
@@ -867,11 +880,15 @@ MonoBehaviour:
|
||||
name:
|
||||
amount: 1
|
||||
attributes:
|
||||
- name: 0
|
||||
value: 1
|
||||
- name: 2
|
||||
value: 36
|
||||
isOpen: 0
|
||||
isBool: 0
|
||||
changeAttributes: 0
|
||||
- name: 6
|
||||
value: 8
|
||||
isOpen: 0
|
||||
isBool: 0
|
||||
changeAttributes: 1
|
||||
autoEquip: 1
|
||||
addToEquipArea: 1
|
||||
indexArea: 0
|
||||
|
||||
@@ -12,12 +12,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Fragment Grenade
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft:
|
||||
- item: {fileID: 0}
|
||||
amount: 3
|
||||
- item: {fileID: 0}
|
||||
amount: 1
|
||||
price: 0
|
||||
id: 26
|
||||
description: Fragment Grenade
|
||||
type: 0
|
||||
@@ -27,8 +21,7 @@ MonoBehaviour:
|
||||
maxStack: 6
|
||||
amount: 0
|
||||
originalObject: {fileID: 170736, guid: c221411e499bdd94f90413254abf7860, type: 3}
|
||||
dropObject: {fileID: 4018256157275831458, guid: a04c9098c7a452447912f6c5069bd095,
|
||||
type: 3}
|
||||
dropObject: {fileID: 4018256157275831458, guid: a04c9098c7a452447912f6c5069bd095, type: 3}
|
||||
attributes: []
|
||||
isInEquipArea: 0
|
||||
isEquiped: 0
|
||||
@@ -58,12 +51,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Molotov
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft:
|
||||
- item: {fileID: 0}
|
||||
amount: 3
|
||||
- item: {fileID: 0}
|
||||
amount: 1
|
||||
price: 0
|
||||
id: 27
|
||||
description: Molotov
|
||||
type: 0
|
||||
@@ -72,10 +59,8 @@ MonoBehaviour:
|
||||
createNewItem: 1
|
||||
maxStack: 6
|
||||
amount: 0
|
||||
originalObject: {fileID: 4687494058105681854, guid: 356e6f81e6f18534ba6b80a6d008642a,
|
||||
type: 3}
|
||||
dropObject: {fileID: 4018256157275831458, guid: c37d3b92b2a9da3468bc2a821919c0ca,
|
||||
type: 3}
|
||||
originalObject: {fileID: 4687494058105681854, guid: 356e6f81e6f18534ba6b80a6d008642a, type: 3}
|
||||
dropObject: {fileID: 4018256157275831458, guid: c37d3b92b2a9da3468bc2a821919c0ca, type: 3}
|
||||
attributes: []
|
||||
isInEquipArea: 0
|
||||
isEquiped: 0
|
||||
@@ -150,8 +135,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Sniper Ammo
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 19
|
||||
description:
|
||||
type: 3
|
||||
@@ -191,8 +174,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: RPG Ammo
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 18
|
||||
description:
|
||||
type: 3
|
||||
@@ -232,8 +213,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Handgun Ammo
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 14
|
||||
description:
|
||||
type: 3
|
||||
@@ -273,8 +252,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: RPG
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 16
|
||||
description: Very destructive
|
||||
type: 2
|
||||
@@ -322,8 +299,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Sniper
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 15
|
||||
description: Attached with a scope
|
||||
type: 2
|
||||
@@ -371,8 +346,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Shotgun Shells
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 17
|
||||
description: Shotgun Ammo
|
||||
type: 3
|
||||
@@ -412,8 +385,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Shotgun
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 12
|
||||
description: Tactical Shotgun
|
||||
type: 2
|
||||
@@ -461,8 +432,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Rifle Ammo
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 13
|
||||
description:
|
||||
type: 3
|
||||
@@ -502,8 +471,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Great Shield
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 9
|
||||
description: 'Great Shield
|
||||
|
||||
@@ -516,10 +483,8 @@ MonoBehaviour:
|
||||
createNewItem: 1
|
||||
maxStack: 1
|
||||
amount: 0
|
||||
originalObject: {fileID: 1000012874595254, guid: d4ca9135af96d5142987a1f1427b099a,
|
||||
type: 3}
|
||||
dropObject: {fileID: 8587624101741613191, guid: e26f928aabf2af048b7def78ec83a486,
|
||||
type: 3}
|
||||
originalObject: {fileID: 1000012874595254, guid: d4ca9135af96d5142987a1f1427b099a, type: 3}
|
||||
dropObject: {fileID: 8587624101741613191, guid: e26f928aabf2af048b7def78ec83a486, type: 3}
|
||||
attributes:
|
||||
- name: 3
|
||||
value: 0
|
||||
@@ -561,8 +526,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Short Katana
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 1
|
||||
description: Melee Weapon
|
||||
type: 1
|
||||
@@ -571,10 +534,8 @@ MonoBehaviour:
|
||||
createNewItem: 1
|
||||
maxStack: 1
|
||||
amount: 0
|
||||
originalObject: {fileID: 1000011247033104, guid: 43ec053b9c111644e80b4ddb5f535508,
|
||||
type: 3}
|
||||
dropObject: {fileID: 3314097323225006234, guid: 0f2c84cd3287333448744ce0451196cd,
|
||||
type: 3}
|
||||
originalObject: {fileID: 1000011247033104, guid: 43ec053b9c111644e80b4ddb5f535508, type: 3}
|
||||
dropObject: {fileID: 3314097323225006234, guid: 0f2c84cd3287333448744ce0451196cd, type: 3}
|
||||
attributes:
|
||||
- name: 2
|
||||
value: 25
|
||||
@@ -620,8 +581,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Great Sword
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 7
|
||||
description: Melee Weapon
|
||||
type: 1
|
||||
@@ -630,10 +589,8 @@ MonoBehaviour:
|
||||
createNewItem: 1
|
||||
maxStack: 1
|
||||
amount: 0
|
||||
originalObject: {fileID: 1000014209087140, guid: d03b45803e637bb4fb00a1ca9030d66e,
|
||||
type: 3}
|
||||
dropObject: {fileID: 4500584118820961459, guid: eca1e51be6676704dbb7f23b4947883b,
|
||||
type: 3}
|
||||
originalObject: {fileID: 1000014209087140, guid: d03b45803e637bb4fb00a1ca9030d66e, type: 3}
|
||||
dropObject: {fileID: 4500584118820961459, guid: eca1e51be6676704dbb7f23b4947883b, type: 3}
|
||||
attributes:
|
||||
- name: 2
|
||||
value: 30
|
||||
@@ -679,8 +636,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Great Katana
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 8
|
||||
description: Melee Weapon
|
||||
type: 1
|
||||
@@ -689,10 +644,8 @@ MonoBehaviour:
|
||||
createNewItem: 1
|
||||
maxStack: 1
|
||||
amount: 0
|
||||
originalObject: {fileID: 1000013423493360, guid: 6bbee781522ce5243a02bf72cd914cf5,
|
||||
type: 3}
|
||||
dropObject: {fileID: 2197774501603174495, guid: 7dcfb29ec0c968041b99dd41d13cec28,
|
||||
type: 3}
|
||||
originalObject: {fileID: 1000013423493360, guid: 6bbee781522ce5243a02bf72cd914cf5, type: 3}
|
||||
dropObject: {fileID: 2197774501603174495, guid: 7dcfb29ec0c968041b99dd41d13cec28, type: 3}
|
||||
attributes:
|
||||
- name: 2
|
||||
value: 25
|
||||
@@ -738,8 +691,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Assault Rifle
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 11
|
||||
description: Attached with a Scope
|
||||
type: 2
|
||||
@@ -795,8 +746,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Small Shield
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 6
|
||||
description: 'Small Shield
|
||||
|
||||
@@ -807,10 +756,8 @@ MonoBehaviour:
|
||||
createNewItem: 1
|
||||
maxStack: 1
|
||||
amount: 0
|
||||
originalObject: {fileID: 1000010116632662, guid: 2232bbcc5a195274c9744c2c6352e910,
|
||||
type: 3}
|
||||
dropObject: {fileID: 862192267840601332, guid: d07ef1bfe3f5bf4469394a9c723bbbc1,
|
||||
type: 3}
|
||||
originalObject: {fileID: 1000010116632662, guid: 2232bbcc5a195274c9744c2c6352e910, type: 3}
|
||||
dropObject: {fileID: 862192267840601332, guid: d07ef1bfe3f5bf4469394a9c723bbbc1, type: 3}
|
||||
attributes:
|
||||
- name: 3
|
||||
value: 0
|
||||
@@ -852,8 +799,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Handgun
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 10
|
||||
description: Semi-Automatic Pistol
|
||||
type: 2
|
||||
@@ -901,12 +846,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Health Up Potion
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft:
|
||||
- item: {fileID: 0}
|
||||
amount: 3
|
||||
- item: {fileID: 0}
|
||||
amount: 1
|
||||
price: 0
|
||||
id: 5
|
||||
description: Increases the MaxHealth
|
||||
type: 0
|
||||
@@ -950,8 +889,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Axe
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 0
|
||||
description: Melee Weapon
|
||||
type: 1
|
||||
@@ -960,10 +897,8 @@ MonoBehaviour:
|
||||
createNewItem: 1
|
||||
maxStack: 1
|
||||
amount: 0
|
||||
originalObject: {fileID: 1000010725870802, guid: 0cf98a7633e41834ba19e8626f1ceadc,
|
||||
type: 3}
|
||||
dropObject: {fileID: 880292917891664030, guid: 4ce32edaf6024884898e95f24f9f763a,
|
||||
type: 3}
|
||||
originalObject: {fileID: 1000010725870802, guid: 0cf98a7633e41834ba19e8626f1ceadc, type: 3}
|
||||
dropObject: {fileID: 880292917891664030, guid: 4ce32edaf6024884898e95f24f9f763a, type: 3}
|
||||
attributes:
|
||||
- name: 3
|
||||
value: 35
|
||||
@@ -1009,12 +944,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Stamina Up Potion
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft:
|
||||
- item: {fileID: 0}
|
||||
amount: 1
|
||||
- item: {fileID: 0}
|
||||
amount: 3
|
||||
price: 0
|
||||
id: 4
|
||||
description: Increases the MaxStamina
|
||||
type: 0
|
||||
@@ -1058,8 +987,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Short Sword
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 3
|
||||
description: Melee Weapon
|
||||
type: 1
|
||||
@@ -1068,10 +995,8 @@ MonoBehaviour:
|
||||
createNewItem: 1
|
||||
maxStack: 1
|
||||
amount: 0
|
||||
originalObject: {fileID: 1000012884940116, guid: 5dc53aa14e78ec54fbf2281c1abb7f47,
|
||||
type: 3}
|
||||
dropObject: {fileID: 819158048279699071, guid: 0f25b0bc9b7934840b324072cedb3325,
|
||||
type: 3}
|
||||
originalObject: {fileID: 1000012884940116, guid: 5dc53aa14e78ec54fbf2281c1abb7f47, type: 3}
|
||||
dropObject: {fileID: 819158048279699071, guid: 0f25b0bc9b7934840b324072cedb3325, type: 3}
|
||||
attributes:
|
||||
- name: 2
|
||||
value: 15
|
||||
@@ -1117,12 +1042,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Health Potion
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft:
|
||||
- item: {fileID: 0}
|
||||
amount: 3
|
||||
- item: {fileID: 0}
|
||||
amount: 1
|
||||
price: 0
|
||||
id: 2
|
||||
description: Recover Health
|
||||
type: 0
|
||||
@@ -1166,8 +1085,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: vRifle Shooter Edition
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 22
|
||||
description: Special Edition attached with Grenade Launcher
|
||||
type: 2
|
||||
@@ -1176,8 +1093,7 @@ MonoBehaviour:
|
||||
createNewItem: 1
|
||||
maxStack: 1
|
||||
amount: 0
|
||||
originalObject: {fileID: 1262530654451378, guid: 33cb40cfd0904344d8306765a5600135,
|
||||
type: 3}
|
||||
originalObject: {fileID: 1262530654451378, guid: 33cb40cfd0904344d8306765a5600135, type: 3}
|
||||
dropObject: {fileID: 1530631430177172, guid: 1e6c72f3eacde6c4fa1f5824e22ce56c, type: 3}
|
||||
attributes:
|
||||
- name: 2
|
||||
@@ -1224,8 +1140,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: KeyCard Red
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 23
|
||||
description: Open Red Doors
|
||||
type: 0
|
||||
@@ -1265,8 +1179,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Dual Swords
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 24
|
||||
description: Melee Weapon
|
||||
type: 1
|
||||
@@ -1275,10 +1187,8 @@ MonoBehaviour:
|
||||
createNewItem: 1
|
||||
maxStack: 1
|
||||
amount: 0
|
||||
originalObject: {fileID: 1000012884940116, guid: f0df66e0950da4642afce9f6382ab231,
|
||||
type: 3}
|
||||
dropObject: {fileID: 5960025752436353048, guid: 25e7bf6c702446e47bbc7ce3a6aaaeb5,
|
||||
type: 3}
|
||||
originalObject: {fileID: 1000012884940116, guid: f0df66e0950da4642afce9f6382ab231, type: 3}
|
||||
dropObject: {fileID: 5960025752436353048, guid: 25e7bf6c702446e47bbc7ce3a6aaaeb5, type: 3}
|
||||
attributes:
|
||||
- name: 2
|
||||
value: 10
|
||||
@@ -1324,8 +1234,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Arrows
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 21
|
||||
description: Arrows to use with Bow
|
||||
type: 3
|
||||
@@ -1365,8 +1273,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: vBow
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 20
|
||||
description: Bow and Arrow
|
||||
type: 4
|
||||
@@ -1375,8 +1281,7 @@ MonoBehaviour:
|
||||
createNewItem: 0
|
||||
maxStack: 1
|
||||
amount: 0
|
||||
originalObject: {fileID: 1112735122421166, guid: adec6ca436555694f9b67251716d6768,
|
||||
type: 3}
|
||||
originalObject: {fileID: 1112735122421166, guid: adec6ca436555694f9b67251716d6768, type: 3}
|
||||
dropObject: {fileID: 1000012655258636, guid: cf28841817afdab4c8060f470a322c37, type: 3}
|
||||
attributes:
|
||||
- name: 6
|
||||
@@ -1411,8 +1316,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Buletproof Vest
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft: []
|
||||
price: 0
|
||||
id: 25
|
||||
description: Buletproof Vest
|
||||
type: 6
|
||||
@@ -1452,12 +1355,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Smoke Grenade
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft:
|
||||
- item: {fileID: 0}
|
||||
amount: 3
|
||||
- item: {fileID: 0}
|
||||
amount: 1
|
||||
price: 0
|
||||
id: 28
|
||||
description: Smoke Grenade
|
||||
type: 0
|
||||
@@ -1466,10 +1363,8 @@ MonoBehaviour:
|
||||
createNewItem: 1
|
||||
maxStack: 6
|
||||
amount: 0
|
||||
originalObject: {fileID: 2275447201054405111, guid: e82c600a04131f842b97ae50bebfd25d,
|
||||
type: 3}
|
||||
dropObject: {fileID: 4018256157275831458, guid: 83a0af047816b1e44b48e9b37982ccba,
|
||||
type: 3}
|
||||
originalObject: {fileID: 2275447201054405111, guid: e82c600a04131f842b97ae50bebfd25d, type: 3}
|
||||
dropObject: {fileID: 4018256157275831458, guid: 83a0af047816b1e44b48e9b37982ccba, type: 3}
|
||||
attributes: []
|
||||
isInEquipArea: 0
|
||||
isEquiped: 0
|
||||
@@ -1499,12 +1394,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1adabc1ae49fd3c44a36cc9152ebb0f9, type: 3}
|
||||
m_Name: Stun Grenade
|
||||
m_EditorClassIdentifier:
|
||||
itemsToCraft:
|
||||
- item: {fileID: 0}
|
||||
amount: 3
|
||||
- item: {fileID: 0}
|
||||
amount: 1
|
||||
price: 0
|
||||
id: 29
|
||||
description: Stun Grenade
|
||||
type: 0
|
||||
@@ -1513,10 +1402,8 @@ MonoBehaviour:
|
||||
createNewItem: 1
|
||||
maxStack: 6
|
||||
amount: 0
|
||||
originalObject: {fileID: 2275447201054405111, guid: df29a1ce804661b4d91e53c7c6e7e384,
|
||||
type: 3}
|
||||
dropObject: {fileID: 4018256157275831458, guid: 092023529ae5aa0488c373ee62d54549,
|
||||
type: 3}
|
||||
originalObject: {fileID: 2275447201054405111, guid: df29a1ce804661b4d91e53c7c6e7e384, type: 3}
|
||||
dropObject: {fileID: 4018256157275831458, guid: 092023529ae5aa0488c373ee62d54549, type: 3}
|
||||
attributes: []
|
||||
isInEquipArea: 0
|
||||
isEquiped: 0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,16 +1,47 @@
|
||||
using Invector;
|
||||
using UnityEngine;
|
||||
|
||||
public class AutoDestroy : MonoBehaviour
|
||||
{
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
public int damageAmount = 30;
|
||||
void Start()
|
||||
{
|
||||
|
||||
Destroy(gameObject,2f);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
// Debug: Log tên và tag của bất cứ thứ gì đạn chạm vào
|
||||
Debug.Log(
|
||||
$"Laser collided with: {other.name} | Tag: {other.tag} | Layer: {LayerMask.LayerToName(other.gameObject.layer)}");
|
||||
|
||||
// Kiểm tra nếu trúng Player
|
||||
if (other.CompareTag("Player") || other.GetComponentInParent<vIHealthController>() != null)
|
||||
{
|
||||
var healthController = other.GetComponentInParent<vIHealthController>();
|
||||
|
||||
if (healthController != null)
|
||||
{
|
||||
Debug.Log(
|
||||
$"<color=red>HIT PLAYER!</color> Found health controller on {healthController.gameObject.name}. Applying {damageAmount} damage.");
|
||||
var damage = new vDamage(damageAmount);
|
||||
damage.sender = transform;
|
||||
damage.hitPosition = transform.position;
|
||||
healthController.TakeDamage(damage);
|
||||
}
|
||||
|
||||
// Luôn phá hủy đạn khi trúng Player
|
||||
Impact();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void Impact()
|
||||
{
|
||||
|
||||
|
||||
// Phá hủy đạn ngay lập tức
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ using Random = UnityEngine.Random;
|
||||
[Serializable]
|
||||
public class DialogueResult { public string text; public float speedMod; public float suspicionMod; }
|
||||
|
||||
// Quy trình ưu tiên: Né đòn --> Bắn hạ (Artifact) --> Đuổi theo (Vector) --> Điều tra --> Nói chuyện --> Đi tuần
|
||||
// Quy trình ưu tiên: Né đòn --> Bắn hạ (Artifact / Sound Aggro) --> Đuổi theo (Vector) --> Điều tra --> Nói chuyện --> Đi tuần
|
||||
[RequireComponent(typeof(NavMeshAgent))]
|
||||
[RequireComponent(typeof(Rigidbody))]
|
||||
public class EnemyAI : MonoBehaviour
|
||||
@@ -26,20 +26,18 @@ public class EnemyAI : MonoBehaviour
|
||||
public float rotateSpeed = 10f;
|
||||
|
||||
[Header("Patrol Settings")]
|
||||
|
||||
public float patrolWaitTime = 2f;
|
||||
private float currentWaitTime = 0f;
|
||||
public float patrolSpeed = 2.5f;
|
||||
|
||||
public float patrolRadius = 12f; // Bán kính của khu vực tuần tra ngẫu nhiên
|
||||
|
||||
|
||||
public float patrolRadius = 12f;
|
||||
private Vector3 startPosition;
|
||||
|
||||
[Header("Combat State")]
|
||||
public bool playerHasArtifact;
|
||||
public bool isAggroedBySound; // <-- MỚI: Trạng thái bị đánh động bởi âm thanh
|
||||
public GameObject laserPrefab;
|
||||
public Transform firePoint;
|
||||
public float minShootDelay = 1.5f; // Delay giữa các LOẠT BẮN
|
||||
public float minShootDelay = 1.5f;
|
||||
public float maxShootDelay = 3.5f;
|
||||
private float nextShootTime;
|
||||
|
||||
@@ -51,17 +49,17 @@ public class EnemyAI : MonoBehaviour
|
||||
private float nextDodgeTime = 0f;
|
||||
|
||||
[Header("Artifact Combat Upgrades (New)")]
|
||||
[Tooltip("Khoảng cách di chuyển trái/phải ngẫu nhiên qua thời gian duy trì")]
|
||||
public float minStrafeDuration = 0.5f;
|
||||
public float maxStrafeDuration = 2.2f;
|
||||
[Tooltip("Độ lệch tâm bắn (Độ). Số càng nhỏ bắn càng chuẩn, số lớn bắn càng lệch")]
|
||||
public float maxSpreadAngle = 6f;
|
||||
[Tooltip("Tốc độ bắn giữa các viên trong cùng 1 loạt đạn")]
|
||||
public float burstInterval = 0.12f;
|
||||
|
||||
public float approachWeight = 0.35f;
|
||||
public float minCombatDistance = 5.0f;
|
||||
|
||||
private float nextStrafeChangeTime;
|
||||
private int strafeDirectionSign = 1; // -1: Trái, 1: Phải, 0: Đứng im bắn
|
||||
private bool isShootingBurst = false; // Khóa chống trùng lặp loạt bắn
|
||||
private int strafeDirectionSign = 1;
|
||||
private bool isShootingBurst = false;
|
||||
|
||||
public bool IsDodging => isDodging;
|
||||
public bool IsShootingBurst => isShootingBurst;
|
||||
@@ -72,7 +70,7 @@ public class EnemyAI : MonoBehaviour
|
||||
public float talkRange = 12f;
|
||||
public float talkCooldown = 60f;
|
||||
private float lastTalkTime;
|
||||
public bool isTalking; // Public để debug
|
||||
public bool isTalking;
|
||||
private EnemyAI talkingPartner;
|
||||
private Hallucinate.UI.ChatBubble chatBubble;
|
||||
|
||||
@@ -93,6 +91,7 @@ public class EnemyAI : MonoBehaviour
|
||||
|
||||
rb.isKinematic = true;
|
||||
rb.freezeRotation = true;
|
||||
startPosition = transform.position;
|
||||
|
||||
if (player == null)
|
||||
{
|
||||
@@ -106,7 +105,10 @@ public class EnemyAI : MonoBehaviour
|
||||
void InitTree()
|
||||
{
|
||||
var dodgeSequence = new Sequence(new List<Node> { new TaskNode(CheckDodgeConditions), new TaskNode(ActionDodge) });
|
||||
var laserSequence = new Sequence(new List<Node> { new TaskNode(CheckHasArtifact), new TaskNode(ActionFocusAndShoot) });
|
||||
|
||||
// Đổi hàm CheckHasArtifact thành CheckCombatConditions để dùng chung cho cả âm thanh
|
||||
var laserSequence = new Sequence(new List<Node> { new TaskNode(CheckCombatConditions), new TaskNode(ActionFocusAndShoot) });
|
||||
|
||||
var chaseSequence = new Sequence(new List<Node> { new TaskNode(CheckCanSeePlayer), new TaskNode(ActionChasePlayer) });
|
||||
var investigateSequence = new Sequence(new List<Node> { new TaskNode(CheckHasInvestigateTarget), new TaskNode(ActionInvestigate) });
|
||||
var talkSequence = new Sequence(new List<Node> { new TaskNode(CheckCanTalkToNPC), new TaskNode(ActionTalk) });
|
||||
@@ -129,9 +131,14 @@ public class EnemyAI : MonoBehaviour
|
||||
|
||||
if (!agent.isOnNavMesh) return;
|
||||
|
||||
// Decay suspicion
|
||||
suspicionLevel = Mathf.Max(0, suspicionLevel - Time.deltaTime * 0.5f);
|
||||
|
||||
// Bình tĩnh lại và tắt chế độ bắn dồn dập khi mức độ nghi ngờ về 0
|
||||
if (suspicionLevel <= 0f)
|
||||
{
|
||||
isAggroedBySound = false;
|
||||
}
|
||||
|
||||
if (!isTalking && !isDodging && agent.isStopped)
|
||||
agent.isStopped = false;
|
||||
|
||||
@@ -142,7 +149,7 @@ public class EnemyAI : MonoBehaviour
|
||||
|
||||
private NodeState CheckDodgeConditions()
|
||||
{
|
||||
if (playerHasArtifact) return NodeState.Failure; // Có cổ vật -> Không Dash né nữa
|
||||
if (playerHasArtifact || isAggroedBySound) return NodeState.Failure;
|
||||
|
||||
if (isDodging) return NodeState.Success;
|
||||
if (fov != null && fov.canSeePlayer && Mouse.current.leftButton.isPressed)
|
||||
@@ -150,10 +157,12 @@ public class EnemyAI : MonoBehaviour
|
||||
return NodeState.Failure;
|
||||
}
|
||||
|
||||
private NodeState CheckHasArtifact()
|
||||
// Node này thay thế cho CheckHasArtifact cũ
|
||||
private NodeState CheckCombatConditions()
|
||||
{
|
||||
if (playerHasArtifact) StopConversation();
|
||||
return playerHasArtifact ? NodeState.Success : NodeState.Failure;
|
||||
bool shouldCombat = playerHasArtifact || isAggroedBySound;
|
||||
if (shouldCombat) StopConversation();
|
||||
return shouldCombat ? NodeState.Success : NodeState.Failure;
|
||||
}
|
||||
|
||||
private NodeState CheckCanSeePlayer()
|
||||
@@ -177,7 +186,7 @@ public class EnemyAI : MonoBehaviour
|
||||
|
||||
private NodeState CheckCanTalkToNPC()
|
||||
{
|
||||
if (playerHasArtifact || (fov != null && fov.canSeePlayer)) return NodeState.Failure;
|
||||
if (playerHasArtifact || isAggroedBySound || (fov != null && fov.canSeePlayer)) return NodeState.Failure;
|
||||
if (Time.time < lastTalkTime + talkCooldown) return NodeState.Failure;
|
||||
if (isTalking) return NodeState.Success;
|
||||
|
||||
@@ -217,6 +226,13 @@ public class EnemyAI : MonoBehaviour
|
||||
{
|
||||
suspicionLevel += volume * 15f;
|
||||
if (fov != null) fov.lastKnownPlayerPosition = location;
|
||||
|
||||
// CẬP NHẬT: Nếu AI nghe thấy tiếng động làm mức nghi ngờ vượt mốc điều tra, chuyển sang trạng thái chiến đấu (bắn bồi)
|
||||
if (suspicionLevel >= investigationThreshold)
|
||||
{
|
||||
isAggroedBySound = true;
|
||||
}
|
||||
|
||||
if (suspicionLevel >= alertNeighborsThreshold) AlertNeighbors();
|
||||
StopConversation();
|
||||
Debug.Log($"<color=orange>[AI {npcName}]</color> Heard noise! Suspicion: {suspicionLevel}");
|
||||
@@ -280,31 +296,25 @@ public class EnemyAI : MonoBehaviour
|
||||
|
||||
private NodeState ActionPatrol()
|
||||
{
|
||||
Debug.Log("Wandering randomly...");
|
||||
agent.isStopped = false;
|
||||
agent.speed = patrolSpeed;
|
||||
|
||||
// Kiểm tra xem NPC đã đi đến điểm ngẫu nhiên hiện tại chưa
|
||||
if (!agent.pathPending && agent.remainingDistance <= agent.stoppingDistance)
|
||||
{
|
||||
currentWaitTime += Time.deltaTime;
|
||||
|
||||
// Đứng đợi hết thời gian quy định rồi mới tìm đường mới
|
||||
if (currentWaitTime >= patrolWaitTime)
|
||||
{
|
||||
// 1. Lấy một điểm ngẫu nhiên trong không gian hình cầu dựa trên bán kính
|
||||
Vector3 randomDirection = Random.insideUnitSphere * patrolRadius;
|
||||
randomDirection += startPosition; // Cộng với tâm ban đầu để giới hạn khu vực
|
||||
randomDirection += startPosition;
|
||||
|
||||
NavMeshHit hit;
|
||||
// 2. Ép tọa độ ngẫu nhiên đó phải nằm TRÊN bề mặt xanh của NavMesh (tránh kẹt tường)
|
||||
// Số 1 ở cuối là Area Mask (thường là Walkable)
|
||||
if (NavMesh.SamplePosition(randomDirection, out hit, patrolRadius, 1))
|
||||
{
|
||||
agent.SetDestination(hit.position);
|
||||
}
|
||||
|
||||
currentWaitTime = 0f; // Reset thời gian chờ
|
||||
currentWaitTime = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,8 +355,25 @@ public class EnemyAI : MonoBehaviour
|
||||
if (agent.hasPath) agent.ResetPath();
|
||||
agent.isStopped = false;
|
||||
|
||||
// 1. XOAY THÂN THEO TRỤC NGANG HƯỚNG VỀ PLAYER
|
||||
Vector3 bodyDir = player.position - transform.position;
|
||||
// CẢI TIẾN: Xác định mục tiêu linh hoạt để tránh Wallhack.
|
||||
Vector3 targetPos = player.position; // Mặc định khóa chặt người chơi
|
||||
|
||||
// Nếu không cầm Artifact và cũng chưa bị nhìn thấy, AI chỉ nhắm vào MỐC ÂM THANH
|
||||
if (!playerHasArtifact && fov != null && !fov.canSeePlayer && fov.lastKnownPlayerPosition != Vector3.zero)
|
||||
{
|
||||
targetPos = fov.lastKnownPlayerPosition;
|
||||
|
||||
// Nếu AI tiến hành áp sát và xả đạn vào nơi phát ra tiếng mà không thấy ai, ngưng bắn
|
||||
if (Vector3.Distance(transform.position, targetPos) < 2f)
|
||||
{
|
||||
isAggroedBySound = false;
|
||||
suspicionLevel *= 0.5f;
|
||||
return NodeState.Success;
|
||||
}
|
||||
}
|
||||
|
||||
// 1. XOAY THÂN THEO TRỤC NGANG HƯỚNG VỀ MỤC TIÊU (Người chơi hoặc Tiếng động)
|
||||
Vector3 bodyDir = targetPos - transform.position;
|
||||
bodyDir.y = 0f;
|
||||
Vector3 bodyDirNormal = bodyDir.normalized;
|
||||
if (bodyDir != Vector3.zero)
|
||||
@@ -355,27 +382,39 @@ public class EnemyAI : MonoBehaviour
|
||||
transform.rotation = Quaternion.Slerp(transform.rotation, targetRotation, rotateSpeed * Time.deltaTime);
|
||||
}
|
||||
|
||||
// 2. RANDOM KHOẢNG CÁCH DI CHUYỂN TRÁI/PHẢI (Tính theo thời gian duy trì)
|
||||
// 2. RANDOM THỜI GIAN/KHOẢNG CÁCH DUY TRÌ HƯỚNG DI CHUYỂN
|
||||
if (Time.time >= nextStrafeChangeTime)
|
||||
{
|
||||
int[] choices = { -1, 1, 0 }; // Trái, Phải, Đứng yên bắn
|
||||
strafeDirectionSign = choices[Random.Range(0, choices.Length)];
|
||||
|
||||
// Ép khoảng cách di chuyển dài ngắn ngẫu nhiên bằng cách random thời gian đổi hướng
|
||||
nextStrafeChangeTime = Time.time + Random.Range(minStrafeDuration, maxStrafeDuration);
|
||||
}
|
||||
|
||||
// 3. TÍNH TOÁN TRỘN VECTOR: CHỈ TIẾN LÊN KHI ĐANG ĐI NGANG TRÁI/PHẢI
|
||||
Vector3 finalMovementVector = Vector3.zero;
|
||||
|
||||
if (strafeDirectionSign != 0 && bodyDir != Vector3.zero)
|
||||
{
|
||||
Vector3 strafeDir = new Vector3(-bodyDirNormal.z, 0, bodyDirNormal.x) * strafeDirectionSign;
|
||||
agent.speed = moveSpeed * 0.75f;
|
||||
agent.Move(strafeDir * agent.speed * Time.deltaTime);
|
||||
finalMovementVector = new Vector3(-bodyDirNormal.z, 0, bodyDirNormal.x) * strafeDirectionSign;
|
||||
|
||||
float currentDistance = Vector3.Distance(transform.position, targetPos);
|
||||
if (currentDistance > minCombatDistance)
|
||||
{
|
||||
finalMovementVector += bodyDirNormal * approachWeight;
|
||||
}
|
||||
}
|
||||
|
||||
// 3. XOAY HỌNG SÚNG TRỤC DỌC NHẮM VÀO NGƯỜI PLAYER
|
||||
if (finalMovementVector != Vector3.zero)
|
||||
{
|
||||
finalMovementVector.Normalize();
|
||||
agent.speed = moveSpeed * 0.75f;
|
||||
agent.Move(finalMovementVector * agent.speed * Time.deltaTime);
|
||||
}
|
||||
|
||||
// 4. XOAY HỌNG SÚNG TRỤC DỌC NHẮM VÀO MỤC TIÊU
|
||||
if (firePoint != null)
|
||||
{
|
||||
Vector3 targetCenter = player.position + Vector3.up * 1f;
|
||||
Vector3 targetCenter = targetPos + Vector3.up * 1f;
|
||||
Vector3 aimDir = targetCenter - firePoint.position;
|
||||
if (aimDir != Vector3.zero)
|
||||
{
|
||||
@@ -383,20 +422,17 @@ public class EnemyAI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// 4. RANDOM SỐ ĐẠN (1-3) & RANDOM DELAY GIỮA CÁC ĐỢT BẮN
|
||||
// 5. RANDOM SỐ ĐẠN & DELAY GIỮA CÁC ĐỢT BẮN
|
||||
if (Time.time >= nextShootTime && !isShootingBurst)
|
||||
{
|
||||
int randomBulletCount = Random.Range(1, 4); // Trả về ngẫu nhiên 1, 2, hoặc 3 viên
|
||||
int randomBulletCount = Random.Range(1, 4);
|
||||
StartCoroutine(ShootBurstRoutine(randomBulletCount));
|
||||
|
||||
// Cập nhật thời gian chờ cho loạt đạn tiếp theo (Random delay)
|
||||
nextShootTime = Time.time + Random.Range(minShootDelay, maxShootDelay);
|
||||
}
|
||||
|
||||
return NodeState.Running;
|
||||
}
|
||||
|
||||
// Coroutine xử lý bắn loạt đạn kết hợp RANDOM ĐỘ LỆCH (Spread)
|
||||
private IEnumerator ShootBurstRoutine(int bulletCount)
|
||||
{
|
||||
isShootingBurst = true;
|
||||
@@ -405,19 +441,15 @@ public class EnemyAI : MonoBehaviour
|
||||
{
|
||||
if (laserPrefab == null || firePoint == null) break;
|
||||
|
||||
// Tính toán độ lệch ngẫu nhiên (Xoay quanh trục X và Y của họng súng để tạo độ "lệch tâm thông minh")
|
||||
float randomX = Random.Range(-maxSpreadAngle, maxSpreadAngle);
|
||||
float randomY = Random.Range(-maxSpreadAngle, maxSpreadAngle);
|
||||
Quaternion spreadRotation = Quaternion.Euler(randomX, randomY, 0f);
|
||||
|
||||
// Nhân góc xoay gốc của họng súng với góc lệch ngẫu nhiên
|
||||
Quaternion finalBulletRotation = firePoint.rotation * spreadRotation;
|
||||
|
||||
// Sinh đạn
|
||||
Instantiate(laserPrefab, firePoint.position, finalBulletRotation);
|
||||
Debug.Log($"<color=cyan>[AI Burst]</color> Viên thứ {i + 1}/{bulletCount} | Độ lệch X:{randomX:F1}, Y:{randomY:F1}");
|
||||
|
||||
// Nếu còn đạn trong loạt, đợi một khoảng ngắn (burstInterval) rồi mới bắn tiếp viên sau
|
||||
if (i < bulletCount - 1)
|
||||
{
|
||||
yield return new WaitForSeconds(burstInterval);
|
||||
@@ -427,7 +459,7 @@ public class EnemyAI : MonoBehaviour
|
||||
isShootingBurst = false;
|
||||
}
|
||||
|
||||
private void ShootLaser() { } // Hàm cũ không dùng nữa, đã có Burst lo
|
||||
private void ShootLaser() { }
|
||||
|
||||
private NodeState ActionDodge()
|
||||
{
|
||||
|
||||
@@ -28,29 +28,27 @@ public class LaserProjectile : MonoBehaviour
|
||||
// Debug: Log tên và tag của bất cứ thứ gì đạn chạm vào
|
||||
Debug.Log($"Laser collided with: {other.name} | Tag: {other.tag} | Layer: {LayerMask.LayerToName(other.gameObject.layer)}");
|
||||
|
||||
// Kiểm tra nếu trúng Player
|
||||
if (other.CompareTag("Player") || other.GetComponentInParent<vIHealthController>() != null)
|
||||
// 1. Kiểm tra nếu trúng Player hoặc đối tượng có Health
|
||||
var healthController = other.GetComponentInParent<vIHealthController>();
|
||||
if (other.CompareTag("Player") || healthController != null)
|
||||
{
|
||||
var healthController = other.GetComponentInParent<vIHealthController>();
|
||||
|
||||
if (healthController != null)
|
||||
{
|
||||
Debug.Log($"<color=red>HIT PLAYER!</color> Found health controller on {healthController.gameObject.name}. Applying {damageAmount} damage.");
|
||||
Debug.Log($"<color=red>HIT PLAYER!</color> Applying {damageAmount} damage.");
|
||||
var damage = new vDamage(damageAmount);
|
||||
damage.sender = transform;
|
||||
damage.hitPosition = transform.position;
|
||||
healthController.TakeDamage(damage);
|
||||
}
|
||||
|
||||
// Luôn phá hủy đạn khi trúng Player
|
||||
Impact();
|
||||
return;
|
||||
}
|
||||
|
||||
// Phá hủy đạn nếu trúng tường, sàn nhà (mọi thứ không phải trigger khác)
|
||||
// 2. Phá hủy đạn nếu trúng Ground, Tường, hoặc bất kỳ vật thể đặc nào (không phải Trigger)
|
||||
if (!other.isTrigger)
|
||||
{
|
||||
Debug.Log("Laser hit an obstacle (Wall/Floor).");
|
||||
Debug.Log($"Laser hit solid object: {other.name} (Ground/Obstacle). Destroying.");
|
||||
Impact();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,19 +13,24 @@ Material:
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _COLOROVERLAY_ON
|
||||
- _DISTORTION_ON
|
||||
- _FADING_ON
|
||||
- _FLIPBOOKBLENDING_ON
|
||||
- _SOFTPARTICLES_ON
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
m_InvalidKeywords:
|
||||
- EFFECT_BUMP
|
||||
- _ALPHABLEND_ON
|
||||
- _FLIPBOOKBLENDING_OFF
|
||||
- _REQUIRE_UV2
|
||||
m_LightmapFlags: 0
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses: []
|
||||
RenderType: Transparent
|
||||
disabledShaderPasses:
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
@@ -88,8 +93,8 @@ Material:
|
||||
- _DistortionEnabled: 1
|
||||
- _DistortionStrength: 1
|
||||
- _DistortionStrengthScaled: 0.1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _DstBlend: 10
|
||||
- _DstBlendAlpha: 10
|
||||
- _EmissionEnabled: 1
|
||||
- _FlipbookBlending: 1
|
||||
- _FlipbookMode: 1
|
||||
@@ -108,11 +113,11 @@ Material:
|
||||
- _SoftParticlesFarFadeDistance: 1
|
||||
- _SoftParticlesNearFadeDistance: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlend: 5
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _BaseColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0}
|
||||
@@ -121,7 +126,7 @@ Material:
|
||||
- _ColorAddSubDiff: {r: 1, g: 0, b: 0, a: 0}
|
||||
- _EmisColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0.31132078, g: 0.31132078, b: 0.31132078, a: 1}
|
||||
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SoftParticleFadeParams: {r: 0, g: 1, b: 0, a: 0}
|
||||
- _TintColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
|
||||
Reference in New Issue
Block a user