28 Commits

Author SHA1 Message Date
f70ddddf65 Update 2026-06-06 09:19:46 +07:00
75b005c691 update UI lose 2026-06-06 02:51:35 +07:00
3b24075a71 update 2026-06-06 02:36:43 +07:00
e7d8439412 linh tinh 2026-06-06 02:34:35 +07:00
af2713a00e Complete Update NPC AI 2026-06-06 02:03:22 +07:00
316a3f7760 Update 2026-06-06 00:54:47 +07:00
78692b6820 Merge branch 'main' of https://scove-vault.duckdns.org/scove/HALLUCINATION 2026-06-06 00:39:34 +07:00
9540528203 được sơ sơ 2026-06-06 00:37:41 +07:00
manhduyhoang90
a1e82db378 Merge branch 'main' of https://scove-vault.duckdns.org/scove/HALLUCINATION 2026-06-06 00:36:26 +07:00
manhduyhoang90
71d590d584 add background 2026-06-06 00:35:11 +07:00
e5a2fcfc44 Merge branch 'main' of https://scove-vault.duckdns.org/scove/HALLUCINATION 2026-06-06 00:33:23 +07:00
7409b0ca18 Update 2026-06-06 00:33:07 +07:00
manhduyhoang90
df6b8625c5 Merge branch 'main' of https://scove-vault.duckdns.org/scove/HALLUCINATION 2026-06-06 00:29:37 +07:00
manhduyhoang90
a7e07a007f Update ui 2026-06-06 00:25:02 +07:00
0580dd22b3 Merge branch 'main' of https://scove-vault.duckdns.org/scove/HALLUCINATION 2026-06-06 00:07:57 +07:00
6b4e3f1271 Update 2026-06-06 00:07:42 +07:00
manhduyhoang90
7e45faec11 Merge branch 'main' of https://scove-vault.duckdns.org/scove/HALLUCINATION 2026-06-06 00:02:35 +07:00
manhduyhoang90
763f933c2e update UI 2026-06-06 00:00:27 +07:00
948a338191 Merge branch 'main' of https://scove-vault.duckdns.org/scove/HALLUCINATION 2026-06-05 23:28:07 +07:00
19abc0b019 commit 2026-06-05 23:27:21 +07:00
1064683542 Merge branch 'main' of https://scove-vault.duckdns.org/scove/HALLUCINATION 2026-06-05 23:26:49 +07:00
3ca7816874 update 2026-06-05 23:25:56 +07:00
manhduyhoang90
f761a53194 Merge branch 'main' of https://scove-vault.duckdns.org/scove/HALLUCINATION 2026-06-05 23:20:11 +07:00
manhduyhoang90
e92d06ed54 Update:EnemyAI, KamikazeAI 2026-06-05 23:18:29 +07:00
09ca35dd35 Merge branch 'main' of https://scove-vault.duckdns.org/scove/HALLUCINATION 2026-06-05 22:54:39 +07:00
c14d3c3a95 Update 2026-06-05 22:54:37 +07:00
manhduyhoang90
7dd6b9ac20 Merge branch 'main' of https://scove-vault.duckdns.org/scove/HALLUCINATION 2026-06-05 22:54:03 +07:00
manhduyhoang90
8e40d215d6 Update EnemyAI.cs 2026-06-05 22:53:48 +07:00
44 changed files with 4481 additions and 2956 deletions

File diff suppressed because one or more lines are too long

View File

@@ -5,35 +5,12 @@
</component>
<component name="ChangeListManager">
<list default="true" id="f9183c68-daf0-43b8-be4c-fad79983f91b" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.gemini-workspace-history/active-context.md" beforeDir="false" afterPath="$PROJECT_DIR$/.gemini-workspace-history/active-context.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/.idea.HALLUCINATE/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.HALLUCINATE/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Prefabs/NPC/xNPC.prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Prefabs/NPC/xNPC.prefab" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Prefabs/projectile/_LazerPrọectile.prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Prefabs/projectile/_LazerPrọectile.prefab" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scenes/Cho môn AI/Only AI.unity" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scenes/Cho môn AI/Only AI.unity" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/AI NPC/LaserProjectile.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/AI NPC/LaserProjectile.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/CharacterController/vThirdPersonController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player/CharacterController/vThirdPersonController.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/UIElements.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/UIElements.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/Unity.Multiplayer.PlayMode.Editor.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/Unity.Multiplayer.PlayMode.Editor.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/Unity.Profiling.Editor.UI.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/Unity.Profiling.Editor.UI.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/Unity.Profiling.Editor.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/Unity.Profiling.Editor.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/Unity.UI.Builder.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/Unity.UI.Builder.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/Unity.UIToolkit.Editor.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/Unity.UIToolkit.Editor.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.Accessibility.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.Accessibility.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.Audio.UIElements.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.Audio.UIElements.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.Experimental.GraphView.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.Experimental.GraphView.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.Inspector.GraphicsSettingsInspectors.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.Inspector.GraphicsSettingsInspectors.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.Inspector.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.Inspector.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.Overlays.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.Overlays.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.PackageManager.UI.Internal.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.PackageManager.UI.Internal.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.Rendering.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.Rendering.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.Search.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.Search.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.ShaderGraph.Drawing.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.ShaderGraph.Drawing.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.ShortcutManagement.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.ShortcutManagement.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.Toolbars.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.Toolbars.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.U2D.Sprites.SpriteEditorTool.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.U2D.Sprites.SpriteEditorTool.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.UIElements.Debugger.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.UIElements.Debugger.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.UIElements.ProjectSettings.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.UIElements.ProjectSettings.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.UIElements.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/UnityEditor.UIElements.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/UIElementsSchema/UnityEngine.UIElements.xsd" beforeDir="false" afterPath="$PROJECT_DIR$/UIElementsSchema/UnityEngine.UIElements.xsd" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/AI NPC/RagNPC.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/AI NPC/RagNPC.cs.meta" beforeDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -41,7 +18,7 @@
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="EmbeddingIndexingInfo">
<option name="cachedIndexableFilesCount" value="77" />
<option name="cachedIndexableFilesCount" value="78" />
<option name="fileBasedEmbeddingIndicesEnabled" value="true" />
</component>
<component name="Git.Settings">
@@ -204,6 +181,8 @@
<workItem from="1780409218377" duration="9852000" />
<workItem from="1780494322686" duration="643000" />
<workItem from="1780633654231" duration="23904000" />
<workItem from="1780674685197" duration="1960000" />
<workItem from="1780709383381" duration="1351000" />
</task>
<servers />
</component>

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ebed31fbd0a3be4499c2fe54022858b7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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:

View File

@@ -5218,9 +5218,9 @@ Material:
- _OutlineWidth: 0
- _PerspectiveFilter: 0.875
- _Reflectivity: 10
- _ScaleRatioA: 1
- _ScaleRatioB: 1
- _ScaleRatioC: 1
- _ScaleRatioA: 0.9
- _ScaleRatioB: 0.73125
- _ScaleRatioC: 0.73125
- _ScaleX: 1
- _ScaleY: 1
- _ShaderFlags: 0

144
Assets/Materials/skubox.mat Normal file
View File

@@ -0,0 +1,144 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-6888318783798700149
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: skubox
m_Shader: {fileID: 108, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords:
- _MAPPING_LATITUDE_LONGITUDE_LAYOUT
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: f6c8ebeb4fbe2954ba666fb8de1138f1, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _Exposure: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _ImageType: 0
- _Layout: 0
- _Mapping: 1
- _Metallic: 0
- _MirrorOnBack: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Rotation: 0
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _XRMotionVectorsPass: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
m_BuildTextureStacks: []
m_AllowLocking: 1

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7adfd3fc58213974581401c16602cb05
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -37,6 +37,7 @@ Material:
disabledShaderPasses:
- MOTIONVECTORS
- DepthOnly
- SHADOWCASTER
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
@@ -66,7 +67,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: 2b09e034ca4296047993ed266a80d617, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:

View File

@@ -132,7 +132,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.066176444, g: 0.066176444, b: 0.066176444, a: 0.9338235}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.06617642, g: 0.06617642, b: 0.06617642, a: 0.9338235}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@@ -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: []

View File

@@ -225,7 +225,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!4 &5863061020199015852
Transform:
m_ObjectHideFlags: 0
@@ -235,7 +235,7 @@ Transform:
m_GameObject: {fileID: 5687887011233860168}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.041, y: 1.5, z: -0.007}
m_LocalPosition: {x: 0.041, y: 1.5, z: 0.595}
m_LocalScale: {x: 0.05, y: 0.05, z: 0.05}
m_ConstrainProportionsScale: 1
m_Children: []
@@ -471,6 +471,8 @@ GameObject:
- component: {fileID: 8239948856752686218}
- component: {fileID: 6469822191588635990}
- component: {fileID: 9027690817715396964}
- component: {fileID: 2252266660326254214}
- component: {fileID: 4329414276869835007}
m_Layer: 0
m_Name: xNPC
m_TagString: Enemy
@@ -509,19 +511,31 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::EnemyAI
player: {fileID: 0}
moveSpeed: 3
rotateSpeed: 50
patrolWaypoints: []
currentWaypointIndex: 0
moveSpeed: 5
rotateSpeed: 20
patrolWaitTime: 2
patrolSpeed: 2
patrolRadius: 100
playerHasArtifact: 0
isAggroedBySound: 0
laserPrefab: {fileID: 3965388737199864462, guid: fbec2b501d70daa4c9cb481ba53fc0b8, type: 3}
firePoint: {fileID: 5863061020199015852}
minShootDelay: 1
maxShootDelay: 3
dodgeForce: 8
maxShootDelay: 5
dodgeForce: 3
dodgeDuration: 0.5
dodgeCooldown: 3
dodgeCooldown: 2
isPanicking: 0
isEnraged: 0
panicHealthThreshold: 40
regenRate: 2
regenDelay: 2
minStrafeDuration: 0.5
maxStrafeDuration: 2.2
maxSpreadAngle: 10
burstInterval: 0.12
approachWeight: 0.35
minCombatDistance: 5
npcName: Guard
persona: You are a grumpy guard protecting gold.
talkRange: 5
@@ -609,20 +623,13 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7522161431095319480}
m_Enabled: 0
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 35bba55c2a743d042ab1fff35e29db50, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::AnimatorAI
debugMode: 1
debugColor: {r: 1, g: 0, b: 0.21842146, a: 1}
useSimulation: 0
autoCycleSpeed: 0
simVerticalVelocity: 0
simIsSprinting: 0
simIsAiming: 0
simMoveSetID: 0
sprintThreshold: 0.8
forceGrounded: 1
movementBoost: 1.5
dampTime: 0.1
--- !u!136 &9027690817715396964
CapsuleCollider:
@@ -643,10 +650,66 @@ CapsuleCollider:
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.37279892
m_Radius: 0.4324358
m_Height: 1.8474874
m_Direction: 1
m_Center: {x: 0, y: 0.92911196, z: -0.24853802}
m_Center: {x: 0, y: 0.92911196, z: 0.11156863}
--- !u!114 &2252266660326254214
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7522161431095319480}
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: []
--- !u!114 &4329414276869835007
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7522161431095319480}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9d3efef3ad62cd548b0f85eb11858ed1, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::Invector.vHitDamageParticle
openCloseEvents: 0
openCloseWindow: 1
selectedToolbar: 0
defaultDamageEffects:
- {fileID: 120346, guid: b8f2fe1ee1a01724cb72f5b0e6bd2eef, type: 3}
customDamageEffects: []
--- !u!1001 &7561534673732472622
PrefabInstance:
m_ObjectHideFlags: 0
@@ -702,18 +765,18 @@ PrefabInstance:
- target: {fileID: 9500000, guid: f32cd9f795c1282478d3bc3fbd8b2831, type: 3}
propertyPath: m_Avatar
value:
objectReference: {fileID: 9000000, guid: 340f99b8334a14c4a8a01dce6e1e5348, type: 3}
objectReference: {fileID: 9000000, guid: f32cd9f795c1282478d3bc3fbd8b2831, type: 3}
- target: {fileID: 9500000, guid: f32cd9f795c1282478d3bc3fbd8b2831, type: 3}
propertyPath: m_Controller
value:
objectReference: {fileID: 9100000, guid: 87885946b43e2d1449e1d5aa2042f8a8, type: 2}
- target: {fileID: 9500000, guid: f32cd9f795c1282478d3bc3fbd8b2831, type: 3}
propertyPath: m_UpdateMode
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9500000, guid: f32cd9f795c1282478d3bc3fbd8b2831, type: 3}
propertyPath: m_AnimatePhysics
value: 1
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []

View File

@@ -4197,6 +4197,11 @@ MonoBehaviour:
_spawnParticle: 1
_spawnStepMark: 1
_useTriggerEnter: 1
emitAINoise: 1
aiNoiseRange: 10
npcLayer:
serializedVersion: 2
m_Bits: 0
leftFootTrigger: {fileID: 11408204}
rightFootTrigger: {fileID: 11477308}
currentStep: {fileID: 0}

File diff suppressed because it is too large Load Diff

View File

@@ -27,12 +27,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1178214796800900241}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.076, z: 0.124}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1804537267582578112}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!135 &1178214796804358001
SphereCollider:
@@ -42,9 +43,17 @@ SphereCollider:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1178214796800900241}
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
serializedVersion: 3
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &1178214796806424509
@@ -83,6 +92,7 @@ MonoBehaviour:
inputDelay: 0.1
playAnimationWhileHoldingButton: 1
doubleButtomTime: 0.25
canDoAction: 1
actionName: Action
actionTag: Action
disableOnStart: 0
@@ -96,6 +106,7 @@ MonoBehaviour:
customCameraState: Default
playAnimation:
crossFadeTransition: 0.25
animatorLayer: 0
endActionManualy: 0
endExitTimeAnimation: 0.8
animatorActionState: 0
@@ -238,6 +249,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1178214796800926091}
m_TargetAssemblyTypeName:
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
@@ -252,6 +264,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1178214796800926091}
m_TargetAssemblyTypeName:
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
@@ -262,6 +275,9 @@ MonoBehaviour:
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
OnCancelAction:
m_PersistentCalls:
m_Calls: []
targetEquipPoint:
twoHandWeapon: 1
weapon: {fileID: 1804537267582261728}
@@ -271,6 +287,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1178214796800926091}
m_TargetAssemblyTypeName:
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
@@ -282,6 +299,7 @@ MonoBehaviour:
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 1830727322889391579}
m_TargetAssemblyTypeName:
m_MethodName: set_enabled
m_Mode: 6
m_Arguments:
@@ -296,6 +314,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1830727322889391579}
m_TargetAssemblyTypeName:
m_MethodName: set_enabled
m_Mode: 6
m_Arguments:
@@ -344,6 +363,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 8342309185592125983}
m_TargetAssemblyTypeName:
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
@@ -355,6 +375,7 @@ MonoBehaviour:
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 1770855500603019112}
m_TargetAssemblyTypeName:
m_MethodName: InstantiateObject
m_Mode: 1
m_Arguments:
@@ -371,6 +392,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 8342309185592125983}
m_TargetAssemblyTypeName:
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
@@ -387,6 +409,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName:
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
@@ -425,9 +448,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: 1178214796814376033}
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}
@@ -457,6 +480,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:
@@ -502,10 +526,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0.2619354, w: 0.9650854}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.0013280489, y: 0.0013280488, z: 0.0013280488}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1178214796814376033}
m_Father: {fileID: 1804537267582578112}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -529,7 +553,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
@@ -555,6 +581,7 @@ MonoBehaviour:
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!114 &1178214796806402205
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -636,9 +663,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: 1178214796814376033}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -668,6 +695,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:
@@ -715,12 +743,12 @@ RectTransform:
m_LocalRotation: {x: 0, y: -1, z: 0, w: 0.00000041723246}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1178214796814260335}
- {fileID: 1178214796814260911}
- {fileID: 1178214796814384871}
m_Father: {fileID: 1178214796814369163}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -750,6 +778,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:
@@ -780,6 +809,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1178214796800906329}
m_TargetAssemblyTypeName:
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
@@ -791,6 +821,7 @@ MonoBehaviour:
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 1178214796801013577}
m_TargetAssemblyTypeName:
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
@@ -808,6 +839,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1178214796800906329}
m_TargetAssemblyTypeName:
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
@@ -819,6 +851,7 @@ MonoBehaviour:
m_BoolArgument: 1
m_CallState: 2
- m_Target: {fileID: 1178214796801013577}
m_TargetAssemblyTypeName:
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
@@ -857,9 +890,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: 1178214796814376033}
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}
@@ -889,6 +922,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:
@@ -903,40 +937,12 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!54 &5753856815630206312
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1804537267582261728}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!65 &6470183431665213616
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1804537267582261728}
m_Material: {fileID: 13400000, guid: c77abc477d4de2a4197e1f08cebc364e, type: 2}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 0.11955705, y: 0.17964685, z: 0.85108244}
m_Center: {x: -0.0013062507, y: 0.054864466, z: 0.13716096}
--- !u!1001 &1804537267582149120
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 130016, guid: 95173cd142940384c81611787936f938, type: 3}
@@ -991,20 +997,32 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 11429992, guid: 95173cd142940384c81611787936f938, type: 3}
propertyPath: selectedToolbar
value: 2
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 114382262437889658, guid: 95173cd142940384c81611787936f938, type: 3}
- {fileID: 3978637271864031997, guid: 95173cd142940384c81611787936f938, type: 3}
m_RemovedGameObjects: []
m_AddedGameObjects:
- targetCorrespondingSourceObject: {fileID: 430016, guid: 95173cd142940384c81611787936f938, type: 3}
insertIndex: -1
addedObject: {fileID: 1178214796814369163}
- targetCorrespondingSourceObject: {fileID: 430016, guid: 95173cd142940384c81611787936f938, type: 3}
insertIndex: -1
addedObject: {fileID: 1178214796800604863}
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 130016, guid: 95173cd142940384c81611787936f938, type: 3}
insertIndex: -1
addedObject: {fileID: 5753856815630206312}
- targetCorrespondingSourceObject: {fileID: 130016, guid: 95173cd142940384c81611787936f938, type: 3}
insertIndex: -1
addedObject: {fileID: 6470183431665213616}
m_SourcePrefab: {fileID: 100100000, guid: 95173cd142940384c81611787936f938, type: 3}
--- !u!4 &1804537267582578112 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 430016, guid: 95173cd142940384c81611787936f938,
type: 3}
m_PrefabInstance: {fileID: 1804537267582149120}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1770855500603019112 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 114937068035861864, guid: 95173cd142940384c81611787936f938,
type: 3}
m_CorrespondingSourceObject: {fileID: 114937068035861864, guid: 95173cd142940384c81611787936f938, type: 3}
m_PrefabInstance: {fileID: 1804537267582149120}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
@@ -1013,15 +1031,66 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: de8c6f6fb33efc547afa68f68e220d74, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &8342309185592125983 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 7696325297335060511, guid: 95173cd142940384c81611787936f938,
type: 3}
m_PrefabInstance: {fileID: 1804537267582149120}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1804537267582261728 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 130016, guid: 95173cd142940384c81611787936f938,
type: 3}
m_CorrespondingSourceObject: {fileID: 130016, guid: 95173cd142940384c81611787936f938, type: 3}
m_PrefabInstance: {fileID: 1804537267582149120}
m_PrefabAsset: {fileID: 0}
--- !u!54 &5753856815630206312
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1804537267582261728}
serializedVersion: 5
m_Mass: 1
m_LinearDamping: 0
m_AngularDamping: 0.05
m_CenterOfMass: {x: 0, y: 0, z: 0}
m_InertiaTensor: {x: 1, y: 1, z: 1}
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!65 &6470183431665213616
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1804537267582261728}
m_Material: {fileID: 13400000, guid: c77abc477d4de2a4197e1f08cebc364e, type: 2}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 0.11955705, y: 0.17964685, z: 0.85108244}
m_Center: {x: -0.0013062507, y: 0.054864466, z: 0.13716096}
--- !u!4 &1804537267582578112 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 430016, guid: 95173cd142940384c81611787936f938, type: 3}
m_PrefabInstance: {fileID: 1804537267582149120}
m_PrefabAsset: {fileID: 0}
--- !u!1 &8342309185592125983 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 7696325297335060511, guid: 95173cd142940384c81611787936f938, type: 3}
m_PrefabInstance: {fileID: 1804537267582149120}
m_PrefabAsset: {fileID: 0}

View File

@@ -1,34 +1,5 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!54 &4054124028099797856
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4881589711078705830}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!65 &7941838468431302446
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4881589711078705830}
m_Material: {fileID: 13400000, guid: c77abc477d4de2a4197e1f08cebc364e, type: 2}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 0.12160286, y: 0.2082051, z: 0.32264447}
m_Center: {x: 0.021650568, y: 0.006185949, z: 0.103613794}
--- !u!1 &7903731139681717537
GameObject:
m_ObjectHideFlags: 0
@@ -55,12 +26,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7903731139681717537}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.056, z: 0.087}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4881589711078555334}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!135 &7903731139668604497
SphereCollider:
@@ -70,9 +42,17 @@ SphereCollider:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7903731139681717537}
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
serializedVersion: 3
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &7903731139670676279
@@ -111,6 +91,7 @@ MonoBehaviour:
inputDelay: 0.1
playAnimationWhileHoldingButton: 1
doubleButtomTime: 0.25
canDoAction: 1
actionName: Action
actionTag: Action
disableOnStart: 0
@@ -124,6 +105,7 @@ MonoBehaviour:
customCameraState: Default
playAnimation:
crossFadeTransition: 0.25
animatorLayer: 0
endActionManualy: 0
endExitTimeAnimation: 0.8
animatorActionState: 0
@@ -266,6 +248,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 7903731139681943551}
m_TargetAssemblyTypeName:
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
@@ -280,6 +263,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 7903731139681943551}
m_TargetAssemblyTypeName:
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
@@ -290,6 +274,9 @@ MonoBehaviour:
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
OnCancelAction:
m_PersistentCalls:
m_Calls: []
targetEquipPoint:
twoHandWeapon: 1
weapon: {fileID: 4881589711078705830}
@@ -299,6 +286,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 7903731139681943551}
m_TargetAssemblyTypeName:
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
@@ -356,12 +344,12 @@ RectTransform:
m_LocalRotation: {x: 0, y: -1, z: 0, w: 0.00000041723246}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7903731139695343497}
- {fileID: 7903731139695326533}
- {fileID: 7903731139695282545}
m_Father: {fileID: 7903731139695313889}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -391,6 +379,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:
@@ -421,6 +410,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 7903731139681958997}
m_TargetAssemblyTypeName:
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
@@ -432,6 +422,7 @@ MonoBehaviour:
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 7903731139681936937}
m_TargetAssemblyTypeName:
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
@@ -449,6 +440,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 7903731139681958997}
m_TargetAssemblyTypeName:
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
@@ -460,6 +452,7 @@ MonoBehaviour:
m_BoolArgument: 1
m_CallState: 2
- m_Target: {fileID: 7903731139681936937}
m_TargetAssemblyTypeName:
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
@@ -498,9 +491,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: 7903731139695298027}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -530,6 +523,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:
@@ -576,9 +570,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: 7903731139695298027}
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}
@@ -608,6 +602,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:
@@ -653,10 +648,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.0013280489, y: 0.0013280488, z: 0.0013280488}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7903731139695298027}
m_Father: {fileID: 4881589711078555334}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -680,7 +675,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
@@ -706,6 +703,7 @@ MonoBehaviour:
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!114 &7903731139670638581
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -787,9 +785,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: 7903731139695298027}
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}
@@ -819,6 +817,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:
@@ -838,6 +837,7 @@ PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 170828, guid: a0ef3c70b27799d409935f45a6537bb0, type: 3}
@@ -892,19 +892,88 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 11470846, guid: a0ef3c70b27799d409935f45a6537bb0, type: 3}
propertyPath: hitLayer.m_Bits
value: 4294967295
objectReference: {fileID: 0}
- target: {fileID: 11470846, guid: a0ef3c70b27799d409935f45a6537bb0, type: 3}
propertyPath: selectedToolbar
value: 2
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 114790386807353386, guid: a0ef3c70b27799d409935f45a6537bb0, type: 3}
- {fileID: 114554122684540132, guid: a0ef3c70b27799d409935f45a6537bb0, type: 3}
m_RemovedGameObjects: []
m_AddedGameObjects:
- targetCorrespondingSourceObject: {fileID: 470828, guid: a0ef3c70b27799d409935f45a6537bb0, type: 3}
insertIndex: -1
addedObject: {fileID: 7903731139695313889}
- targetCorrespondingSourceObject: {fileID: 470828, guid: a0ef3c70b27799d409935f45a6537bb0, type: 3}
insertIndex: -1
addedObject: {fileID: 7903731139681598825}
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 170828, guid: a0ef3c70b27799d409935f45a6537bb0, type: 3}
insertIndex: -1
addedObject: {fileID: 4054124028099797856}
- targetCorrespondingSourceObject: {fileID: 170828, guid: a0ef3c70b27799d409935f45a6537bb0, type: 3}
insertIndex: -1
addedObject: {fileID: 7941838468431302446}
m_SourcePrefab: {fileID: 100100000, guid: a0ef3c70b27799d409935f45a6537bb0, type: 3}
--- !u!4 &4881589711078555334 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 470828, guid: a0ef3c70b27799d409935f45a6537bb0,
type: 3}
m_CorrespondingSourceObject: {fileID: 470828, guid: a0ef3c70b27799d409935f45a6537bb0, type: 3}
m_PrefabInstance: {fileID: 4881589711078871530}
m_PrefabAsset: {fileID: 0}
--- !u!1 &4881589711078705830 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 170828, guid: a0ef3c70b27799d409935f45a6537bb0,
type: 3}
m_CorrespondingSourceObject: {fileID: 170828, guid: a0ef3c70b27799d409935f45a6537bb0, type: 3}
m_PrefabInstance: {fileID: 4881589711078871530}
m_PrefabAsset: {fileID: 0}
--- !u!54 &4054124028099797856
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4881589711078705830}
serializedVersion: 5
m_Mass: 1
m_LinearDamping: 0
m_AngularDamping: 0.05
m_CenterOfMass: {x: 0, y: 0, z: 0}
m_InertiaTensor: {x: 1, y: 1, z: 1}
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!65 &7941838468431302446
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4881589711078705830}
m_Material: {fileID: 13400000, guid: c77abc477d4de2a4197e1f08cebc364e, type: 2}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 0.12160286, y: 0.2082051, z: 0.32264447}
m_Center: {x: 0.021650568, y: 0.006185949, z: 0.103613794}

View File

@@ -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:

View File

@@ -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,8 +661,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
openCloseEvents: 0
openCloseWindow: 0
selectedToolbar: 0
openCloseWindow: 1
selectedToolbar: 2
inputType: 0
actionInput:
useInput: 1
@@ -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

View File

@@ -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
@@ -275,5 +275,5 @@ Rigidbody:
m_UseGravity: 1
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
m_Constraints: 112
m_CollisionDetection: 1

View File

@@ -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

View File

@@ -1,315 +1,163 @@
using UnityEngine;
using UnityEngine.AI;
using Invector;
using Invector.vEventSystems;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// AnimatorAI: Đồng bộ hóa trạng thái của EnemyAI với Animator.
/// Tích hợp Simulation Mode để giả lập animation khi chưa có logic di chuyển hoàn chỉnh.
/// </summary>
public class AnimatorAI : MonoBehaviour
public class AnimatorAI : MonoBehaviour, vIAnimatorStateInfoController
{
protected Animator animator;
protected EnemyAI enemyAI;
protected NavMeshAgent agent;
protected Rigidbody rb;
protected vHealthController healthController;
protected EnemyAI enemyAI;
protected KamikazeAI kamikazeAI;
[Header("Debug Settings")]
public bool debugMode = true;
public Color debugColor = Color.cyan;
[Header("Force Settings")]
public bool forceGrounded = true;
public float movementBoost = 1.2f;
public float dampTime = 0.1f;
[Header("Simulation Mode (Giả lập)")]
public bool useSimulation = false; // Tích chọn để dùng thông số giả lập bên dưới
public bool autoCycleSpeed = false; // Tự động chạy/đi bộ/đứng im theo vòng lặp
[Range(0, 1)] public float simVerticalVelocity = 0f;
public bool simIsSprinting = false;
public bool simIsAiming = false;
public int simMoveSetID = 0;
public vAnimatorStateInfos animatorStateInfos { get; protected set; }
[Header("Movement Settings")]
public float sprintThreshold = 0.8f;
public float dampTime = 0.1f;
#region Animator Parameters (Invector Style)
protected vAnimatorParameter isDead;
protected vAnimatorParameter isGrounded;
protected vAnimatorParameter isCrouching;
protected vAnimatorParameter isStrafing;
protected vAnimatorParameter isSliding;
protected vAnimatorParameter isSprinting;
protected vAnimatorParameter isAiming;
protected vAnimatorParameter canAim;
protected vAnimatorParameter flipAnimation;
protected vAnimatorParameter flipEquip;
protected vAnimatorParameter groundDistance;
protected vAnimatorParameter groundAngle;
protected vAnimatorParameter verticalVelocity;
protected vAnimatorParameter moveSet_ID;
protected vAnimatorParameter upperBody_ID;
protected vAnimatorParameter idleRandom;
protected vAnimatorParameter idleRandomTrigger;
protected vAnimatorParameter randomAttack;
protected vAnimatorParameter weakAttack;
protected vAnimatorParameter strongAttack;
protected vAnimatorParameter isBlocking;
protected vAnimatorParameter attackID;
protected vAnimatorParameter defenseID;
protected vAnimatorParameter recoilID;
protected vAnimatorParameter reactionID;
protected vAnimatorParameter triggerRecoil;
protected vAnimatorParameter triggerReaction;
protected vAnimatorParameter hitDirection;
protected vAnimatorParameter resetState;
protected vAnimatorParameter reload;
protected vAnimatorParameter cancelReload;
protected vAnimatorParameter reloadID;
protected vAnimatorParameter shoot;
protected vAnimatorParameter shot_ID;
protected vAnimatorParameter powerCharger;
#region Animator Parameters
protected vAnimatorParameter isDead, isGrounded, isStrafing, isSprinting, isAiming;
protected vAnimatorParameter verticalVelocity, horizontalVelocity, inputMagnitude;
protected vAnimatorParameter groundDistance, moveSet_ID, attackID, triggerReaction, resetState;
#endregion
[Header("Nuclear Diagnostic (Siêu chẩn đoán)")]
public string forcePlayState = ""; // Gõ tên State vào đây để ép nó chạy (vd: Idle)
public bool showLayerWeights = false;
protected Vector3 lastPosition;
protected float currentV, currentH, currentMagnitude, calculatedSpeed;
protected virtual void Start()
protected virtual void Awake()
{
animator = GetComponentInChildren<Animator>();
enemyAI = GetComponent<EnemyAI>();
if (animator == null) animator = GetComponentInParent<Animator>();
agent = GetComponent<NavMeshAgent>();
rb = GetComponent<Rigidbody>();
if (agent == null) agent = GetComponentInParent<NavMeshAgent>();
if (animator == null)
healthController = GetComponentInChildren<vHealthController>();
enemyAI = GetComponent<EnemyAI>();
kamikazeAI = GetComponent<KamikazeAI>();
if (animator)
{
Debug.LogError($"<color=red>[AnimatorAI]</color> KHÔNG tìm thấy Animator trên {gameObject.name} hoặc các con của nó!");
return;
animator.applyRootMotion = false;
animator.updateMode = AnimatorUpdateMode.Normal;
// Reset all layers initially to prevent T-Pose
for (int i = 1; i < animator.layerCount; i++) animator.SetLayerWeight(i, 0f);
animatorStateInfos = new vAnimatorStateInfos(animator);
InitializeParameters();
Debug.Log($"<color=green>[AnimSystem]</color> Đã kích hoạt trên {gameObject.name}");
}
// Chạy chẩn đoán hạt nhân
StartCoroutine(NuclearDiagnosticRoutine());
InitializeParameters();
lastPosition = transform.position;
}
private IEnumerator NuclearDiagnosticRoutine()
{
while (true)
{
yield return new WaitForSeconds(1f);
if (animator == null) yield break;
// 1. Kiểm tra Enabled
if (!animator.enabled)
Debug.LogError($"<color=red>[NUCLEAR ALERT]</color> Component Animator đang bị TẮT (enabled = false)!");
// 2. Kiểm tra Rig Type
if (animator.isHuman)
Debug.Log($"<color=white>[Rig Info]</color> Rig là Humanoid. Hãy chắc chắn các Animation cũng là Humanoid.");
else
Debug.LogWarning($"<color=yellow>[Rig Info]</color> Rig là Generic/Legacy. Nếu bạn dùng Animation Humanoid nó sẽ không chạy.");
// 3. Kiểm tra Layer Weight
if (showLayerWeights)
{
for (int i = 0; i < animator.layerCount; i++)
{
Debug.Log($"Layer {i} ({animator.GetLayerName(i)}): Weight = {animator.GetLayerWeight(i)}");
}
}
// 4. Ép chạy State nếu có yêu cầu
if (!string.IsNullOrEmpty(forcePlayState))
{
Debug.Log($"<color=magenta>[Nuclear Force]</color> ÉP CHẠY STATE: {forcePlayState}");
animator.Play(forcePlayState);
forcePlayState = ""; // Reset sau khi chạy
}
// 5. Kiểm tra vị trí xương (Nếu T-pose thì thường xương không đổi vị trí)
Vector3 handPos = animator.GetBoneTransform(HumanBodyBones.RightHand) ? animator.GetBoneTransform(HumanBodyBones.RightHand).position : Vector3.zero;
yield return new WaitForSeconds(0.1f);
if (handPos != Vector3.zero && Vector3.Distance(handPos, animator.GetBoneTransform(HumanBodyBones.RightHand).position) < 0.001f && animator.speed > 0)
{
// Nếu xương không nhúc nhích dù tốc độ > 0
Debug.LogWarning($"<color=red>[NUCLEAR ALERT]</color> CẢNH BÁO: Xương nhân vật không nhúc nhích! Có thể do Rig lỗi hoặc bị script khác khóa xương.");
}
if (!useSimulation) yield break;
}
}
protected virtual void OnEnable() { this.Register(); }
protected virtual void OnDisable() { this.UnRegister(); }
protected virtual void InitializeParameters()
{
if (animator == null) return;
// Khởi tạo và kiểm tra từng tham số quan trọng
isDead = ValidateAndInit("isDead");
isGrounded = ValidateAndInit("IsGrounded");
isCrouching = ValidateAndInit("IsCrouching");
isGrounded = ValidateAndInit("isGrounded");
if (!isGrounded.isValid) isGrounded = ValidateAndInit("IsGrounded");
isStrafing = ValidateAndInit("IsStrafing");
isSliding = ValidateAndInit("IsSliding");
isSprinting = ValidateAndInit("IsSprinting");
isAiming = ValidateAndInit("IsAiming");
canAim = ValidateAndInit("CanAim");
flipAnimation = ValidateAndInit("FlipAnimation");
flipEquip = ValidateAndInit("FlipEquip");
verticalVelocity = ValidateAndInit("InputVertical");
horizontalVelocity = ValidateAndInit("InputHorizontal");
inputMagnitude = ValidateAndInit("InputMagnitude");
groundDistance = ValidateAndInit("GroundDistance");
groundAngle = ValidateAndInit("GroundAngle");
verticalVelocity = ValidateAndInit("VerticalVelocity");
moveSet_ID = ValidateAndInit("MoveSet_ID");
upperBody_ID = ValidateAndInit("UpperBody_ID");
idleRandom = ValidateAndInit("IdleRandom");
idleRandomTrigger = ValidateAndInit("IdleRandomTrigger");
randomAttack = ValidateAndInit("RandomAttack");
weakAttack = ValidateAndInit("WeakAttack");
strongAttack = ValidateAndInit("StrongAttack");
isBlocking = ValidateAndInit("IsBlocking");
attackID = ValidateAndInit("AttackID");
defenseID = ValidateAndInit("DefenseID");
recoilID = ValidateAndInit("RecoilID");
reactionID = ValidateAndInit("ReactionID");
triggerRecoil = ValidateAndInit("TriggerRecoil");
triggerReaction = ValidateAndInit("TriggerReaction");
hitDirection = ValidateAndInit("HitDirection");
resetState = ValidateAndInit("ResetState");
reload = ValidateAndInit("Reload");
cancelReload = ValidateAndInit("CancelReload");
reloadID = ValidateAndInit("ReloadID");
shoot = ValidateAndInit("Shoot");
shot_ID = ValidateAndInit("Shot_ID");
powerCharger = ValidateAndInit("PowerCharger");
}
private vAnimatorParameter ValidateAndInit(string paramName)
{
vAnimatorParameter p = new vAnimatorParameter(animator, paramName);
if (!p.isValid && debugMode)
{
// Chỉ cảnh báo những biến cốt lõi nếu thiếu
if (paramName == "VerticalVelocity" || paramName == "IsGrounded" || paramName == "IsAiming")
Debug.LogWarning($"<color=yellow>[AnimatorAI]</color> Cảnh báo: Controller thiếu biến quan trọng: <b>{paramName}</b>");
}
return p;
}
private vAnimatorParameter ValidateAndInit(string pName) => new vAnimatorParameter(animator, pName);
protected virtual void Update()
{
if (animator == null) return;
if (animator == null || agent == null) return;
if (useSimulation)
{
RunSimulation();
}
else
{
if (enemyAI == null || agent == null) return;
UpdateMovementParameters();
UpdateCombatParameters();
}
}
protected virtual void RunSimulation()
{
// 1. Giả lập tốc độ di chuyển
if (autoCycleSpeed)
{
// Tạo vòng lặp tốc độ từ 0 đến 1 dùng hàm Sin
simVerticalVelocity = Mathf.Abs(Mathf.Sin(Time.time * 0.5f));
simIsSprinting = simVerticalVelocity > sprintThreshold;
}
SetFloat(verticalVelocity, simVerticalVelocity, "SIM: VerticalVelocity");
SetBool(isSprinting, simIsSprinting, "SIM: IsSprinting");
SetBool(isGrounded, true, "SIM: IsGrounded"); // Luôn giả lập trên mặt đất
// 2. Giả lập chiến đấu
SetBool(isAiming, simIsAiming, "SIM: IsAiming");
SetInt(moveSet_ID, simMoveSetID, "SIM: MoveSet_ID");
SetBool(canAim, simIsAiming, "SIM: CanAim");
UpdateMovementParameters();
UpdateCombatParameters();
}
protected virtual void UpdateMovementParameters()
{
bool grounded = agent.isOnNavMesh || agent.enabled;
SetBool(isGrounded, grounded, "IsGrounded");
SetBool(isGrounded, forceGrounded);
SetFloat(groundDistance, 0f);
float speed = agent.velocity.magnitude / enemyAI.moveSpeed;
SetFloat(verticalVelocity, speed, "VerticalVelocity");
Vector3 delta = transform.position - lastPosition;
calculatedSpeed = delta.magnitude / Time.deltaTime;
lastPosition = transform.position;
bool sprinting = agent.velocity.magnitude > (enemyAI.moveSpeed * sprintThreshold);
SetBool(isSprinting, sprinting, "IsSprinting");
Vector3 localVel = transform.InverseTransformDirection(delta / Time.deltaTime);
float maxS = (enemyAI) ? enemyAI.moveSpeed : (kamikazeAI ? agent.speed : 3f);
if (maxS <= 0) maxS = 3f;
bool isDodging = !agent.enabled && !rb.isKinematic;
SetBool(flipAnimation, isDodging, "FlipAnimation (Dodge)");
float targetV = (localVel.z / maxS) * movementBoost;
float targetH = (localVel.x / maxS) * movementBoost;
currentV = Mathf.Lerp(currentV, targetV, 10f * Time.deltaTime);
currentH = Mathf.Lerp(currentH, targetH, 10f * Time.deltaTime);
currentMagnitude = new Vector2(currentH, currentV).magnitude;
// ÉP GIÁ TRỊ VÀO ANIMATOR
SetFloat(verticalVelocity, currentV);
SetFloat(horizontalVelocity, currentH);
SetFloat(inputMagnitude, currentMagnitude);
}
protected virtual void UpdateCombatParameters()
{
bool aiming = enemyAI.playerHasArtifact && agent.isStopped;
SetBool(isAiming, aiming, "IsAiming");
// 1. Kiểm tra trạng thái AI
bool isShooting = (enemyAI && enemyAI.IsShootingBurst);
bool hasArtifact = (enemyAI && enemyAI.playerHasArtifact);
int moveID = enemyAI.playerHasArtifact ? 1 : 0;
SetInt(moveSet_ID, moveID, "MoveSet_ID");
// 2. Cập nhật MoveSet và Aiming
SetInt(moveSet_ID, hasArtifact ? 1 : 0);
SetBool(isAiming, hasArtifact);
SetBool(isStrafing, hasArtifact);
SetBool(canAim, enemyAI.playerHasArtifact, "CanAim");
// 3. Xử lý BẮN SÚNG (Layer 6 trong Animator của bạn)
if (isShooting)
{
// Bật Layer bắn súng lên 1 (Smooth)
animator.SetLayerWeight(6, Mathf.Lerp(animator.GetLayerWeight(6), 1f, 15f * Time.deltaTime));
SetInt(attackID, 1); // Kích hoạt animation bắn trong Blend Tree của Layer 6
}
else
{
// Tắt Layer bắn súng về 0
animator.SetLayerWeight(6, Mathf.Lerp(animator.GetLayerWeight(6), 0f, 10f * Time.deltaTime));
SetInt(attackID, 0);
}
if (enemyAI && enemyAI.IsDodging) SetAnimatorTrigger(triggerReaction);
}
#region Optimized Setters with Debug
#region Helpers
protected void SetBool(vAnimatorParameter p, bool v) { if (p.isValid) animator.SetBool(p, v); }
protected void SetFloat(vAnimatorParameter p, float v) { if (p.isValid) animator.SetFloat(p, v, dampTime, Time.deltaTime); }
protected void SetInt(vAnimatorParameter p, int v) { if (p.isValid) animator.SetInteger(p, v); }
protected void SetBool(vAnimatorParameter param, bool value, string name)
{
if (param.isValid)
{
bool current = animator.GetBool(param);
if (current != value)
{
animator.SetBool(param, value);
if (debugMode) Debug.Log($"<color=cyan>[AnimDebug]</color> {gameObject.name}: <b>{name}</b> -> {value}");
}
}
public void SetAnimatorTrigger(vAnimatorParameter trigger)
{
if (trigger.isValid) StartCoroutine(SetTriggerRoutine(trigger));
}
protected void SetFloat(vAnimatorParameter param, float value, string name)
{
if (param.isValid)
{
animator.SetFloat(param, value, dampTime, Time.deltaTime);
}
private IEnumerator SetTriggerRoutine(int targetHash)
{
animator.SetTrigger(targetHash);
yield return new WaitForSeconds(0.1f);
animator.ResetTrigger(targetHash);
}
protected void SetInt(vAnimatorParameter param, int value, string name)
{
if (param.isValid)
{
int current = animator.GetInteger(param);
if (current != value)
{
animator.SetInteger(param, value);
if (debugMode) Debug.Log($"<color=orange>[AnimDebug]</color> {gameObject.name}: <b>{name}</b> -> {value}");
}
}
}
#endregion
#region Helper Methods (Triggers)
public virtual void SetAnimatorTrigger(vAnimatorParameter trigger, string name = "Trigger")
{
if (trigger.isValid)
{
if (debugMode) Debug.Log($"<color=yellow>[AnimDebug]</color> {gameObject.name}: Kích hoạt <b>{name}</b>");
StartCoroutine(SetTriggerRoutine(trigger));
}
}
private IEnumerator SetTriggerRoutine(int targetHash)
{
animator.SetTrigger(targetHash);
yield return new WaitForSeconds(0.1f);
animator.ResetTrigger(targetHash);
}
#endregion
}

View File

@@ -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);
}
}

View File

@@ -5,14 +5,24 @@ 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; }
public class DialogueResult
{
public string text;
public float speedMod;
public float suspicionMod;
public float aggressionMod; // Ảnh hưởng delay bắn (0.1 -> 1.0)
public float braveryMod; // Ảnh hưởng ngưỡng Panic
public float healthMod; // Hồi máu hoặc mất máu tâm lý
}
// 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
[RequireComponent(typeof(NavMeshAgent))]
[RequireComponent(typeof(Rigidbody))]
[RequireComponent(typeof(vHealthController))]
public class EnemyAI : MonoBehaviour
{
[Header("References")]
@@ -20,56 +30,73 @@ 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;
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;
public GameObject laserPrefab;
public Transform firePoint;
public float minShootDelay = 1.5f; // Delay giữa các LOẠT BẮN
public float maxShootDelay = 3.5f;
public float minShootDelay = 1.8f; // Tăng nhẹ delay để đỡ khó
public float maxShootDelay = 4.0f;
private float nextShootTime;
[Header("Dodge Settings")]
public float dodgeForce = 10f;
public float dodgeForce = 8f;
public float dodgeDuration = 0.2f;
public float dodgeCooldown = 1.2f;
public float dodgeCooldown = 2.0f; // Tăng cooldown né đòn
private bool isDodging = false;
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ì")]
[Header("Advanced AI States")]
public bool isPanicking = false;
public bool isEnraged = false;
public float panicHealthThreshold = 50f; // Chạy ngược lại khi < 50% máu
public float regenRate = 1.5f;
public float regenDelay = 5f;
private float lastDamageTime;
[Header("Personality (Randomized)")]
private float personalApproachWeight;
private float personalMinCombatDistance;
private float personalBurstMax;
private float personalStrafeIntensity;
[Header("Artifact Combat Upgrades")]
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 maxSpreadAngle = 7f;
public float burstInterval = 0.15f;
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;
[Header("Conversation Settings")]
public string npcName = "Guard";
[TextArea] public string persona = "You are a bored security guard. You love coffee and hate night shifts.";
[TextArea] public string persona = "You are a bored security guard.";
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;
@@ -77,7 +104,7 @@ public class EnemyAI : MonoBehaviour
public float suspicionLevel = 0f;
public float investigationThreshold = 30f;
public float alertNeighborsThreshold = 70f;
public float alertRange = 20f;
public float alertRange = 30f;
public Node rootNode;
@@ -87,9 +114,35 @@ public class EnemyAI : MonoBehaviour
rb = GetComponent<Rigidbody>();
fov = GetComponent<FieldOfView>();
chatBubble = GetComponentInChildren<Hallucinate.UI.ChatBubble>(true);
mainCollider = GetComponent<Collider>();
health = GetComponent<vHealthController>();
// RANDOM TÍNH CÁCH
personalApproachWeight = Random.Range(0.2f, 0.7f);
personalMinCombatDistance = Random.Range(3f, 8f);
personalBurstMax = Random.Range(2, 5);
personalStrafeIntensity = Random.Range(0.5f, 1.5f);
health.onReceiveDamage.AddListener(OnReceiveDamage);
health.onDead.AddListener(OnDead);
if (gameObject.layer == LayerMask.NameToLayer("Default"))
{
int enemyLayer = LayerMask.NameToLayer("Enemy");
if (enemyLayer != -1)
{
gameObject.layer = enemyLayer;
Debug.Log($"[AI {npcName}] Đã chuyển sang Layer: Enemy");
}
else
{
Debug.LogWarning($"[AI {npcName}] CẢNH BÁO: Không tìm thấy Layer 'Enemy' trong Project! Hãy tạo Layer 'Enemy' để súng có thể bắn trúng.");
}
}
rb.isKinematic = true;
rb.freezeRotation = true;
startPosition = transform.position;
if (player == null)
{
@@ -103,7 +156,8 @@ 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) });
var panicSequence = new Sequence(new List<Node> { new TaskNode(CheckPanicConditions), new TaskNode(ActionRetreat) }); // Thay Panic bằng Retreat
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) });
@@ -112,6 +166,7 @@ public class EnemyAI : MonoBehaviour
rootNode = new Selector(new List<Node>
{
dodgeSequence,
panicSequence,
laserSequence,
chaseSequence,
investigateSequence,
@@ -122,82 +177,164 @@ public class EnemyAI : MonoBehaviour
void Update()
{
if (player == null) return;
if (player == null || health.isDead) return;
if (!agent.isOnNavMesh) return;
if (mainCollider != null && !mainCollider.enabled) mainCollider.enabled = true;
HandleHealthRegen();
// Decay suspicion
suspicionLevel = Mathf.Max(0, suspicionLevel - Time.deltaTime * 0.5f);
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)
{
float currentRegenSpeed = regenRate;
float healthPercent = (float)health.currentHealth / health.maxHealth;
// Tăng tốc hồi máu khi máu cực thấp (< 25%)
if (healthPercent < 0.25f)
currentRegenSpeed *= 4f;
else if (healthPercent < 0.5f)
currentRegenSpeed *= 2f;
health.AddHealth((int)(currentRegenSpeed * Time.deltaTime));
}
}
#region HEALTH EVENTS
private void OnReceiveDamage(vDamage damage)
{
lastDamageTime = Time.time;
isAggroedBySound = true;
suspicionLevel = 100f;
StopConversation();
// PHẢN ỨNG TỨC THÌ: Alert toàn bộ lân cận
AlertNeighbors(damage.hitPosition);
// PHẢN ỨNG TỨC THÌ: Reset delay bắn để phản công nhanh hoặc né
nextShootTime = Time.time + 0.5f;
// Né đòn Elden Ring (Tăng tỉ lệ né khi trúng dame)
if (Time.time > nextDodgeTime && !isDodging && Random.value < 0.7f)
{
StartCoroutine(DodgeRollRoutine());
}
// Tự động Enrage nếu bị dồn vào đường cùng (nhưng đồng thời vẫn có thể bỏ chạy nếu không phẫn nộ)
if (health.currentHealth < health.maxHealth * 0.2f && !isEnraged)
{
EnterEnrageMode();
}
}
private void OnDead(GameObject killer)
{
Debug.Log($"<color=black>[AI {npcName}] DIED.</color>");
// 1. Vô hiệu hóa va chạm và di chuyển ngay lập tức
if (mainCollider != null) mainCollider.enabled = false;
agent.enabled = false;
// 2. Kích hoạt Enrage cho đồng đội xung quanh
Collider[] hitColliders = Physics.OverlapSphere(transform.position, alertRange);
foreach (var hit in hitColliders)
{
EnemyAI ally = hit.GetComponentInParent<EnemyAI>();
if (ally != null && ally != this) ally.EnterEnrageMode();
}
// 3. Tự hủy sau 3 giây (để kịp chạy animation chết hoặc hiệu ứng)
Destroy(gameObject, 3f);
this.enabled = false;
}
public void EnterEnrageMode()
{
if (isEnraged) return;
isEnraged = true;
isPanicking = false;
moveSpeed *= 1.3f; // Giảm nhẹ buff speed
minShootDelay *= 0.6f;
maxShootDelay *= 0.6f;
if (chatBubble != null) chatBubble.Show("I'LL TAKE YOU DOWN WITH ME!", 2f);
}
#endregion
#region CONDITIONS
private NodeState CheckDodgeConditions()
{
if (playerHasArtifact) return NodeState.Failure; // Có cổ vật -> Không Dash né nữa
if (isDodging) return NodeState.Success;
if (fov != null && fov.canSeePlayer && Mouse.current.leftButton.isPressed)
// Tự né khi thấy Player đang bắn
if (fov != null && fov.canSeePlayer && Mouse.current.leftButton.isPressed && Time.time > nextDodgeTime)
return NodeState.Success;
return NodeState.Failure;
}
private NodeState CheckHasArtifact()
private NodeState CheckPanicConditions()
{
if (playerHasArtifact) StopConversation();
return playerHasArtifact ? NodeState.Success : NodeState.Failure;
if (isEnraged) return NodeState.Failure; // Đang điên thì không sợ, chiến đến chết
// Nếu máu dưới ngưỡng thiết lập (ví dụ 50%), kích hoạt trạng thái tháo chạy
if (health.currentHealth < (health.maxHealth * (panicHealthThreshold / 100f)))
{
return NodeState.Success;
}
isPanicking = false;
return NodeState.Failure;
}
private NodeState CheckCombatConditions()
{
bool shouldCombat = playerHasArtifact || isAggroedBySound || isEnraged;
if (shouldCombat) StopConversation();
return shouldCombat ? NodeState.Success : NodeState.Failure;
}
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 || (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;
}
@@ -212,14 +349,14 @@ public class EnemyAI : MonoBehaviour
public void HearNoise(Vector3 location, float volume)
{
suspicionLevel += volume * 15f;
suspicionLevel += volume * 20f;
if (fov != null) fov.lastKnownPlayerPosition = location;
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)
@@ -227,89 +364,88 @@ 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();
}
// Hành động tháo chạy khi máu thấp
private NodeState ActionRetreat()
{
isPanicking = true;
agent.isStopped = false;
agent.speed = moveSpeed * 1.3f; // Chạy nhanh hơn bình thường để thoát thân
// Tính toán hướng ngược lại với Player
Vector3 retreatDir = (transform.position - player.position).normalized;
Vector3 targetPos = transform.position + retreatDir * 15f + Random.insideUnitSphere * 5f;
if (!agent.pathPending && agent.remainingDistance < 1f)
{
NavMeshHit hit;
if (NavMesh.SamplePosition(targetPos, out hit, 10f, 1))
{
agent.SetDestination(hit.position);
}
}
if (chatBubble != null && Random.value < 0.005f) chatBubble.Show("I NEED TO RECOVER!", 1.5f);
// Khi máu đã hồi phục trên 50%, dừng chạy và quay lại tấn công
if (health.currentHealth >= health.maxHealth * 0.5f)
{
isPanicking = false;
return NodeState.Success;
}
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()
{
Debug.Log("Wandering randomly...");
isPanicking = false;
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
Vector3 randomDest = startPosition + Random.insideUnitSphere * patrolRadius;
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ờ
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);
@@ -321,111 +457,79 @@ 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;
// 1. XOAY THÂN THEO TRỤC NGANG HƯỚNG VỀ PLAYER
Vector3 bodyDir = player.position - transform.position;
bodyDir.y = 0f;
Vector3 bodyDirNormal = bodyDir.normalized;
if (bodyDir != Vector3.zero)
{
Quaternion targetRotation = Quaternion.LookRotation(bodyDirNormal);
transform.rotation = Quaternion.Slerp(transform.rotation, targetRotation, rotateSpeed * Time.deltaTime);
}
Vector3 targetPos = player.position;
if (!playerHasArtifact && fov != null && !fov.canSeePlayer && fov.lastKnownPlayerPosition != Vector3.zero)
targetPos = fov.lastKnownPlayerPosition;
Vector3 bodyDir = (targetPos - transform.position);
bodyDir.y = 0f;
if (bodyDir != Vector3.zero)
transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(bodyDir), rotateSpeed * Time.deltaTime);
// 2. RANDOM KHOẢNG CÁCH DI CHUYỂN TRÁI/PHẢI (Tính theo thời gian duy trì)
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
strafeDirectionSign = new int[] { -1, 1, 0 }[Random.Range(0, 3)];
nextStrafeChangeTime = Time.time + Random.Range(minStrafeDuration, maxStrafeDuration);
}
Vector3 moveDir = 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);
Vector3 normal = bodyDir.normalized;
moveDir = new Vector3(-normal.z, 0, normal.x) * strafeDirectionSign * personalStrafeIntensity;
float dist = Vector3.Distance(transform.position, targetPos);
if (dist > personalMinCombatDistance) moveDir += normal * personalApproachWeight;
}
// 3. XOAY HỌNG SÚNG TRỤC DỌC NHẮM VÀO NGƯỜI PLAYER
if (firePoint != null)
if (moveDir != Vector3.zero)
{
Vector3 targetCenter = player.position + Vector3.up * 1f;
Vector3 aimDir = targetCenter - firePoint.position;
if (aimDir != Vector3.zero)
{
firePoint.rotation = Quaternion.LookRotation(aimDir);
}
agent.speed = moveSpeed * (isEnraged ? 1f : 0.75f);
agent.Move(moveDir.normalized * agent.speed * Time.deltaTime);
}
// 4. RANDOM SỐ ĐẠN (1-3) & RANDOM DELAY GIỮA CÁC ĐỢT BẮN
if (firePoint != null)
firePoint.rotation = Quaternion.LookRotation((targetPos + Vector3.up * 1f) - firePoint.position);
if (Time.time >= nextShootTime && !isShootingBurst)
{
int randomBulletCount = Random.Range(1, 4); // Trả về ngẫu nhiên 1, 2, hoặc 3 viên
StartCoroutine(ShootBurstRoutine(randomBulletCount));
// Cập nhật thời gian chờ cho loạt đạn tiếp theo (Random delay)
int burstCount = Random.Range(1, (int)personalBurstMax + (isEnraged ? 2 : 0));
StartCoroutine(ShootBurstRoutine(burstCount));
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;
for (int i = 0; i < bulletCount; i++)
{
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);
}
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() { } // Hàm cũ không dùng nữa, đã có Burst lo
private NodeState ActionDodge()
{
if (!isDodging) StartCoroutine(DodgeRollRoutine());
@@ -437,16 +541,50 @@ 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.3f : dodgeForce), ForceMode.Impulse);
yield return new WaitForSeconds(dodgeDuration);
rb.linearVelocity = Vector3.zero;
rb.isKinematic = true;
agent.enabled = true;
nextDodgeTime = Time.time + (isEnraged ? dodgeCooldown * 0.6f : dodgeCooldown);
isDodging = false;
}
public void ProcessDialogueResult(string json)
{
try
{
DialogueResult result = JsonUtility.FromJson<DialogueResult>(json);
if (chatBubble != null) chatBubble.Show(result.text);
// Áp dụng modifiers từ Gemini
moveSpeed = Mathf.Clamp(moveSpeed + result.speedMod, 1f, 8f);
suspicionLevel = Mathf.Clamp(suspicionLevel + result.suspicionMod, 0, 100);
// Modifier hung hãn: giảm delay bắn (max 50%)
minShootDelay = Mathf.Clamp(minShootDelay * (1f - result.aggressionMod), 0.5f, 5f);
maxShootDelay = Mathf.Clamp(maxShootDelay * (1f - result.aggressionMod), 1f, 10f);
// Modifier can đảm: thay đổi ngưỡng panic
panicHealthThreshold = Mathf.Clamp(panicHealthThreshold - result.braveryMod, 0, 80);
// Modifier máu
if (result.healthMod != 0)
{
health.AddHealth((int)result.healthMod);
}
lastTalkTime = Time.time;
Debug.Log($"[AI {npcName}] Gemini influence: Speed:{result.speedMod}, Aggro:{result.aggressionMod}, Bravery:{result.braveryMod}");
}
catch { if (chatBubble != null) chatBubble.Show(json); }
}
public void SetTalkingPartner(EnemyAI partner) { talkingPartner = partner; }
public void FaceTarget(Vector3 pos)
{
@@ -459,13 +597,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);
}
}

View File

@@ -31,10 +31,10 @@ namespace Hallucinate.AI
private float nextRequestTime = 0f;
private string[] fallbackDialogues = {
"{ \"text\": \"Nice weather, isn't it?\", \"speedMod\": 0.0, \"suspicionMod\": -5.0 }",
"{ \"text\": \"Did you hear something? Probably just a rat.\", \"speedMod\": 0.0, \"suspicionMod\": 2.0 }",
"{ \"text\": \"I'm so tired of this shift.\", \"speedMod\": -0.1, \"suspicionMod\": 0.0 }",
"{ \"text\": \"Don't forget the coffee break later.\", \"speedMod\": 0.0, \"suspicionMod\": -2.0 }"
"{ \"text\": \"Nice weather, isn't it?\", \"speedMod\": 0.0, \"suspicionMod\": -5.0, \"aggressionMod\": 0.0, \"braveryMod\": 0.0, \"healthMod\": 0.0 }",
"{ \"text\": \"Did you hear something? Probably just a rat.\", \"speedMod\": 0.0, \"suspicionMod\": 2.0, \"aggressionMod\": 0.1, \"braveryMod\": -5.0, \"healthMod\": 0.0 }",
"{ \"text\": \"I'm so tired of this shift.\", \"speedMod\": -0.2, \"suspicionMod\": 0.0, \"aggressionMod\": -0.1, \"braveryMod\": 5.0, \"healthMod\": 0.0 }",
"{ \"text\": \"You looks strong, I should be careful.\", \"speedMod\": 0.1, \"suspicionMod\": 5.0, \"aggressionMod\": -0.2, \"braveryMod\": 10.0, \"healthMod\": 0.0 }"
};
private void Awake()
@@ -72,7 +72,15 @@ namespace Hallucinate.AI
{
activeRequests++;
string jsonInstruction = " Respond ONLY with a JSON object: { 'text': 'your dialogue', 'speedMod': 0.0, 'suspicionMod': 0.0 }.";
string jsonInstruction = " Respond ONLY with a JSON object: { " +
"'text': 'dialogue content', " +
"'speedMod': 0.0 (change movement speed), " +
"'suspicionMod': 0.0 (change suspicion level), " +
"'aggressionMod': 0.0 (0.1 to 0.5 makes NPC shoot faster, negative makes them slower), " +
"'braveryMod': 0.0 (positive makes them less likely to panic, negative makes them scared), " +
"'healthMod': 0.0 (positive heals NPC, negative damages them) " +
"}. Keep values realistic.";
string escapedPersona = persona.Replace("\"", "\\\"");
string escapedPrompt = prompt.Replace("\"", "\\\"");
@@ -80,8 +88,8 @@ namespace Hallucinate.AI
""systemInstruction"": {{""parts"": [{{ ""text"": ""{escapedPersona} {jsonInstruction}"" }}]}},
""contents"": [{{""parts"": [{{ ""text"": ""{escapedPrompt}"" }}]}}],
""generationConfig"": {{
""maxOutputTokens"": 100,
""temperature"": 0.7,
""maxOutputTokens"": 150,
""temperature"": 0.8,
""responseMimeType"": ""application/json""
}}
}}";
@@ -110,8 +118,7 @@ namespace Hallucinate.AI
Debug.LogError($"[Gemini] API Error: {request.error}");
if (request.responseCode == 429)
{
nextRequestTime = Time.time + 60f; // Lock API for 1 minute
Debug.LogWarning("Quota Exceeded. API locked for 60s. Using fallback.");
nextRequestTime = Time.time + 60f;
}
onComplete?.Invoke(fallbackDialogues[UnityEngine.Random.Range(0, fallbackDialogues.Length)]);
}

View File

@@ -106,7 +106,7 @@ public class KamikazeAI : MonoBehaviour
// HÀM TUẦN TRA NGẪU NHIÊN MỚI
private NodeState ActionRandomPatrol()
{
Debug.Log("Wandering randomly...");
// Debug.Log("Wandering randomly...");
agent.isStopped = false;
agent.speed = patrolSpeed;

View File

@@ -1,3 +1,4 @@
using System;
using UnityEngine;
using Hallucinate.Audio;
using Invector;
@@ -28,33 +29,51 @@ 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;
}
// 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 an obstacle (Wall/Floor).");
Debug.Log($"Laser hit solid object: {other.name} (Ground/Obstacle). Destroying.");
Impact();
}
}
private void OnCollisionEnter(Collision other)
{
if (other.gameObject.layer == LayerMask.NameToLayer("Ground") || other.gameObject.tag == "Ground")
{
Impact();
return;
}
}
private void Impact()
{
// Chạy âm thanh

View File

@@ -1,16 +0,0 @@
using UnityEngine;
public class RagNPC : MonoBehaviour
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 30cdc86fe97fa95428a4b31052cfb22f

View File

@@ -1,44 +1,53 @@
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 losePanel; // Bảng Lose
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;
[Header("Cài đặt Âm thanh")]
public string winSound = "UI_Win";
public string loseSound = "UI_Lose"; // Âm thanh thua
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 (losePanel != null) losePanel.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 +56,81 @@ 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)
public void LoseGame()
{
if (losePanel != null)
{
losePanel.SetActive(true);
}
AudioManager.PlayGlobal(loseSound);
Time.timeScale = 0f;
Cursor.lockState = CursorLockMode.None;
Cursor.visible = true;
}
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 +138,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
}
}
}

View File

@@ -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;
}
}
}

View File

@@ -98,6 +98,13 @@ namespace Invector.vCharacterController
private void OnDead(GameObject arg0)
{
ShowText("You are Dead!");
// Gọi hàm LoseGame từ script FinishGate khi người chơi chết
FinishGate gate = Object.FindAnyObjectByType<FinishGate>();
if (gate != null)
{
gate.LoseGame();
}
}
public virtual void UpdateHUD(vThirdPersonController cc)

View File

@@ -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

View File

@@ -115,7 +115,7 @@ Material:
- _ZWrite: 0
m_Colors:
- _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
- _Color: {r: 1, g: 0.8260788, b: 0.08962262, a: 0.25}
- _Color: {r: 0.6132076, g: 0.1454958, b: 0.118592024, a: 0.1882353}
- _Emission: {r: 0, g: 0, b: 0, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _Flip: {r: 1, g: 1, b: 1, a: 1}
@@ -123,6 +123,6 @@ Material:
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
- _SpecColor: {r: 0, g: 0, b: 0, a: 0}
- _Specular: {r: 1, g: 1, b: 1, a: 0}
- _TintColor: {r: 1, g: 0.8260788, b: 0.08962262, a: 0.25}
- _TintColor: {r: 0.6132076, g: 0.1454958, b: 0.118592024, a: 0.1882353}
m_BuildTextureStacks: []
m_AllowLocking: 1

View File

@@ -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,17 +102,39 @@ 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>();
if (rigb)
if (rigb && !rigb.isKinematic)
{
rigb.AddForce(transform.forward * damage.damageValue * forceMultiplier, ForceMode.Impulse);
// GIẢM LỰC ĐẨY: Chỉ dùng 10% lực để NPC không bị bay quá xa
float realisticForce = (damage.damageValue * forceMultiplier) * 0.1f;
rigb.AddForce(transform.forward * realisticForce, ForceMode.Impulse);
}
startPosition = transform.position;
@@ -268,8 +294,20 @@ namespace Invector.vShooter
}
}
}
else
else
{
// DIAGNOSTIC X-RAY: Kiểm tra xem có trúng cái gì mà bị HitLayer cấm không?
RaycastHit diagHit;
if (Physics.Linecast(previousPosition, transform.position + transform.forward * 0.5f, out diagHit, ~0)) // ~0 là tất cả layer
{
if (diagHit.collider.CompareTag("Enemy") || diagHit.collider.name.Contains("Guard") || diagHit.collider.GetComponentInParent<EnemyAI>() != null)
{
Debug.LogError($"<color=red>LAYER BLOCK DETECTED!</color> Đạn vừa bay xuyên qua {diagHit.collider.name}. " +
$"Đối tượng này ở Layer: {LayerMask.LayerToName(diagHit.collider.gameObject.layer)} ({diagHit.collider.gameObject.layer}). " +
$"NHƯNG súng của bạn đang dùng HitLayer Mask: {hitLayer.value}, không bao gồm layer này!");
}
}
if (debugTrajetory)
{
Debug.DrawLine(transform.position, previousPosition, debugColor, 10f);
@@ -277,7 +315,8 @@ namespace Invector.vShooter
}
previousPosition = transform.position;
}

View File

@@ -242,6 +242,21 @@ namespace Invector.vShooter
#endregion
#region Protected Methods
protected virtual void Start()
{
// TỰ ĐỘNG SỬA LỖI LAYER: Đảm bảo súng luôn có thể bắn trúng Enemy
int enemyLayer = LayerMask.NameToLayer("Enemy");
if (enemyLayer != -1)
{
// Cưỡng bức thêm Layer Enemy vào mask (Dùng toán tử bit OR)
hitLayer.value |= (1 << enemyLayer);
Debug.Log($"<color=green>[WEAPON AUTO-FIX]</color> {gameObject.name} hiện đã có thể bắn trúng Layer 'Enemy' (Mask mới: {hitLayer.value}).");
}
else
{
Debug.LogError("<color=red>[WEAPON ERROR]</color> Bạn chưa tạo Layer tên là 'Enemy' trong Project Settings > Tags and Layers!");
}
}
protected virtual void OnDestroy()
{
@@ -256,6 +271,14 @@ namespace Invector.vShooter
{
ShootBullet(startPoint, endPoint);
ShotEffect();
// Gửi tín hiệu tiếng súng cho toàn bộ AI lân cận
var hitColliders = Physics.OverlapSphere(muzzle.position, 50f);
foreach (var hit in hitColliders)
{
var ai = hit.GetComponentInParent<EnemyAI>();
if (ai != null) ai.TriggerCombatAlert(muzzle.position);
}
}
public virtual Vector3 Dispersion(Vector3 aim, float dispersion)
{
@@ -297,11 +320,32 @@ namespace Invector.vShooter
protected virtual void ShootBullet(Vector3 startPoint, Vector3 endPoint)
{
// TỰ ĐỘNG SỬA LỖI LAYER (Cưỡng bức mỗi khi bắn):
int enemyLayer = LayerMask.NameToLayer("Enemy");
if (enemyLayer != -1)
{
// Ép thêm Layer Enemy vào mask nếu nó bị thiếu
if ((hitLayer.value & (1 << enemyLayer)) == 0)
{
hitLayer.value |= (1 << enemyLayer);
Debug.Log($"<color=orange>[WEAPON FORCE-FIX]</color> Đã cưỡng bức thêm Layer 'Enemy' vào {gameObject.name} khi bắn.");
}
}
var dir = endPoint - startPoint;
//StartCoroutine(DebugDispersion(startPoint, endPoint));
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 +355,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 +388,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);

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 MiB

View File

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: f6c8ebeb4fbe2954ba666fb8de1138f1
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 0
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 16384
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

View File

@@ -31,6 +31,7 @@ TagManager:
- Interactable
- AIAction
- Check
- Ground
layers:
- Default
- TransparentFX