update 1.2.5

This commit is contained in:
2025-07-20 10:18:13 +08:00
parent 5396d3e4b8
commit 9d22e1c192
17 changed files with 313 additions and 115 deletions
@@ -1099,8 +1099,6 @@ MonoBehaviour:
x: 1
y: 1
z: 1
m_SourceObjectsGUIToggle: 0
m_SettingsGUIToggle: 1
--- !u!1 &430677210
GameObject:
m_ObjectHideFlags: 0
@@ -2163,8 +2161,6 @@ MonoBehaviour:
x: 1
y: 1
z: 1
m_SourceObjectsGUIToggle: 0
m_SettingsGUIToggle: 1
--- !u!1 &854498951
GameObject:
m_ObjectHideFlags: 0
@@ -2513,8 +2509,6 @@ MonoBehaviour:
x: 1
y: 1
z: 1
m_SourceObjectsGUIToggle: 0
m_SettingsGUIToggle: 1
--- !u!1 &993205062
GameObject:
m_ObjectHideFlags: 0
@@ -3176,6 +3170,7 @@ MonoBehaviour:
m_NavMeshAgent: {fileID: 0}
AIBoxCollider: {fileID: 0}
AIAnimator: {fileID: 0}
TimeSinceEnabled: 0
DetectionComponent: {fileID: 0}
BehaviorsComponent: {fileID: 0}
MovementComponent: {fileID: 0}
@@ -3529,9 +3524,11 @@ MonoBehaviour:
DeathDelayTimer: 0
CurrentAnimationIndex: 0
TargetDetectionActive: 0
TargetOutOfHeightRange: 0
TooCloseDistance: 1
AttackDistance: 2.5
CurrentEmeraldAIAbility: {fileID: 0}
AvailableConditionAbilities: []
CurrentAttackData:
AbilityObject: {fileID: 0}
AttackAnimation: 0
@@ -3562,6 +3559,7 @@ MonoBehaviour:
CurrentHealth: 90
StartingHealth: 90
HealRate: 0
AttachHitEffects: 0
Immortal: 0
CurrentActiveEffects: []
HitEffectFoldout: 0
@@ -3691,6 +3689,8 @@ MonoBehaviour:
ObstructionType: 2
LineOfSightTargets: []
CurrentFollowers: []
NearbyAllies: []
LowHealthAllies: []
CurrentFaction: 0
FactionRelations:
FactionRelationsList:
@@ -3793,8 +3793,6 @@ MonoBehaviour:
MissingRuntimeController: 0
AnimationsUpdated: 0
AIAnimator: {fileID: 1223765695}
AnimatorCullingMode: 0
UseWarningAnimation: 0
AttackingTracker: 0
AttackTriggered: 0
WarningAnimationTriggered: 0
@@ -6890,8 +6888,6 @@ MonoBehaviour:
x: 1
y: 1
z: 1
m_SourceObjectsGUIToggle: 0
m_SettingsGUIToggle: 1
--- !u!4 &984178145003238945
Transform:
m_ObjectHideFlags: 0
@@ -7964,6 +7960,7 @@ MonoBehaviour:
m_NavMeshAgent: {fileID: 0}
AIBoxCollider: {fileID: 0}
AIAnimator: {fileID: 0}
TimeSinceEnabled: 0
DetectionComponent: {fileID: 0}
BehaviorsComponent: {fileID: 0}
MovementComponent: {fileID: 0}
@@ -8320,9 +8317,11 @@ MonoBehaviour:
DeathDelayTimer: 0
CurrentAnimationIndex: 0
TargetDetectionActive: 0
TargetOutOfHeightRange: 0
TooCloseDistance: 1
AttackDistance: 2.5
CurrentEmeraldAIAbility: {fileID: 0}
AvailableConditionAbilities: []
CurrentAttackData:
AbilityObject: {fileID: 0}
AttackAnimation: 0
@@ -8353,6 +8352,7 @@ MonoBehaviour:
CurrentHealth: 130
StartingHealth: 130
HealRate: 0
AttachHitEffects: 0
Immortal: 0
CurrentActiveEffects: []
HitEffectFoldout: 0
@@ -8482,6 +8482,8 @@ MonoBehaviour:
ObstructionType: 2
LineOfSightTargets: []
CurrentFollowers: []
NearbyAllies: []
LowHealthAllies: []
CurrentFaction: 1
FactionRelations:
FactionRelationsList:
@@ -8600,8 +8602,6 @@ MonoBehaviour:
MissingRuntimeController: 0
AnimationsUpdated: 0
AIAnimator: {fileID: 5834346861728704417}
AnimatorCullingMode: 0
UseWarningAnimation: 0
AttackingTracker: 0
AttackTriggered: 0
WarningAnimationTriggered: 0
@@ -3379,8 +3379,6 @@ MonoBehaviour:
x: 1
y: 1
z: 1
m_SourceObjectsGUIToggle: 0
m_SettingsGUIToggle: 1
--- !u!1 &1419757364
GameObject:
m_ObjectHideFlags: 0
@@ -4426,6 +4424,7 @@ MonoBehaviour:
m_NavMeshAgent: {fileID: 0}
AIBoxCollider: {fileID: 0}
AIAnimator: {fileID: 0}
TimeSinceEnabled: 0
DetectionComponent: {fileID: 0}
BehaviorsComponent: {fileID: 0}
MovementComponent: {fileID: 0}
@@ -4561,7 +4560,7 @@ Animator:
m_GameObject: {fileID: 1743903527}
m_Enabled: 1
m_Avatar: {fileID: 9000000, guid: e57e9b8cd5e115f4f8d7736473e5c7fd, type: 3}
m_Controller: {fileID: 9100000, guid: bdc0762e205db0345a5ea194ab3a480b, type: 2}
m_Controller: {fileID: 9100000, guid: 22e597addfc275e43a5b6bb4b051f7a0, type: 2}
m_CullingMode: 1
m_UpdateMode: 0
m_ApplyRootMotion: 1
@@ -4773,9 +4772,11 @@ MonoBehaviour:
DeathDelayTimer: 0
CurrentAnimationIndex: 0
TargetDetectionActive: 0
TargetOutOfHeightRange: 0
TooCloseDistance: 1
AttackDistance: 2.5
CurrentEmeraldAIAbility: {fileID: 0}
AvailableConditionAbilities: []
CurrentAttackData:
AbilityObject: {fileID: 0}
AttackAnimation: 0
@@ -4806,6 +4807,7 @@ MonoBehaviour:
CurrentHealth: 50
StartingHealth: 50
HealRate: 0
AttachHitEffects: 0
Immortal: 1
CurrentActiveEffects: []
HitEffectFoldout: 0
@@ -4872,8 +4874,6 @@ MonoBehaviour:
RotateTowardsTarget: 0
StationaryIdleSecondsMin: 3
StationaryIdleSecondsMax: 6
BackupType: 1
BackupOdds: 50
GeneratedBackupOdds: 0
StartingWanderingType: 0
ReturnToStationaryPosition: 0
@@ -4887,8 +4887,6 @@ MonoBehaviour:
BackupLayerMask:
serializedVersion: 2
m_Bits: 4294967295
BackingUpSecondsMin: 3
BackingUpSecondsMax: 4
LockTurning: 0
ReturningToStartInProgress: 0
AIAgentActive: 0
@@ -4937,6 +4935,8 @@ MonoBehaviour:
ObstructionType: 2
LineOfSightTargets: []
CurrentFollowers: []
NearbyAllies: []
LowHealthAllies: []
CurrentFaction: 0
FactionRelations:
FactionRelationsList:
@@ -5011,6 +5011,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 871be6a68bd875f49b5587968e1ac56c, type: 3}
m_Name:
m_EditorClassIdentifier:
InternalDodge: 0
InternalBlock: 0
InternalHit: 0
IsEmoting: 0
IsIdling: 0
IsAttacking: 0
@@ -5036,8 +5039,6 @@ MonoBehaviour:
MissingRuntimeController: 0
AnimationsUpdated: 0
AIAnimator: {fileID: 1743903532}
AnimatorCullingMode: 0
UseWarningAnimation: 0
AttackingTracker: 0
AttackTriggered: 0
WarningAnimationTriggered: 0
@@ -5065,14 +5066,13 @@ MonoBehaviour:
m_EditorClassIdentifier:
DetectedAttractModifier: {fileID: 0}
CurrentThreatLevel: 0
DetectableLayers:
serializedVersion: 2
m_Bits: 1
CurrentThreatAmount: 0
CheckIncrement: 0.25
MinVelocityThreshold: 0.5
AttentionRate: 0.1
MinVelocityThreshold: 0.5
TargetVelocityFactor: 0.3
DistanceFactor: 0.1
AttentionFalloff: 0.05
FalloffDealy: 3
DelayUnawareSeconds: 5
AttractModifierCooldown: 5
MovingTargetDetected: 0
@@ -5094,7 +5094,7 @@ MonoBehaviour:
CurrentTargetData: []
HideSettingsFoldout: 0
SoundDetectorFoldout: 1
UnawareFoldout: 0
UnawareFoldout: 1
SuspiciousFoldout: 0
AwareFoldout: 0
--- !u!4 &1743903545
@@ -5295,8 +5295,6 @@ MonoBehaviour:
x: 1
y: 1
z: 1
m_SourceObjectsGUIToggle: 0
m_SettingsGUIToggle: 1
--- !u!1 &1961984826
GameObject:
m_ObjectHideFlags: 0
@@ -23,9 +23,13 @@ MonoBehaviour:
Enabled: 0
CooldownLength: 1
ConditionSettings:
Foldout: 1
Enabled: 0
ConditionType: 0
OutnumberedThreshold: 3
ValueCompareType: 1
HighPriority: 0
DistanceFromTarget: 3
LowHealthPercentage: 60
ChargeSettings:
Enabled: 0
ChargeEffect: {fileID: 0}
@@ -2,16 +2,14 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Ring
m_Shader: {fileID: 211, guid: 0000000000000000f000000000000000, type: 0}
m_ValidKeywords:
- _ALPHABLEND_ON
m_InvalidKeywords: []
m_ShaderKeywords: _ALPHABLEND_ON
m_LightmapFlags: 0
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
@@ -20,6 +18,7 @@ Material:
RenderType: Transparent
disabledShaderPasses:
- GRABPASS
- ALWAYS
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
@@ -59,7 +58,6 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BlendOp: 0
- _BumpScale: 1
+34 -15
View File
@@ -30,19 +30,27 @@ namespace EmeraldAI.Example
{
if (Input.GetMouseButtonDown(1))
{
lastMouse = Input.mousePosition;
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
}
if (Input.GetMouseButtonUp(1))
{
Cursor.lockState = CursorLockMode.None;
Cursor.visible = true;
}
if (Input.GetMouseButton(1))
{
lastMouse = Input.mousePosition - lastMouse;
lastMouse = new Vector3(-lastMouse.y * camSens, lastMouse.x * camSens, 0);
lastMouse = new Vector3(transform.eulerAngles.x + lastMouse.x, transform.eulerAngles.y + lastMouse.y, 0);
transform.eulerAngles = lastMouse;
lastMouse = Input.mousePosition;
float mouseX = Input.GetAxis("Mouse X") * camSens * 15;
float mouseY = Input.GetAxis("Mouse Y") * camSens * 15;
Vector3 newRotation = transform.eulerAngles;
newRotation.x -= mouseY;
newRotation.y += mouseX;
transform.eulerAngles = newRotation;
}
//Keyboard commands
Vector3 p = GetBaseLegacyInput();
if (Input.GetKey(KeyCode.LeftShift))
{
@@ -66,21 +74,32 @@ namespace EmeraldAI.Example
#if (ENABLE_INPUT_SYSTEM)
void NewInput()
{
if (!Mouse.current.rightButton.isPressed)
if (Mouse.current.rightButton.wasPressedThisFrame)
{
lastMouse = Mouse.current.position.ReadValue();
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
}
if (Mouse.current.rightButton.wasReleasedThisFrame)
{
Cursor.lockState = CursorLockMode.None;
Cursor.visible = true;
}
if (Mouse.current.rightButton.isPressed)
{
lastMouse = (Vector3)Mouse.current.position.ReadValue() - lastMouse;
lastMouse = new Vector3(-lastMouse.y * camSens, lastMouse.x * camSens, 0);
lastMouse = new Vector3(transform.eulerAngles.x + lastMouse.x, transform.eulerAngles.y + lastMouse.y, 0);
transform.eulerAngles = lastMouse;
lastMouse = Mouse.current.position.ReadValue();
Vector2 mouseDelta = Mouse.current.delta.ReadValue();
float mouseX = mouseDelta.x * camSens;
float mouseY = mouseDelta.y * camSens;
Vector3 newRotation = transform.eulerAngles;
newRotation.x -= mouseY;
newRotation.y += mouseX;
transform.eulerAngles = newRotation;
}
//Keyboard commands
Vector3 p = GetBaseNewInput();
if (Keyboard.current.leftShiftKey.isPressed)
{