Merge branch 'main' of https://scove-vault.duckdns.org/scove/HALLUCINATION
This commit is contained in:
BIN
.gemini-workspace-history/session-2026-06-06-00-13.json.gz
Normal file
BIN
.gemini-workspace-history/session-2026-06-06-00-13.json.gz
Normal file
Binary file not shown.
8
Assets/Audio/Background.meta
Normal file
8
Assets/Audio/Background.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ebed31fbd0a3be4499c2fe54022858b7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Audio/Background/LurkingSloth-320bit(chosic.com).mp3
Normal file
BIN
Assets/Audio/Background/LurkingSloth-320bit(chosic.com).mp3
Normal file
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5a569249b0485d347a698461b0334585
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -14,6 +14,7 @@ GameObject:
|
||||
- component: {fileID: 6087599376744356948}
|
||||
- component: {fileID: 3563399533700019190}
|
||||
- component: {fileID: 681314853465352057}
|
||||
- component: {fileID: 4042483058127329834}
|
||||
m_Layer: 0
|
||||
m_Name: KamikazeAI
|
||||
m_TagString: Untagged
|
||||
@@ -155,3 +156,41 @@ MonoBehaviour:
|
||||
patrolRadius: 12
|
||||
patrolWaitTime: 2
|
||||
explosionEffectPrefab: {fileID: 8568474719719117872, guid: 39bf32dcd9299df4ca44fd10a817eda4, type: 3}
|
||||
--- !u!114 &4042483058127329834
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6425756872251228809}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f56a83ea88140fa4f869bb2f7ffdb184, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Invector.vHealthController
|
||||
openCloseEvents: 0
|
||||
openCloseWindow: 1
|
||||
selectedToolbar: 0
|
||||
_isDead: 1
|
||||
_currentHealth: 0
|
||||
isImmortal: 0
|
||||
fillHealthOnStart: 1
|
||||
_maxHealth: 100
|
||||
_healthRecovery: 0
|
||||
_healthRecoveryDelay: 0
|
||||
checkHealthEvents: []
|
||||
_onStartReceiveDamage:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
_onReceiveDamage:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
_onDead:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
onChangeHealth:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
onResetHealth:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -25,12 +25,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 105388}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0.049999997, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 422732}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &3302298
|
||||
MeshFilter:
|
||||
@@ -51,10 +52,17 @@ MeshRenderer:
|
||||
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_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
@@ -76,9 +84,12 @@ 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 &115092
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -105,16 +116,17 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 115092}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0.59600043, y: 0.23841888, z: -5.476}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 422732}
|
||||
- {fileID: 480898}
|
||||
- {fileID: 488976}
|
||||
- {fileID: 22488062}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!136 &13688376
|
||||
CapsuleCollider:
|
||||
@@ -124,8 +136,17 @@ CapsuleCollider:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 115092}
|
||||
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
|
||||
@@ -143,12 +164,13 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
openCloseEvents: 0
|
||||
openCloseWindow: 0
|
||||
selectedToolbar: 0
|
||||
openCloseWindow: 1
|
||||
selectedToolbar: 4
|
||||
inputType: 0
|
||||
actionInput:
|
||||
useInput: 1
|
||||
isAxisInUse: 0
|
||||
isUnityInput: 0
|
||||
keyboard: E
|
||||
keyboardAxis: 0
|
||||
joystick: A
|
||||
@@ -165,6 +187,7 @@ MonoBehaviour:
|
||||
inputDelay: 0.1
|
||||
playAnimationWhileHoldingButton: 1
|
||||
doubleButtomTime: 0.25
|
||||
canDoAction: 1
|
||||
actionName: Action
|
||||
actionTag: Action
|
||||
disableOnStart: 0
|
||||
@@ -177,11 +200,12 @@ MonoBehaviour:
|
||||
destroyDelay: 0
|
||||
customCameraState: Default
|
||||
playAnimation:
|
||||
crossFadeTransition: 0.25
|
||||
animatorLayer: 0
|
||||
endActionManualy: 0
|
||||
endExitTimeAnimation: 0.8
|
||||
animatorActionState: 0
|
||||
resetAnimatorActionState: 1
|
||||
useAnimatorMatchTarget: 1
|
||||
matchTarget: {fileID: 0}
|
||||
avatarTarget: 0
|
||||
useLocalX: 0
|
||||
@@ -285,10 +309,6 @@ MonoBehaviour:
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
matchPos: {x: 0, y: 0, z: 0}
|
||||
matchRot: 0
|
||||
startMatchTarget: 0
|
||||
endMatchTarget: 0
|
||||
onPressActionDelay: 0
|
||||
OnPressActionInput:
|
||||
m_PersistentCalls:
|
||||
@@ -315,6 +335,7 @@ MonoBehaviour:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 128644}
|
||||
m_TargetAssemblyTypeName:
|
||||
m_MethodName: SetActive
|
||||
m_Mode: 6
|
||||
m_Arguments:
|
||||
@@ -332,6 +353,7 @@ MonoBehaviour:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 128644}
|
||||
m_TargetAssemblyTypeName:
|
||||
m_MethodName: SetActive
|
||||
m_Mode: 6
|
||||
m_Arguments:
|
||||
@@ -348,6 +370,9 @@ MonoBehaviour:
|
||||
OnInvalidate:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
OnCancelAction:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
itemListData: {fileID: 11400000, guid: 1493f9d9326e8014494b8cb04de38f25, type: 2}
|
||||
onCollectDelay: 0
|
||||
textDelay: 0.25
|
||||
@@ -400,12 +425,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 121230}
|
||||
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: 422732}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &3398494
|
||||
MeshFilter:
|
||||
@@ -426,10 +452,17 @@ MeshRenderer:
|
||||
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_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
@@ -451,9 +484,12 @@ 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 &127422
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -479,12 +515,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 127422}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0.049999997, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 488976}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &3382610
|
||||
MeshFilter:
|
||||
@@ -505,10 +542,17 @@ MeshRenderer:
|
||||
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_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
@@ -530,9 +574,12 @@ 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 &128644
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -563,10 +610,10 @@ RectTransform:
|
||||
m_LocalRotation: {x: 0, y: -1.4210853e-14, z: -0.0000003258414, w: -1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.000713446, y: 0.00071344554, z: 0.00071344554}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 22482840}
|
||||
m_Father: {fileID: 479482}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
@@ -590,7 +637,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
|
||||
@@ -616,6 +665,7 @@ MonoBehaviour:
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!114 &11473088
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -673,14 +723,15 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 128768}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: -0.707106, z: 0, w: 0.7071076}
|
||||
m_LocalPosition: {x: -0.009500027, y: 0.51312, z: 0.013957024}
|
||||
m_LocalScale: {x: 2.086288, y: 2.44284, z: 2.0862887}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 492078}
|
||||
- {fileID: 474350}
|
||||
m_Father: {fileID: 479482}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &131120
|
||||
GameObject:
|
||||
@@ -705,14 +756,15 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 131120}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: -0.707106, z: 0, w: 0.7071076}
|
||||
m_LocalPosition: {x: -0.00950098, y: 0.51312, z: -0.15503883}
|
||||
m_LocalScale: {x: 2.086288, y: 2.44284, z: 2.0862887}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 448248}
|
||||
- {fileID: 450808}
|
||||
m_Father: {fileID: 479482}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &139748
|
||||
GameObject:
|
||||
@@ -739,12 +791,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 139748}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0.049999997, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 480898}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &3373558
|
||||
MeshFilter:
|
||||
@@ -765,10 +818,17 @@ MeshRenderer:
|
||||
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_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
@@ -790,9 +850,12 @@ 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 &152304
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -818,12 +881,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 152304}
|
||||
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: 488976}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &3344262
|
||||
MeshFilter:
|
||||
@@ -844,10 +908,17 @@ MeshRenderer:
|
||||
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_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
@@ -869,9 +940,12 @@ 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 &154240
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -900,9 +974,9 @@ RectTransform:
|
||||
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: 22482840}
|
||||
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}
|
||||
@@ -932,6 +1006,7 @@ MonoBehaviour:
|
||||
m_Material: {fileID: 2100000, guid: a33be1e1efa8ca14286b77d062313a4e, type: 2}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
@@ -971,12 +1046,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 164052}
|
||||
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: 480898}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &3359494
|
||||
MeshFilter:
|
||||
@@ -997,10 +1073,17 @@ MeshRenderer:
|
||||
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_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
@@ -1022,9 +1105,12 @@ 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 &164286
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1053,9 +1139,9 @@ RectTransform:
|
||||
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: 22482840}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@@ -1085,6 +1171,7 @@ MonoBehaviour:
|
||||
m_Material: {fileID: 2100000, guid: a33be1e1efa8ca14286b77d062313a4e, type: 2}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
@@ -1132,12 +1219,12 @@ RectTransform:
|
||||
m_LocalRotation: {x: -0.000000003090828, y: -1, z: -0.000000028749422, w: 0.00000044703478}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -0.0020311438}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 22489296}
|
||||
- {fileID: 22497104}
|
||||
- {fileID: 22432168}
|
||||
m_Father: {fileID: 22488062}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@@ -1167,6 +1254,7 @@ MonoBehaviour:
|
||||
m_Material: {fileID: 2100000, guid: a33be1e1efa8ca14286b77d062313a4e, type: 2}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 0.627451}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
@@ -1197,6 +1285,7 @@ MonoBehaviour:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 154240}
|
||||
m_TargetAssemblyTypeName:
|
||||
m_MethodName: SetActive
|
||||
m_Mode: 6
|
||||
m_Arguments:
|
||||
@@ -1208,6 +1297,7 @@ MonoBehaviour:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
- m_Target: {fileID: 196296}
|
||||
m_TargetAssemblyTypeName:
|
||||
m_MethodName: SetActive
|
||||
m_Mode: 6
|
||||
m_Arguments:
|
||||
@@ -1225,6 +1315,7 @@ MonoBehaviour:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 154240}
|
||||
m_TargetAssemblyTypeName:
|
||||
m_MethodName: SetActive
|
||||
m_Mode: 6
|
||||
m_Arguments:
|
||||
@@ -1236,6 +1327,7 @@ MonoBehaviour:
|
||||
m_BoolArgument: 1
|
||||
m_CallState: 2
|
||||
- m_Target: {fileID: 196296}
|
||||
m_TargetAssemblyTypeName:
|
||||
m_MethodName: SetActive
|
||||
m_Mode: 6
|
||||
m_Arguments:
|
||||
@@ -1269,14 +1361,15 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 187208}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: -0.707106, z: 0, w: 0.7071076}
|
||||
m_LocalPosition: {x: -0.009499073, y: 0.51312, z: 0.18504047}
|
||||
m_LocalScale: {x: 2.086288, y: 2.44284, z: 2.0862887}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 451406}
|
||||
- {fileID: 438440}
|
||||
m_Father: {fileID: 479482}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &196296
|
||||
GameObject:
|
||||
@@ -1306,9 +1399,9 @@ RectTransform:
|
||||
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: 22482840}
|
||||
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}
|
||||
@@ -1338,6 +1431,7 @@ MonoBehaviour:
|
||||
m_Material: {fileID: 2100000, guid: a33be1e1efa8ca14286b77d062313a4e, type: 2}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -246,8 +246,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 4e4f602386d4d484ea7a2a3b0c19ac21, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::LaserProjectile
|
||||
speed: 100
|
||||
lifeTime: 5
|
||||
speed: 70
|
||||
lifeTime: 2
|
||||
damageAmount: 10
|
||||
hitSound: Laser_Hit
|
||||
--- !u!54 &-8021594009672363794
|
||||
|
||||
@@ -34618,16 +34618,16 @@ RectTransform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 44324355}
|
||||
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_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0.00003390842}
|
||||
m_LocalScale: {x: 0.5555556, y: 0.5555556, z: 0.5555556}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 292895766}
|
||||
m_Father: {fileID: 647991888}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -849, y: 424}
|
||||
m_AnchoredPosition: {x: -471.6667, y: 235.55554}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &44324357
|
||||
@@ -41423,7 +41423,7 @@ PrefabInstance:
|
||||
- target: {fileID: -8789529727683405701, guid: b96d0fcc541b0b947907dd08b9f5beab, type: 3}
|
||||
propertyPath: notificationText
|
||||
value:
|
||||
objectReference: {fileID: 1007024362}
|
||||
objectReference: {fileID: 1677677840}
|
||||
- target: {fileID: 600579176653881994, guid: b96d0fcc541b0b947907dd08b9f5beab, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 3
|
||||
@@ -41893,9 +41893,6 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 62859056}
|
||||
- {fileID: 44324356}
|
||||
- {fileID: 1472519200}
|
||||
- {fileID: 2080548117}
|
||||
m_Father: {fileID: 963322862}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
@@ -91007,7 +91004,7 @@ PrefabInstance:
|
||||
- target: {fileID: -8789529727683405701, guid: b96d0fcc541b0b947907dd08b9f5beab, type: 3}
|
||||
propertyPath: notificationText
|
||||
value:
|
||||
objectReference: {fileID: 1007024362}
|
||||
objectReference: {fileID: 1677677840}
|
||||
- target: {fileID: 600579176653881994, guid: b96d0fcc541b0b947907dd08b9f5beab, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 3
|
||||
@@ -93258,12 +93255,26 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedGameObjects:
|
||||
- targetCorrespondingSourceObject: {fileID: 556765321, guid: 092f8aa667b2004459042a82a4c9e41d, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 44324356}
|
||||
- targetCorrespondingSourceObject: {fileID: 556765321, guid: 092f8aa667b2004459042a82a4c9e41d, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 1472519200}
|
||||
- targetCorrespondingSourceObject: {fileID: 556765321, guid: 092f8aa667b2004459042a82a4c9e41d, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 2080548117}
|
||||
m_AddedComponents:
|
||||
- targetCorrespondingSourceObject: {fileID: 146720, guid: 092f8aa667b2004459042a82a4c9e41d, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 1042553199}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 092f8aa667b2004459042a82a4c9e41d, type: 3}
|
||||
--- !u!224 &647991888 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 556765321, guid: 092f8aa667b2004459042a82a4c9e41d, type: 3}
|
||||
m_PrefabInstance: {fileID: 647991887}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &649955262
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -108519,6 +108530,8 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1007024365}
|
||||
- {fileID: 1677677843}
|
||||
- {fileID: 2144120087}
|
||||
- {fileID: 292895766}
|
||||
m_Father: {fileID: 1625646592}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -108962,7 +108975,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: "\"\u0110\xE3 nh\u1EB7t \u0111\u01B0\u1EE3c r\u01B0\u01A1ng!"
|
||||
m_text: "B\u1EA1n ch\u01B0a nh\u1EB7t r\u01B0\u01A1ng n\xE0o!"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
@@ -135715,7 +135728,8 @@ Transform:
|
||||
m_LocalPosition: {x: -9.92779, y: 6.5958996, z: -8.445259}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Children:
|
||||
- {fileID: 1305135641}
|
||||
m_Father: {fileID: 1617980815}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!43 &1167863508
|
||||
@@ -139062,6 +139076,135 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 333057066}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: -45, z: 90}
|
||||
--- !u!1 &1305135640
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1305135641}
|
||||
- component: {fileID: 1305135642}
|
||||
m_Layer: 0
|
||||
m_Name: Audio Source
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1305135641
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1305135640}
|
||||
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: 1158761166}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!82 &1305135642
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1305135640}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_Resource: {fileID: 8300000, guid: 5a569249b0485d347a698461b0334585, type: 3}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 0.3
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!43 &1315245509
|
||||
Mesh:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -142053,16 +142196,18 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::FinishGate
|
||||
winPanel: {fileID: 292895765}
|
||||
welcomeUI: {fileID: 2144120086}
|
||||
warningUI: {fileID: 1007024362}
|
||||
hudStar1: {fileID: 0}
|
||||
hudStar2: {fileID: 0}
|
||||
hudStar3: {fileID: 0}
|
||||
winStar1: {fileID: 0}
|
||||
winStar2: {fileID: 0}
|
||||
winStar3: {fileID: 0}
|
||||
hudStar1: {fileID: 44324355}
|
||||
hudStar2: {fileID: 1472519199}
|
||||
hudStar3: {fileID: 2080548116}
|
||||
winStar1: {fileID: 44324355}
|
||||
winStar2: {fileID: 1472519199}
|
||||
winStar3: {fileID: 2080548116}
|
||||
winSound: UI_Win
|
||||
warningSound: UI_Warning
|
||||
clickSound: UI_Click
|
||||
playerTag: Player
|
||||
--- !u!65 &1398230981
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -144264,16 +144409,16 @@ RectTransform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1472519199}
|
||||
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_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -0.00003390842}
|
||||
m_LocalScale: {x: 0.5555556, y: 0.5555556, z: 0.5555556}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 292895766}
|
||||
m_Father: {fileID: 647991888}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -701, y: 424}
|
||||
m_AnchoredPosition: {x: -389.4445, y: 235.55554}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1472519201
|
||||
@@ -147094,6 +147239,144 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1666249105}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1677677840
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1677677843}
|
||||
- component: {fileID: 1677677842}
|
||||
- component: {fileID: 1677677841}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP) (2)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!114 &1677677841
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1677677840}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: "\u0110\xE3 nh\u1EB7t \u0111\u01B0\u1EE3c c\u1ED5 v\u1EADt h\xE3y tr\u1ED1n
|
||||
tho\xE1t ra kh\u1ECFi \u0111\xE2y"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4278190328
|
||||
m_fontColor: {r: 0.9716981, g: 0, b: 0, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 36
|
||||
m_fontSizeBase: 36
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 1
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!222 &1677677842
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1677677840}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!224 &1677677843
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1677677840}
|
||||
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: 963322862}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -50, y: -462}
|
||||
m_SizeDelta: {x: 422.8404, y: 124.1478}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!43 &1701492490
|
||||
Mesh:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -147833,7 +148116,7 @@ PrefabInstance:
|
||||
- target: {fileID: -8789529727683405701, guid: b96d0fcc541b0b947907dd08b9f5beab, type: 3}
|
||||
propertyPath: notificationText
|
||||
value:
|
||||
objectReference: {fileID: 1007024362}
|
||||
objectReference: {fileID: 1677677840}
|
||||
- target: {fileID: 600579176653881994, guid: b96d0fcc541b0b947907dd08b9f5beab, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 3
|
||||
@@ -150104,16 +150387,16 @@ RectTransform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2080548116}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
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_LocalScale: {x: 0.5555556, y: 0.5555556, z: 0.5555556}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 292895766}
|
||||
m_Father: {fileID: 647991888}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -560, y: 424}
|
||||
m_AnchoredPosition: {x: -311.11115, y: 235.55554}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2080548118
|
||||
@@ -151646,6 +151929,143 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 333057066}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &2144120086
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2144120087}
|
||||
- component: {fileID: 2144120089}
|
||||
- component: {fileID: 2144120088}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP) (1)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &2144120087
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2144120086}
|
||||
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: 963322862}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -50, y: -462}
|
||||
m_SizeDelta: {x: 422.8404, y: 124.1478}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2144120088
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2144120086}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: "Ch\xE0o m\u1EEBng!"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4278190328
|
||||
m_fontColor: {r: 0.9716981, g: 0, b: 0, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 36
|
||||
m_fontSizeBase: 36
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 1
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_characterHorizontalScale: 1
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!222 &2144120089
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2144120086}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1001 &2145701567
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
Binary file not shown.
@@ -5,14 +5,17 @@ using UnityEngine;
|
||||
using UnityEngine.AI;
|
||||
using System.Linq;
|
||||
using UnityEngine.InputSystem;
|
||||
using Invector;
|
||||
using Invector.vCharacterController;
|
||||
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 / Sound Aggro) --> Đuổi theo (Vector) --> Điều tra --> Nói chuyện --> Đi tuần
|
||||
// Quy trình ưu tiên: Né đòn (Bị bắn) --> Panic (Thấp máu) --> Bắn hạ (Chiến đấu) --> Đuổi theo --> Điều tra --> Nói chuyện --> Đi tuần
|
||||
[RequireComponent(typeof(NavMeshAgent))]
|
||||
[RequireComponent(typeof(Rigidbody))]
|
||||
[RequireComponent(typeof(vHealthController))]
|
||||
public class EnemyAI : MonoBehaviour
|
||||
{
|
||||
[Header("References")]
|
||||
@@ -20,6 +23,8 @@ public class EnemyAI : MonoBehaviour
|
||||
private NavMeshAgent agent;
|
||||
private Rigidbody rb;
|
||||
private FieldOfView fov;
|
||||
private Collider mainCollider;
|
||||
private vHealthController health;
|
||||
|
||||
[Header("Movement Settings")]
|
||||
public float moveSpeed = 3f;
|
||||
@@ -34,7 +39,7 @@ public class EnemyAI : MonoBehaviour
|
||||
|
||||
[Header("Combat State")]
|
||||
public bool playerHasArtifact;
|
||||
public bool isAggroedBySound; // <-- MỚI: Trạng thái bị đánh động bởi âm thanh
|
||||
public bool isAggroedBySound;
|
||||
public GameObject laserPrefab;
|
||||
public Transform firePoint;
|
||||
public float minShootDelay = 1.5f;
|
||||
@@ -48,7 +53,15 @@ public class EnemyAI : MonoBehaviour
|
||||
private bool isDodging = false;
|
||||
private float nextDodgeTime = 0f;
|
||||
|
||||
[Header("Artifact Combat Upgrades (New)")]
|
||||
[Header("Advanced AI States (New)")]
|
||||
public bool isPanicking = false;
|
||||
public bool isEnraged = false;
|
||||
public float panicHealthThreshold = 40f; // Dưới 40% máu sẽ panic
|
||||
public float regenRate = 2f; // Hồi 2 máu mỗi giây
|
||||
public float regenDelay = 5f; // Cần 5s không nhận dame để bắt đầu hồi
|
||||
private float lastDamageTime;
|
||||
|
||||
[Header("Artifact Combat Upgrades")]
|
||||
public float minStrafeDuration = 0.5f;
|
||||
public float maxStrafeDuration = 2.2f;
|
||||
public float maxSpreadAngle = 6f;
|
||||
@@ -78,7 +91,7 @@ public class EnemyAI : MonoBehaviour
|
||||
public float suspicionLevel = 0f;
|
||||
public float investigationThreshold = 30f;
|
||||
public float alertNeighborsThreshold = 70f;
|
||||
public float alertRange = 20f;
|
||||
public float alertRange = 25f; // Tăng tầm gọi hội
|
||||
|
||||
public Node rootNode;
|
||||
|
||||
@@ -88,6 +101,16 @@ public class EnemyAI : MonoBehaviour
|
||||
rb = GetComponent<Rigidbody>();
|
||||
fov = GetComponent<FieldOfView>();
|
||||
chatBubble = GetComponentInChildren<Hallucinate.UI.ChatBubble>(true);
|
||||
mainCollider = GetComponent<Collider>();
|
||||
health = GetComponent<vHealthController>();
|
||||
|
||||
// Thiết lập Invector Health
|
||||
health.onReceiveDamage.AddListener(OnReceiveDamage);
|
||||
health.onDead.AddListener(OnDead);
|
||||
|
||||
// Tự động gán Layer Enemy
|
||||
if (gameObject.layer == LayerMask.NameToLayer("Default"))
|
||||
gameObject.layer = LayerMask.NameToLayer("Enemy");
|
||||
|
||||
rb.isKinematic = true;
|
||||
rb.freezeRotation = true;
|
||||
@@ -104,11 +127,16 @@ public class EnemyAI : MonoBehaviour
|
||||
|
||||
void InitTree()
|
||||
{
|
||||
// 1. Phản xạ tức thì (Dodge)
|
||||
var dodgeSequence = new Sequence(new List<Node> { new TaskNode(CheckDodgeConditions), new TaskNode(ActionDodge) });
|
||||
|
||||
// Đổi hàm CheckHasArtifact thành CheckCombatConditions để dùng chung cho cả âm thanh
|
||||
// 2. Hoảng loạn (Panic)
|
||||
var panicSequence = new Sequence(new List<Node> { new TaskNode(CheckPanicConditions), new TaskNode(ActionPanic) });
|
||||
|
||||
// 3. Tấn công (Laser)
|
||||
var laserSequence = new Sequence(new List<Node> { new TaskNode(CheckCombatConditions), new TaskNode(ActionFocusAndShoot) });
|
||||
|
||||
// 4. Các hành vi khác
|
||||
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) });
|
||||
@@ -117,6 +145,7 @@ public class EnemyAI : MonoBehaviour
|
||||
rootNode = new Selector(new List<Node>
|
||||
{
|
||||
dodgeSequence,
|
||||
panicSequence,
|
||||
laserSequence,
|
||||
chaseSequence,
|
||||
investigateSequence,
|
||||
@@ -127,40 +156,115 @@ public class EnemyAI : MonoBehaviour
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (player == null) return;
|
||||
if (player == null || health.isDead) return;
|
||||
|
||||
if (!agent.isOnNavMesh) return;
|
||||
// Đảm bảo Collider luôn bật
|
||||
if (mainCollider != null && !mainCollider.enabled) mainCollider.enabled = true;
|
||||
|
||||
HandleHealthRegen();
|
||||
|
||||
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 (suspicionLevel <= 0f && !isEnraged) isAggroedBySound = false;
|
||||
|
||||
if (!isTalking && !isDodging && agent.isStopped)
|
||||
if (!isTalking && !isDodging && !isPanicking && agent.isStopped)
|
||||
agent.isStopped = false;
|
||||
|
||||
rootNode?.Evaluate();
|
||||
}
|
||||
|
||||
private void HandleHealthRegen()
|
||||
{
|
||||
if (Time.time > lastDamageTime + regenDelay && health.currentHealth < health.maxHealth)
|
||||
{
|
||||
health.AddHealth((int)(regenRate * Time.deltaTime));
|
||||
}
|
||||
}
|
||||
|
||||
#region HEALTH EVENTS
|
||||
|
||||
private void OnReceiveDamage(vDamage damage)
|
||||
{
|
||||
lastDamageTime = Time.time;
|
||||
isAggroedBySound = true;
|
||||
suspicionLevel = 100f;
|
||||
StopConversation();
|
||||
|
||||
// Gọi hội ngay khi bị bắn
|
||||
AlertNeighbors(damage.hitPosition);
|
||||
|
||||
// Né đòn ngay lập tức khi bị trúng dame (phản xạ Elden Ring)
|
||||
if (Time.time > nextDodgeTime && !isDodging)
|
||||
{
|
||||
StartCoroutine(DodgeRollRoutine());
|
||||
}
|
||||
|
||||
// Kiểm tra Enrage (Phase 2)
|
||||
if (health.currentHealth < health.maxHealth * 0.5f && !isEnraged)
|
||||
{
|
||||
EnterEnrageMode();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDead(GameObject killer)
|
||||
{
|
||||
Debug.Log($"<color=black>[AI {npcName}] DIED.</color>");
|
||||
// Khi chết, làm những con xung quanh Enraged gắt hơn
|
||||
Collider[] hitColliders = Physics.OverlapSphere(transform.position, alertRange);
|
||||
foreach (var hit in hitColliders)
|
||||
{
|
||||
EnemyAI ally = hit.GetComponentInParent<EnemyAI>();
|
||||
if (ally != null && ally != this) ally.EnterEnrageMode();
|
||||
}
|
||||
|
||||
agent.enabled = false;
|
||||
this.enabled = false;
|
||||
}
|
||||
|
||||
public void EnterEnrageMode()
|
||||
{
|
||||
if (isEnraged) return;
|
||||
isEnraged = true;
|
||||
isPanicking = false; // Hết sợ, chuyển sang liều mạng
|
||||
|
||||
// Buff stats mạnh mẽ như Elden Ring boss phase 2
|
||||
moveSpeed *= 1.5f;
|
||||
minShootDelay *= 0.5f;
|
||||
maxShootDelay *= 0.5f;
|
||||
maxSpreadAngle *= 0.6f; // Bắn chính xác hơn
|
||||
approachWeight = 0.8f; // Áp sát cực gắt
|
||||
minCombatDistance = 2.0f; // Đứng sát mặt Player để bắn
|
||||
|
||||
if (chatBubble != null) chatBubble.Show("FOR THE BROTHERHOOD! DIE!", 3f);
|
||||
Debug.Log($"<color=red>[AI {npcName}] ENRAGED!</color> Stats boosted.");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CONDITIONS
|
||||
|
||||
private NodeState CheckDodgeConditions()
|
||||
{
|
||||
if (playerHasArtifact || isAggroedBySound) return NodeState.Failure;
|
||||
|
||||
if (isDodging) return NodeState.Success;
|
||||
if (fov != null && fov.canSeePlayer && Mouse.current.leftButton.isPressed)
|
||||
// Tự né khi thấy Player click chuột trái (đang bắn)
|
||||
if (fov != null && fov.canSeePlayer && Mouse.current.leftButton.isPressed && Time.time > nextDodgeTime)
|
||||
return NodeState.Success;
|
||||
return NodeState.Failure;
|
||||
}
|
||||
|
||||
// Node này thay thế cho CheckHasArtifact cũ
|
||||
private NodeState CheckPanicConditions()
|
||||
{
|
||||
if (isEnraged) return NodeState.Failure; // Đang điên thì không sợ
|
||||
if (health.currentHealth < (health.maxHealth * (panicHealthThreshold / 100f)))
|
||||
{
|
||||
return NodeState.Success;
|
||||
}
|
||||
return NodeState.Failure;
|
||||
}
|
||||
|
||||
private NodeState CheckCombatConditions()
|
||||
{
|
||||
bool shouldCombat = playerHasArtifact || isAggroedBySound;
|
||||
bool shouldCombat = playerHasArtifact || isAggroedBySound || isEnraged;
|
||||
if (shouldCombat) StopConversation();
|
||||
return shouldCombat ? NodeState.Success : NodeState.Failure;
|
||||
}
|
||||
@@ -168,48 +272,32 @@ public class EnemyAI : MonoBehaviour
|
||||
private NodeState CheckCanSeePlayer()
|
||||
{
|
||||
bool canSee = fov != null && fov.canSeePlayer;
|
||||
if (canSee) { StopConversation(); AlertNeighbors(); suspicionLevel = 100; }
|
||||
if (canSee) { StopConversation(); AlertNeighbors(transform.position); suspicionLevel = 100; }
|
||||
return canSee ? NodeState.Success : NodeState.Failure;
|
||||
}
|
||||
|
||||
private NodeState CheckHasInvestigateTarget()
|
||||
{
|
||||
if (fov != null && fov.lastKnownPlayerPosition != Vector3.zero)
|
||||
{
|
||||
if (suspicionLevel > investigationThreshold)
|
||||
{
|
||||
if (Random.value < (suspicionLevel / 100f)) return NodeState.Success;
|
||||
}
|
||||
}
|
||||
if (fov != null && fov.lastKnownPlayerPosition != Vector3.zero && suspicionLevel > investigationThreshold)
|
||||
return NodeState.Success;
|
||||
return NodeState.Failure;
|
||||
}
|
||||
|
||||
private NodeState CheckCanTalkToNPC()
|
||||
{
|
||||
if (playerHasArtifact || isAggroedBySound || (fov != null && fov.canSeePlayer)) return NodeState.Failure;
|
||||
if (Time.time < lastTalkTime + talkCooldown) return NodeState.Failure;
|
||||
if (isTalking) return NodeState.Success;
|
||||
|
||||
if (Hallucinate.AI.ConversationManager.Instance == null)
|
||||
{
|
||||
Debug.LogError($"[AI {npcName}] ConversationManager Instance is NULL!");
|
||||
return NodeState.Failure;
|
||||
}
|
||||
|
||||
if (!Hallucinate.AI.ConversationManager.Instance.CanStartConversation()) return NodeState.Failure;
|
||||
if (playerHasArtifact || isAggroedBySound || isEnraged || (fov != null && fov.canSeePlayer)) return NodeState.Failure;
|
||||
if (Time.time < lastTalkTime + talkCooldown || isTalking) return NodeState.Failure;
|
||||
if (Hallucinate.AI.ConversationManager.Instance == null || !Hallucinate.AI.ConversationManager.Instance.CanStartConversation()) return NodeState.Failure;
|
||||
|
||||
Collider[] hitColliders = Physics.OverlapSphere(transform.position, talkRange);
|
||||
foreach (var hit in hitColliders)
|
||||
{
|
||||
if (hit.gameObject == gameObject) continue;
|
||||
|
||||
EnemyAI other = hit.GetComponentInParent<EnemyAI>();
|
||||
if (other != null && !other.isTalking && Time.time >= other.lastTalkTime + talkCooldown)
|
||||
if (other != null && !other.isTalking && !other.isEnraged)
|
||||
{
|
||||
float dist = Vector3.Distance(transform.position, other.transform.position);
|
||||
if (dist <= talkRange && gameObject.GetInstanceID() < other.gameObject.GetInstanceID())
|
||||
if (gameObject.GetInstanceID() < other.gameObject.GetInstanceID())
|
||||
{
|
||||
Debug.Log($"<color=green>[AI {npcName}]</color> Found partner: {other.npcName}. Starting conversation.");
|
||||
Hallucinate.AI.ConversationManager.Instance.StartConversation(this, other);
|
||||
return NodeState.Success;
|
||||
}
|
||||
@@ -226,19 +314,12 @@ 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();
|
||||
if (suspicionLevel >= investigationThreshold) isAggroedBySound = true;
|
||||
if (suspicionLevel >= alertNeighborsThreshold) AlertNeighbors(location);
|
||||
StopConversation();
|
||||
Debug.Log($"<color=orange>[AI {npcName}]</color> Heard noise! Suspicion: {suspicionLevel}");
|
||||
}
|
||||
|
||||
public void AlertNeighbors()
|
||||
public void AlertNeighbors(Vector3 threatPos)
|
||||
{
|
||||
Collider[] hitColliders = Physics.OverlapSphere(transform.position, alertRange);
|
||||
foreach (var hit in hitColliders)
|
||||
@@ -246,83 +327,77 @@ public class EnemyAI : MonoBehaviour
|
||||
EnemyAI neighbor = hit.GetComponentInParent<EnemyAI>();
|
||||
if (neighbor != null && neighbor != this)
|
||||
{
|
||||
neighbor.suspicionLevel = Mathf.Max(neighbor.suspicionLevel, 50f);
|
||||
if (fov != null && neighbor.fov != null) neighbor.fov.lastKnownPlayerPosition = fov.lastKnownPlayerPosition;
|
||||
neighbor.TriggerCombatAlert(threatPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerCombatAlert(Vector3 sourceLocation)
|
||||
{
|
||||
if (isEnraged) return;
|
||||
suspicionLevel = 100f;
|
||||
isAggroedBySound = true;
|
||||
if (fov != null) fov.lastKnownPlayerPosition = sourceLocation;
|
||||
StopConversation();
|
||||
}
|
||||
|
||||
private NodeState ActionPanic()
|
||||
{
|
||||
isPanicking = true;
|
||||
agent.speed = moveSpeed * 1.3f;
|
||||
|
||||
// Chạy trốn khỏi Player đến một điểm ngẫu nhiên xa Player
|
||||
if (!agent.pathPending && agent.remainingDistance < 1f)
|
||||
{
|
||||
Vector3 runDir = (transform.position - player.position).normalized;
|
||||
Vector3 escapePoint = transform.position + runDir * 10f + Random.insideUnitSphere * 5f;
|
||||
|
||||
NavMeshHit hit;
|
||||
if (NavMesh.SamplePosition(escapePoint, out hit, 10f, 1))
|
||||
agent.SetDestination(hit.position);
|
||||
}
|
||||
|
||||
if (chatBubble != null && Random.value < 0.01f) chatBubble.Show("HELP! HE'S KILLING US!", 1f);
|
||||
|
||||
return NodeState.Running;
|
||||
}
|
||||
|
||||
private NodeState ActionTalk()
|
||||
{
|
||||
if (isTalking)
|
||||
{
|
||||
agent.isStopped = true;
|
||||
if (talkingPartner != null)
|
||||
{
|
||||
if (Vector3.Distance(transform.position, talkingPartner.transform.position) > talkRange + 2f)
|
||||
{
|
||||
Debug.Log($"[AI {npcName}] Partner moved too far. Ending conversation.");
|
||||
StopConversation();
|
||||
return NodeState.Failure;
|
||||
}
|
||||
}
|
||||
return NodeState.Running;
|
||||
}
|
||||
if (isTalking) { agent.isStopped = true; return NodeState.Running; }
|
||||
return NodeState.Failure;
|
||||
}
|
||||
|
||||
public void ProcessDialogueResult(string json)
|
||||
{
|
||||
try
|
||||
{
|
||||
DialogueResult result = JsonUtility.FromJson<DialogueResult>(json);
|
||||
if (chatBubble != null) chatBubble.Show(result.text);
|
||||
|
||||
moveSpeed += result.speedMod;
|
||||
suspicionLevel = Mathf.Clamp(suspicionLevel + result.suspicionMod, 0, 100);
|
||||
lastTalkTime = Time.time;
|
||||
}
|
||||
catch { if (chatBubble != null) chatBubble.Show(json); }
|
||||
}
|
||||
|
||||
private void StopConversation()
|
||||
{
|
||||
if (isTalking && Hallucinate.AI.ConversationManager.Instance != null)
|
||||
{
|
||||
Hallucinate.AI.ConversationManager.Instance.InterruptConversation(this);
|
||||
if (chatBubble != null) chatBubble.Show("Wait, what was that?!", 2f);
|
||||
}
|
||||
}
|
||||
|
||||
private NodeState ActionPatrol()
|
||||
{
|
||||
isPanicking = false;
|
||||
agent.isStopped = false;
|
||||
agent.speed = patrolSpeed;
|
||||
|
||||
if (!agent.pathPending && agent.remainingDistance <= agent.stoppingDistance)
|
||||
{
|
||||
currentWaitTime += Time.deltaTime;
|
||||
|
||||
if (currentWaitTime >= patrolWaitTime)
|
||||
{
|
||||
Vector3 randomDirection = Random.insideUnitSphere * patrolRadius;
|
||||
randomDirection += startPosition;
|
||||
|
||||
Vector3 randomDest = startPosition + Random.insideUnitSphere * patrolRadius;
|
||||
NavMeshHit hit;
|
||||
if (NavMesh.SamplePosition(randomDirection, out hit, patrolRadius, 1))
|
||||
{
|
||||
agent.SetDestination(hit.position);
|
||||
}
|
||||
|
||||
if (NavMesh.SamplePosition(randomDest, out hit, patrolRadius, 1)) agent.SetDestination(hit.position);
|
||||
currentWaitTime = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
return NodeState.Running;
|
||||
}
|
||||
|
||||
private NodeState ActionChasePlayer()
|
||||
{
|
||||
isPanicking = false;
|
||||
agent.isStopped = false;
|
||||
agent.speed = moveSpeed;
|
||||
agent.SetDestination(player.position);
|
||||
@@ -334,99 +409,58 @@ public class EnemyAI : MonoBehaviour
|
||||
agent.isStopped = false;
|
||||
agent.speed = moveSpeed * 0.7f;
|
||||
agent.SetDestination(fov.lastKnownPlayerPosition);
|
||||
|
||||
if (Vector3.Distance(transform.position, fov.lastKnownPlayerPosition) < 1.5f)
|
||||
{
|
||||
currentWaitTime += Time.deltaTime;
|
||||
if (currentWaitTime > 3f)
|
||||
{
|
||||
fov.lastKnownPlayerPosition = Vector3.zero;
|
||||
suspicionLevel *= 0.5f;
|
||||
return NodeState.Success;
|
||||
}
|
||||
if (currentWaitTime > 3f) { fov.lastKnownPlayerPosition = Vector3.zero; return NodeState.Success; }
|
||||
}
|
||||
return NodeState.Running;
|
||||
}
|
||||
|
||||
private NodeState ActionFocusAndShoot()
|
||||
{
|
||||
isPanicking = false;
|
||||
if (player == null) return NodeState.Failure;
|
||||
|
||||
if (agent.hasPath) agent.ResetPath();
|
||||
agent.isStopped = false;
|
||||
|
||||
// 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
|
||||
Vector3 targetPos = player.position;
|
||||
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;
|
||||
// Xoay về phía mục tiêu
|
||||
Vector3 bodyDir = (targetPos - transform.position);
|
||||
bodyDir.y = 0f;
|
||||
if (bodyDir != Vector3.zero)
|
||||
{
|
||||
Quaternion targetRotation = Quaternion.LookRotation(bodyDirNormal);
|
||||
transform.rotation = Quaternion.Slerp(transform.rotation, targetRotation, rotateSpeed * Time.deltaTime);
|
||||
}
|
||||
transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(bodyDir), rotateSpeed * Time.deltaTime);
|
||||
|
||||
// 2. RANDOM THỜI GIAN/KHOẢNG CÁCH DUY TRÌ HƯỚNG DI CHUYỂN
|
||||
// Strafe di chuyển linh hoạt
|
||||
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)];
|
||||
strafeDirectionSign = new int[] { -1, 1, 0 }[Random.Range(0, 3)];
|
||||
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;
|
||||
|
||||
Vector3 moveDir = Vector3.zero;
|
||||
if (strafeDirectionSign != 0 && bodyDir != Vector3.zero)
|
||||
{
|
||||
finalMovementVector = new Vector3(-bodyDirNormal.z, 0, bodyDirNormal.x) * strafeDirectionSign;
|
||||
|
||||
float currentDistance = Vector3.Distance(transform.position, targetPos);
|
||||
if (currentDistance > minCombatDistance)
|
||||
{
|
||||
finalMovementVector += bodyDirNormal * approachWeight;
|
||||
}
|
||||
Vector3 normal = bodyDir.normalized;
|
||||
moveDir = new Vector3(-normal.z, 0, normal.x) * strafeDirectionSign;
|
||||
if (Vector3.Distance(transform.position, targetPos) > minCombatDistance) moveDir += normal * approachWeight;
|
||||
}
|
||||
|
||||
if (finalMovementVector != Vector3.zero)
|
||||
if (moveDir != Vector3.zero)
|
||||
{
|
||||
finalMovementVector.Normalize();
|
||||
agent.speed = moveSpeed * 0.75f;
|
||||
agent.Move(finalMovementVector * agent.speed * Time.deltaTime);
|
||||
agent.speed = moveSpeed * (isEnraged ? 1f : 0.75f);
|
||||
agent.Move(moveDir.normalized * 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 = targetPos + Vector3.up * 1f;
|
||||
Vector3 aimDir = targetCenter - firePoint.position;
|
||||
if (aimDir != Vector3.zero)
|
||||
{
|
||||
firePoint.rotation = Quaternion.LookRotation(aimDir);
|
||||
}
|
||||
}
|
||||
firePoint.rotation = Quaternion.LookRotation((targetPos + Vector3.up * 1f) - firePoint.position);
|
||||
|
||||
// 5. RANDOM SỐ ĐẠN & DELAY GIỮA CÁC ĐỢT BẮN
|
||||
if (Time.time >= nextShootTime && !isShootingBurst)
|
||||
{
|
||||
int randomBulletCount = Random.Range(1, 4);
|
||||
StartCoroutine(ShootBurstRoutine(randomBulletCount));
|
||||
StartCoroutine(ShootBurstRoutine(Random.Range(1, isEnraged ? 6 : 4)));
|
||||
nextShootTime = Time.time + Random.Range(minShootDelay, maxShootDelay);
|
||||
}
|
||||
|
||||
@@ -436,31 +470,17 @@ public class EnemyAI : MonoBehaviour
|
||||
private IEnumerator ShootBurstRoutine(int bulletCount)
|
||||
{
|
||||
isShootingBurst = true;
|
||||
|
||||
for (int i = 0; i < bulletCount; i++)
|
||||
{
|
||||
if (laserPrefab == null || firePoint == null) break;
|
||||
|
||||
float randomX = Random.Range(-maxSpreadAngle, maxSpreadAngle);
|
||||
float randomY = Random.Range(-maxSpreadAngle, maxSpreadAngle);
|
||||
Quaternion spreadRotation = Quaternion.Euler(randomX, randomY, 0f);
|
||||
|
||||
Quaternion finalBulletRotation = firePoint.rotation * spreadRotation;
|
||||
|
||||
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}");
|
||||
|
||||
if (i < bulletCount - 1)
|
||||
{
|
||||
yield return new WaitForSeconds(burstInterval);
|
||||
}
|
||||
float spread = isEnraged ? maxSpreadAngle * 0.5f : maxSpreadAngle;
|
||||
Quaternion rot = firePoint.rotation * Quaternion.Euler(Random.Range(-spread, spread), Random.Range(-spread, spread), 0f);
|
||||
Instantiate(laserPrefab, firePoint.position, rot);
|
||||
yield return new WaitForSeconds(isEnraged ? burstInterval * 0.7f : burstInterval);
|
||||
}
|
||||
|
||||
isShootingBurst = false;
|
||||
}
|
||||
|
||||
private void ShootLaser() { }
|
||||
|
||||
private NodeState ActionDodge()
|
||||
{
|
||||
if (!isDodging) StartCoroutine(DodgeRollRoutine());
|
||||
@@ -472,16 +492,34 @@ public class EnemyAI : MonoBehaviour
|
||||
isDodging = true;
|
||||
agent.enabled = false;
|
||||
rb.isKinematic = false;
|
||||
if (mainCollider != null) mainCollider.enabled = true;
|
||||
|
||||
Vector3 dir = (player.position - transform.position).normalized;
|
||||
Vector3 perp = new Vector3(-dir.z, 0, dir.x);
|
||||
rb.AddForce((Random.value > 0.5f ? perp : -perp) * dodgeForce, ForceMode.Impulse);
|
||||
Vector3 perp = new Vector3(-dir.z, 0, dir.x) * (Random.value > 0.5f ? 1 : -1);
|
||||
rb.AddForce(perp * (isEnraged ? dodgeForce * 1.5f : dodgeForce), ForceMode.Impulse);
|
||||
|
||||
yield return new WaitForSeconds(dodgeDuration);
|
||||
rb.linearVelocity = Vector3.zero;
|
||||
rb.isKinematic = true;
|
||||
agent.enabled = true;
|
||||
nextDodgeTime = Time.time + (isEnraged ? dodgeCooldown * 0.5f : dodgeCooldown);
|
||||
isDodging = false;
|
||||
}
|
||||
|
||||
public void ProcessDialogueResult(string json)
|
||||
{
|
||||
try
|
||||
{
|
||||
DialogueResult result = JsonUtility.FromJson<DialogueResult>(json);
|
||||
if (chatBubble != null) chatBubble.Show(result.text);
|
||||
|
||||
moveSpeed += result.speedMod;
|
||||
suspicionLevel = Mathf.Clamp(suspicionLevel + result.suspicionMod, 0, 100);
|
||||
lastTalkTime = Time.time;
|
||||
}
|
||||
catch { if (chatBubble != null) chatBubble.Show(json); }
|
||||
}
|
||||
|
||||
public void SetTalkingPartner(EnemyAI partner) { talkingPartner = partner; }
|
||||
public void FaceTarget(Vector3 pos)
|
||||
{
|
||||
@@ -494,13 +532,7 @@ public class EnemyAI : MonoBehaviour
|
||||
|
||||
private void OnDrawGizmos()
|
||||
{
|
||||
Gizmos.color = Color.green;
|
||||
Gizmos.DrawWireSphere(transform.position, talkRange);
|
||||
|
||||
if (isTalking && talkingPartner != null)
|
||||
{
|
||||
Gizmos.color = Color.yellow;
|
||||
Gizmos.DrawLine(transform.position + Vector3.up, talkingPartner.transform.position + Vector3.up);
|
||||
}
|
||||
Gizmos.color = isEnraged ? Color.red : Color.green;
|
||||
Gizmos.DrawWireSphere(transform.position, alertRange);
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,18 @@ public class LaserProjectile : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
// KIỂM TRA LAYER "GROUND"
|
||||
if (other.gameObject.layer == LayerMask.NameToLayer("Ground"))
|
||||
{
|
||||
Debug.Log("<color=yellow>Laser hit GROUND layer.</color>");
|
||||
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 solid object: {other.name} (Ground/Obstacle). Destroying.");
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using System.Collections;
|
||||
using Hallucinate.Audio; // Import namespace for AudioManager
|
||||
using Hallucinate.Audio;
|
||||
|
||||
public class FinishGate : MonoBehaviour
|
||||
{
|
||||
[Header("Cài đặt UI Chính")]
|
||||
public GameObject winPanel;
|
||||
public GameObject warningUI; // Thông báo "Bạn chưa nhặt rương nào!"
|
||||
public GameObject welcomeUI; // THÔNG BÁO 1: "Chào mừng!"
|
||||
public GameObject warningUI; // THÔNG BÁO 2: "Bạn chưa nhặt rương nào!"
|
||||
|
||||
[Header("Cài đặt Sao trên HUD (Giao diện chính)")]
|
||||
[Header("Cài đặt Sao trên HUD")]
|
||||
public GameObject hudStar1;
|
||||
public GameObject hudStar2;
|
||||
public GameObject hudStar3;
|
||||
|
||||
[Header("Cài đặt Sao trên Bảng Win (Kết thúc)")]
|
||||
[Header("Cài đặt Sao trên Bảng Win")]
|
||||
public GameObject winStar1;
|
||||
public GameObject winStar2;
|
||||
public GameObject winStar3;
|
||||
@@ -24,21 +25,26 @@ public class FinishGate : MonoBehaviour
|
||||
public string warningSound = "UI_Warning";
|
||||
public string clickSound = "UI_Click";
|
||||
|
||||
[Header("Cấu hình Tag")]
|
||||
public string playerTag = "Player";
|
||||
|
||||
private bool hasEnteredOnce = false; // Theo dõi lần chạm cổng đầu tiên
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Time.timeScale = 1f;
|
||||
|
||||
if (winPanel != null) winPanel.SetActive(false);
|
||||
if (welcomeUI != null) welcomeUI.SetActive(false);
|
||||
if (warningUI != null) warningUI.SetActive(false);
|
||||
|
||||
// Ẩn tất cả sao lúc bắt đầu
|
||||
UpdateStarsUI(0);
|
||||
UpdateWinStarsUI(0);
|
||||
}
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Check"))
|
||||
if (other.CompareTag(playerTag))
|
||||
{
|
||||
PlayerInventory player = other.GetComponentInChildren<PlayerInventory>();
|
||||
if (player == null) player = other.GetComponentInParent<PlayerInventory>();
|
||||
@@ -47,55 +53,68 @@ public class FinishGate : MonoBehaviour
|
||||
{
|
||||
if (player.treasuresCollected > 0)
|
||||
{
|
||||
Debug.Log($"<color=green>[Gate]</color> VỀ ĐÍCH! Kết thúc màn chơi với {player.treasuresCollected} sao.");
|
||||
WinGame(player.treasuresCollected);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("<color=yellow>[Gate]</color> Bạn chưa nhặt rương nào, hãy đi tìm rương trước khi về.");
|
||||
StopAllCoroutines();
|
||||
StartCoroutine(ShowTempUI(warningUI));
|
||||
// Nếu là lần đầu tiên -> Hiện Welcome. Nếu là lần sau -> Hiện Warning.
|
||||
if (!hasEnteredOnce)
|
||||
{
|
||||
hasEnteredOnce = true;
|
||||
StartCoroutine(ShowTempUI(welcomeUI));
|
||||
}
|
||||
else
|
||||
{
|
||||
StartCoroutine(ShowTempUI(warningUI));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Hàm public để TreasureItem có thể gọi cập nhật HUD ngay khi nhặt
|
||||
public void UpdateStarsUI(int count)
|
||||
{
|
||||
if (hudStar1) hudStar1.SetActive(count >= 1);
|
||||
if (hudStar2) hudStar2.SetActive(count >= 2);
|
||||
if (hudStar3) hudStar3.SetActive(count >= 3);
|
||||
if (hudStar1 != null) hudStar1.SetActive(count >= 1);
|
||||
if (hudStar2 != null) hudStar2.SetActive(count >= 2);
|
||||
if (hudStar3 != null) hudStar3.SetActive(count >= 3);
|
||||
}
|
||||
|
||||
void UpdateWinStarsUI(int count)
|
||||
private void UpdateWinStarsUI(int count)
|
||||
{
|
||||
if (winStar1) winStar1.SetActive(count >= 1);
|
||||
if (winStar2) winStar2.SetActive(count >= 2);
|
||||
if (winStar3) winStar3.SetActive(count >= 3);
|
||||
if (winStar1 != null) winStar1.SetActive(count >= 1);
|
||||
if (winStar2 != null) winStar2.SetActive(count >= 2);
|
||||
if (winStar3 != null) winStar3.SetActive(count >= 3);
|
||||
}
|
||||
|
||||
void WinGame(int count)
|
||||
private void WinGame(int count)
|
||||
{
|
||||
if (winPanel != null)
|
||||
{
|
||||
winPanel.SetActive(true);
|
||||
UpdateWinStarsUI(count); // Hiện số sao tương ứng trên bảng kết thúc
|
||||
UpdateWinStarsUI(count);
|
||||
}
|
||||
|
||||
AudioManager.PlayGlobal(winSound); // Chạy âm thanh thắng cuộc
|
||||
|
||||
AudioManager.PlayGlobal(winSound);
|
||||
Time.timeScale = 0f;
|
||||
Cursor.lockState = CursorLockMode.None;
|
||||
Cursor.visible = true;
|
||||
}
|
||||
|
||||
IEnumerator ShowTempUI(GameObject ui)
|
||||
private IEnumerator ShowTempUI(GameObject ui)
|
||||
{
|
||||
if (ui == null) yield break;
|
||||
|
||||
// Tắt tất cả UI tạm thời khác trước khi bật cái mới để tránh đè chữ
|
||||
if (welcomeUI != null) welcomeUI.SetActive(false);
|
||||
if (warningUI != null) warningUI.SetActive(false);
|
||||
|
||||
ui.SetActive(true);
|
||||
|
||||
if (ui == warningUI) AudioManager.PlayGlobal(warningSound); // Chạy âm thanh cảnh báo
|
||||
if (ui == warningUI)
|
||||
{
|
||||
AudioManager.PlayGlobal(warningSound);
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(3f);
|
||||
ui.SetActive(false);
|
||||
@@ -103,17 +122,17 @@ public class FinishGate : MonoBehaviour
|
||||
|
||||
public void RestartGame()
|
||||
{
|
||||
AudioManager.PlayGlobal(clickSound); // Âm thanh click nút
|
||||
AudioManager.PlayGlobal(clickSound);
|
||||
Time.timeScale = 1f;
|
||||
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
|
||||
}
|
||||
|
||||
public void QuitGame()
|
||||
{
|
||||
AudioManager.PlayGlobal(clickSound); // Âm thanh click nút
|
||||
AudioManager.PlayGlobal(clickSound);
|
||||
Application.Quit();
|
||||
#if UNITY_EDITOR
|
||||
UnityEditor.EditorApplication.isPlaying = false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,52 +1,55 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using Hallucinate.Audio;
|
||||
using Hallucinate.Audio;
|
||||
|
||||
public class TreasureItem : MonoBehaviour
|
||||
{
|
||||
[Header("Cài đặt UI thông báo")]
|
||||
public GameObject notificationText; // Text "Đã nhặt Cổ vật"
|
||||
[Tooltip("Kéo Text 'Đã nhặt được cổ vật hãy trốn thoát ra khỏi đây' vào đây")]
|
||||
public GameObject notificationText;
|
||||
|
||||
[Header("Cài đặt Âm thanh")]
|
||||
public string pickupSound = "Item_Pickup";
|
||||
|
||||
[Header("Cấu hình Tag")]
|
||||
public string playerTag = "Player";
|
||||
|
||||
private bool isCollected = false;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if (notificationText != null)
|
||||
{
|
||||
notificationText.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Player"))
|
||||
if (!isCollected && other.CompareTag(playerTag))
|
||||
{
|
||||
PlayerInventory player = other.GetComponentInChildren<PlayerInventory>();
|
||||
if (player == null) player = other.GetComponentInParent<PlayerInventory>();
|
||||
|
||||
if (player != null)
|
||||
{
|
||||
// 1. Tăng số lượng rương đang giữ
|
||||
isCollected = true;
|
||||
player.treasuresCollected++;
|
||||
Debug.Log($"<color=cyan>[Chest]</color> NHẶT THÀNH CÔNG! Số rương hiện tại: {player.treasuresCollected}");
|
||||
|
||||
// 2. Cập nhật sao trên HUD ngay lập tức (Tìm FinishGate để mượn hàm update)
|
||||
FinishGate gate = Object.FindAnyObjectByType<FinishGate>();
|
||||
if (gate != null)
|
||||
{
|
||||
gate.UpdateStarsUI(player.treasuresCollected);
|
||||
}
|
||||
|
||||
// 3. Kích hoạt trạng thái truy đuổi cho toàn bộ Enemy AI
|
||||
SetEnemiesAlertState(true);
|
||||
|
||||
// 4. Chạy âm thanh nhặt đồ
|
||||
if (AudioManager.Instance != null)
|
||||
{
|
||||
AudioManager.Instance.Play(pickupSound, position: transform.position);
|
||||
}
|
||||
|
||||
if (notificationText != null)
|
||||
{
|
||||
StopAllCoroutines();
|
||||
StartCoroutine(ShowNotification());
|
||||
}
|
||||
|
||||
// Biến mất rương
|
||||
gameObject.SetActive(false);
|
||||
StartCoroutine(HandlePickupRoutine());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,14 +59,38 @@ public class TreasureItem : MonoBehaviour
|
||||
EnemyAI[] allEnemies = Object.FindObjectsByType<EnemyAI>(FindObjectsSortMode.None);
|
||||
foreach (EnemyAI enemy in allEnemies)
|
||||
{
|
||||
enemy.playerHasArtifact = state;
|
||||
if (enemy != null) enemy.playerHasArtifact = state;
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator ShowNotification()
|
||||
private IEnumerator HandlePickupRoutine()
|
||||
{
|
||||
notificationText.SetActive(true);
|
||||
yield return new WaitForSeconds(2f);
|
||||
notificationText.SetActive(false);
|
||||
HideTreasureModel();
|
||||
|
||||
if (notificationText != null)
|
||||
{
|
||||
notificationText.SetActive(true);
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(3f); // Tăng lên 3s để người chơi kịp đọc dòng chữ dài
|
||||
|
||||
if (notificationText != null)
|
||||
{
|
||||
notificationText.SetActive(false);
|
||||
}
|
||||
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void HideTreasureModel()
|
||||
{
|
||||
Collider col = GetComponent<Collider>();
|
||||
if (col != null) col.enabled = false;
|
||||
|
||||
MeshRenderer[] renderers = GetComponentsInChildren<MeshRenderer>();
|
||||
foreach (MeshRenderer r in renderers)
|
||||
{
|
||||
r.enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,6 +51,9 @@ namespace Invector.vShooter
|
||||
{
|
||||
AddTrailPosition();
|
||||
}
|
||||
|
||||
// Log diagnostic: Kiểm tra Layer mà đạn có thể bắn trúng
|
||||
Debug.Log($"<color=cyan>PROJECTILE SPAWNED:</color> HitLayer Mask: {hitLayer.value}. Đảm bảo Layer của Enemy nằm trong mask này.");
|
||||
}
|
||||
|
||||
protected virtual void Update()
|
||||
@@ -61,6 +64,7 @@ namespace Invector.vShooter
|
||||
transform.rotation = Quaternion.LookRotation(_rigidBody.linearVelocity.normalized, transform.up);
|
||||
}
|
||||
|
||||
// Thực hiện raycast để kiểm tra va chạm
|
||||
if (Physics.Linecast(previousPosition, transform.position + transform.forward * 0.5f, out hitInfo, hitLayer))
|
||||
{
|
||||
if (!hitInfo.collider)
|
||||
@@ -98,11 +102,31 @@ namespace Invector.vShooter
|
||||
damage.hitPosition = hitInfo.point;
|
||||
damage.receiver = hitInfo.collider.transform;
|
||||
damage.force = transform.forward * damage.damageValue * forceMultiplier;
|
||||
|
||||
if (damage.damageValue > 0)
|
||||
{
|
||||
onPassDamage.Invoke(damage);
|
||||
|
||||
hitInfo.collider.gameObject.ApplyDamage(damage, damage.sender ? damage.sender.GetComponent<vIMeleeFighter>() : null);
|
||||
// 1. Log khi trúng bất cứ thứ gì
|
||||
Debug.Log($"<color=yellow>PROJECTILE HIT:</color> {hitInfo.collider.name} | Tag: {hitInfo.collider.tag} | Layer: {LayerMask.LayerToName(hitInfo.collider.gameObject.layer)}");
|
||||
|
||||
// 2. Tìm đối tượng nhận sát thương (ưu tiên tìm ở cha nếu trúng collider con)
|
||||
var damageReceiver = hitInfo.collider.gameObject.GetComponentInParent<vIDamageReceiver>();
|
||||
|
||||
if (damageReceiver != null)
|
||||
{
|
||||
if (hitInfo.collider.CompareTag("Enemy") || damageReceiver.gameObject.CompareTag("Enemy"))
|
||||
{
|
||||
Debug.Log($"<color=green>APPLYING DAMAGE TO ENEMY:</color> {damageReceiver.gameObject.name}. Damage: {damage.damageValue}");
|
||||
}
|
||||
|
||||
// Gửi sát thương đến đối tượng tìm thấy
|
||||
damageReceiver.gameObject.ApplyDamage(damage, damage.sender ? damage.sender.GetComponent<vIMeleeFighter>() : null);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"<color=orange>NO DAMAGE RECEIVER FOUND</color> on {hitInfo.collider.name} or its parents. Đảm bảo Enemy có component vHealthController.");
|
||||
}
|
||||
}
|
||||
|
||||
var rigb = hitInfo.collider.gameObject.GetComponent<Rigidbody>();
|
||||
|
||||
@@ -302,6 +302,15 @@ namespace Invector.vShooter
|
||||
var rotation = Quaternion.LookRotation(dir);
|
||||
GameObject bulletObject = null;
|
||||
var velocityChanged = 0f;
|
||||
|
||||
if (projectile == null)
|
||||
{
|
||||
Debug.LogError($"<color=red>WEAPON ERROR:</color> No Projectile Prefab assigned to {gameObject.name}!");
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Log($"<color=white>WEAPON SHOOT:</color> Spawning projectile. HitLayer: {hitLayer.value}");
|
||||
|
||||
if (dispersion > 0 && projectile)
|
||||
{
|
||||
for (int i = 0; i < projectilesPerShot; i++)
|
||||
@@ -311,6 +320,12 @@ namespace Invector.vShooter
|
||||
bulletObject = Instantiate(projectile, startPoint, spreadRotation);
|
||||
|
||||
var pCtrl = bulletObject.GetComponent<vProjectileControl>();
|
||||
if (pCtrl == null)
|
||||
{
|
||||
Debug.LogError($"<color=red>PROJECTILE ERROR:</color> {projectile.name} does not have vProjectileControl script!");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (pCtrl.debugTrajetory && i == 0)
|
||||
{
|
||||
startPoint.DebugPoint(Color.red, 10, 0.1f);
|
||||
@@ -338,6 +353,13 @@ namespace Invector.vShooter
|
||||
{
|
||||
bulletObject = Instantiate(projectile, startPoint, rotation);
|
||||
var pCtrl = bulletObject.GetComponent<vProjectileControl>();
|
||||
|
||||
if (pCtrl == null)
|
||||
{
|
||||
Debug.LogError($"<color=red>PROJECTILE ERROR:</color> {projectile.name} does not have vProjectileControl script!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (pCtrl.debugTrajetory)
|
||||
{
|
||||
startPoint.DebugPoint(Color.red, 10, 0.1f);
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user