добавлены конфиги для дурнев

This commit is contained in:
MrTorex committed 2025-11-19 20:11:24 +03:00
1 parent 575e66425a
commit afdd523682
18 files changed
+377 -251

No files matched your search

@@ -78,6 +78,9 @@ namespace Code.App
containerBuilder.AddSingleton(staticDataService.UIConfig, typeof(UIConfig)); containerBuilder.AddSingleton(staticDataService.UIConfig, typeof(UIConfig));
containerBuilder.AddSingleton(staticDataService.DrunkenGrandpaConfig, typeof(DrunkenGrandpaConfig));
containerBuilder.AddSingleton(staticDataService.CockroachConfig, typeof(CockroachConfig));
containerBuilder.AddSingleton(staticDataService.AudioMixerConfig, typeof(AudioMixerConfig)); containerBuilder.AddSingleton(staticDataService.AudioMixerConfig, typeof(AudioMixerConfig));
containerBuilder.AddSingleton(staticDataService.SoundtrackListConfig, typeof(SoundtrackListConfig)); containerBuilder.AddSingleton(staticDataService.SoundtrackListConfig, typeof(SoundtrackListConfig));
containerBuilder.AddSingleton(staticDataService.SFXListConfig, typeof(SFXListConfig)); containerBuilder.AddSingleton(staticDataService.SFXListConfig, typeof(SFXListConfig));
@@ -0,0 +1,29 @@
using UnityEngine;
using UnityEngine.AddressableAssets;
namespace Code.Configs
{
[CreateAssetMenu(menuName = "Config/Enemies/Cockroach", fileName = "CockroachConfig")]
public class CockroachConfig : ScriptableObject
{
public AssetReference cockroachPrefab;
public int damage = 2;
public float attackCooldown = 1.5f;
public float detectionRange = 20f;
public float attackRange = 1.3f;
public float speed = 6f;
public bool isStunnable;
public float stunDuration;
public bool usesIdleMovement = true;
public float idleWanderRadius = 3f;
public float idleMoveDurationMin = 0.3f;
public float idleMoveDurationMax = 1f;
public float idlePauseDurationMin = 0.1f;
public float idlePauseDurationMax = 0.8f;
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 7bc162d3127949aa950d0738beee99a4
timeCreated: 1763571220
@@ -0,0 +1,29 @@
using UnityEngine;
using UnityEngine.AddressableAssets;
namespace Code.Configs
{
[CreateAssetMenu(menuName = "Config/Enemies/DrunkenGrandpa", fileName = "DrunkenGrandpaConfig")]
public class DrunkenGrandpaConfig : ScriptableObject
{
public AssetReference drunkenGrandpaPrefab;
public int damage = 2;
public float attackCooldown = 5f;
public float detectionRange = 10f;
public float attackRange = 1.5f;
public float speed = 3f;
public bool isStunnable = true;
public float stunDuration = 3f;
public bool usesIdleMovement = true;
public float idleWanderRadius = 5f;
public float idleMoveDurationMin = 1f;
public float idleMoveDurationMax = 5f;
public float idlePauseDurationMin = 3f;
public float idlePauseDurationMax = 5f;
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4d157e8891074b90957a7434cff0ae71
timeCreated: 1763569096
@@ -11,33 +11,43 @@ namespace Code.Gameplay.Enemies
{ {
public abstract class BaseEnemy : MonoBehaviour public abstract class BaseEnemy : MonoBehaviour
{ {
[Header("Base enemy configs")]
public int collisionDamage = 1;
public int attackDamage = 3;
public float detectionRange = 10f;
public float attackRange = 5f;
public float speed = 3f;
public float stunDuration = 3f;
public float attackCooldown = 1.5f;
[SerializeField] protected NavMeshAgent agent; [SerializeField] protected NavMeshAgent agent;
[SerializeField] protected Collider enemyCollider; [SerializeField] protected Collider enemyCollider;
protected int Damage;
protected float AttackCooldown;
protected float DetectionRange;
protected float AttackRange;
protected float Speed;
protected bool IsStunnable;
protected float StunDuration;
protected bool UsesIdleMovement;
protected float IdleWanderRadius;
protected float IdleMoveDurationMin;
protected float IdleMoveDurationMax;
protected float IdlePauseDurationMin;
protected float IdlePauseDurationMax;
private bool _isStunned;
private float _currentStunTimer;
private bool _canAttack = true;
private float _attackCooldownTimer;
private enum IdleState { Moving, Paused }
private IdleState _currentIdleState = IdleState.Paused;
private float _idleTimer;
private Vector3 _idleTargetPosition;
[Inject] private IPlayerProvider _playerProvider; [Inject] private IPlayerProvider _playerProvider;
protected CharacterProvider Player => _playerProvider?.Character; protected CharacterProvider Player => _playerProvider?.Character;
protected PlayerHealth PlayerHealth => _playerProvider?.Health; protected PlayerHealth PlayerHealth => _playerProvider?.Health;
protected CustomCharacterController PlayerController => Player?.CustomCharacterController; protected CustomCharacterController PlayerController => Player?.CustomCharacterController;
protected bool IsStunned;
protected float CurrentStunTimer;
protected bool CanAttack = true;
protected float AttackCooldownTimer;
protected virtual void Awake() protected virtual void Awake()
{ {
if (_playerProvider == null) if (_playerProvider == null)
@@ -52,7 +62,7 @@ namespace Code.Gameplay.Enemies
HandleStun(); HandleStun();
HandleAttackCooldown(); HandleAttackCooldown();
if (IsStunned) return; if (_isStunned) return;
HandleMovement(); HandleMovement();
HandleAttack(); HandleAttack();
@@ -64,61 +74,115 @@ namespace Code.Gameplay.Enemies
var distanceToPlayer = Vector3.Distance(transform.position, Player.transform.position); var distanceToPlayer = Vector3.Distance(transform.position, Player.transform.position);
if (distanceToPlayer <= detectionRange) if (distanceToPlayer <= DetectionRange)
{ {
agent.isStopped = false; agent.isStopped = false;
agent.SetDestination(Player.transform.position); agent.SetDestination(Player.transform.position);
} }
else if (UsesIdleMovement)
{
HandleIdleMovement();
}
else else
{ {
agent.isStopped = true; agent.isStopped = true;
} }
} }
protected virtual void HandleIdleMovement()
{
_idleTimer -= Time.deltaTime;
switch (_currentIdleState)
{
case IdleState.Paused:
if (_idleTimer <= 0f)
{
// Start moving to a new random point
_currentIdleState = IdleState.Moving;
SetNewIdleDestination();
_idleTimer = Random.Range(IdleMoveDurationMin, IdleMoveDurationMax);
agent.isStopped = false;
}
break;
case IdleState.Moving:
if (_idleTimer <= 0f || HasReachedIdleDestination())
{
// Stop and pause
_currentIdleState = IdleState.Paused;
_idleTimer = Random.Range(IdlePauseDurationMin, IdlePauseDurationMax);
agent.isStopped = true;
}
break;
}
}
private void SetNewIdleDestination()
{
Vector3 randomPoint = transform.position + Random.insideUnitSphere * IdleWanderRadius;
NavMeshHit hit;
if (NavMesh.SamplePosition(randomPoint, out hit, 3f, agent.areaMask))
{
_idleTargetPosition = hit.position;
agent.SetDestination(_idleTargetPosition);
}
else
{
// Fallback: stay
_idleTargetPosition = transform.position;
}
}
private bool HasReachedIdleDestination()
{
return agent.remainingDistance <= agent.stoppingDistance;
}
protected virtual void HandleAttack() { } protected virtual void HandleAttack() { }
protected virtual void HandleStun() protected virtual void HandleStun()
{ {
if (!IsStunned) return; if (!_isStunned || !IsStunnable) return;
CurrentStunTimer -= Time.deltaTime; _currentStunTimer -= Time.deltaTime;
if (!(CurrentStunTimer <= 0)) return; if (!(_currentStunTimer <= 0)) return;
IsStunned = false; _isStunned = false;
agent.isStopped = false; agent.isStopped = false;
enemyCollider.enabled = true; enemyCollider.enabled = true;
} }
protected virtual void ApplyStun() protected virtual void ApplyStun()
{ {
IsStunned = true; _isStunned = true;
CurrentStunTimer = stunDuration; _currentStunTimer = StunDuration;
agent.isStopped = true; agent.isStopped = true;
enemyCollider.enabled = false; enemyCollider.enabled = false;
} }
protected virtual void HandleAttackCooldown() protected virtual void HandleAttackCooldown()
{ {
if (!CanAttack) if (!_canAttack)
{ {
AttackCooldownTimer -= Time.deltaTime; _attackCooldownTimer -= Time.deltaTime;
if (AttackCooldownTimer <= 0) if (_attackCooldownTimer <= 0)
{ {
CanAttack = true; _canAttack = true;
} }
} }
} }
protected virtual void DealDamage() protected virtual void DealDamage()
{ {
if (!CanAttack || PlayerHealth == null) return; if (!_canAttack || PlayerHealth == null) return;
PlayerHealth.GetDamage(collisionDamage); PlayerHealth.GetDamage(Damage);
ApplyEffectsToPlayer(); ApplyEffectsToPlayer();
CanAttack = false; _canAttack = false;
AttackCooldownTimer = attackCooldown; _attackCooldownTimer = AttackCooldown;
} }
protected virtual void ApplyEffectsToPlayer() protected virtual void ApplyEffectsToPlayer()
@@ -129,10 +193,10 @@ namespace Code.Gameplay.Enemies
private void OnDrawGizmosSelected() private void OnDrawGizmosSelected()
{ {
Gizmos.color = Color.yellow; Gizmos.color = Color.yellow;
Gizmos.DrawWireSphere(transform.position, detectionRange); Gizmos.DrawWireSphere(transform.position, DetectionRange);
Gizmos.color = new Color(0.3f, 0.3f, 0.8f, 0.4f); Gizmos.color = new Color(0.3f, 0.3f, 0.8f, 0.4f);
Gizmos.DrawSphere(transform.position, attackRange); Gizmos.DrawSphere(transform.position, AttackRange);
} }
} }
} }
@@ -1,156 +1,58 @@
using Code.Configs;
using Reflex.Attributes;
using UnityEngine; using UnityEngine;
using UnityEngine.AI;
namespace Code.Gameplay.Enemies namespace Code.Gameplay.Enemies
{ {
public class Cockroach : BaseEnemy public class Cockroach : BaseEnemy
{ {
[Header("Cockroach-Specific")] [Inject]
public float wallCheckDistance = 0.5f; private void Construct(CockroachConfig cockroachConfig)
public float moveForce = 10f; {
public float maxSpeed = 5f; Damage = cockroachConfig.damage;
public LayerMask climbableLayers; // ← ← ← ТОЛЬКО для стен/пола (где ползать), НЕ для игрока! AttackCooldown = cockroachConfig.attackCooldown;
[SerializeField] private Rigidbody rb; DetectionRange = cockroachConfig.detectionRange;
[SerializeField] private Transform model; // модель таракана (дочерний объект для поворота) AttackRange = cockroachConfig.attackRange;
private Vector3 surfaceNormal = Vector3.up; Speed = cockroachConfig.speed;
private bool isPlayerDetected = false;
private Collider[] _overlapResults = new Collider[4]; // для переиспользования IsStunnable = cockroachConfig.isStunnable;
StunDuration = cockroachConfig.stunDuration;
UsesIdleMovement = cockroachConfig.usesIdleMovement;
IdleWanderRadius = cockroachConfig.idleWanderRadius;
IdleMoveDurationMin = cockroachConfig.idleMoveDurationMin;
IdleMoveDurationMax = cockroachConfig.idleMoveDurationMax;
IdleMoveDurationMin = cockroachConfig.idleMoveDurationMin;
IdleMoveDurationMax = cockroachConfig.idleMoveDurationMax;
IdlePauseDurationMin = cockroachConfig.idlePauseDurationMin;
IdlePauseDurationMax = cockroachConfig.idlePauseDurationMax;
}
protected override void Awake() protected override void Awake()
{ {
base.Awake(); base.Awake();
// Убираем NavMeshAgent — он не нужен для лазания if (agent == null) return;
if (agent != null)
{ var walkableArea = NavMesh.GetAreaFromName("Cockroach");
agent.enabled = false; agent.areaMask = 1 << walkableArea;
Destroy(agent);
agent = null;
}
if (rb == null)
rb = GetComponent<Rigidbody>();
rb.useGravity = false;
rb.isKinematic = false;
rb.freezeRotation = true;
} }
protected override void Update()
{
if (!Player) return;
HandleStun();
HandleAttackCooldown();
if (IsStunned) return;
DetectPlayer();
HandleMovement();
HandleAttack();
}
private void DetectPlayer()
{
// Ищем игрока по тегу через OverlapSphere — без LayerMask
int hits = Physics.OverlapSphereNonAlloc(transform.position, detectionRange, _overlapResults);
isPlayerDetected = false;
for (int i = 0; i < hits; i++)
{
if (_overlapResults[i].CompareTag("Player"))
{
isPlayerDetected = true;
break;
}
}
}
protected override void HandleMovement()
{
if (!isPlayerDetected)
{
rb.linearVelocity = Vector3.zero;
return;
}
// Направление к игроку (проекция на горизонталь, чтобы не лез вверх/вниз резко)
Vector3 toPlayer = Player.transform.position - transform.position;
toPlayer = Vector3.ProjectOnPlane(toPlayer, surfaceNormal).normalized;
// Raycast вниз и вперёд-вниз, чтобы найти поверхность
Vector3 rayOrigin = transform.position + transform.up * 0.1f;
bool foundSurface = false;
// Основной луч вниз (относительно текущей ориентации)
if (Physics.Raycast(rayOrigin, -transform.up, out RaycastHit hit, wallCheckDistance * 2, climbableLayers))
{
surfaceNormal = hit.normal;
foundSurface = true;
}
// Запасной — в мировой вниз (на случай, если "повернулся вверх ногами")
else if (Physics.Raycast(rayOrigin, -Vector3.up, out hit, wallCheckDistance * 2, climbableLayers))
{
surfaceNormal = hit.normal;
foundSurface = true;
}
// Если поверхность не найдена — не двигаемся (падаем или стоим)
if (!foundSurface)
return;
// Поворачиваем модель так, чтобы "спина" смотрела от поверхности
if (model != null)
{
// Смотрим в сторону игрока, но "встаём" на поверхность
Quaternion targetRot = Quaternion.FromToRotation(Vector3.up, surfaceNormal);
Quaternion lookRot = Quaternion.LookRotation(toPlayer, surfaceNormal);
model.rotation = Quaternion.Slerp(model.rotation, targetRot * lookRot, Time.deltaTime * 12f);
}
// Движение — в плоскости поверхности
Vector3 moveDir = Vector3.ProjectOnPlane(toPlayer, surfaceNormal).normalized;
Vector3 force = moveDir * moveForce;
rb.AddForce(force, ForceMode.Force);
rb.linearVelocity = Vector3.ClampMagnitude(rb.linearVelocity, maxSpeed);
}
protected override void HandleAttack() protected override void HandleAttack()
{ {
if (!Player || !isPlayerDetected) return; if (!Player) return;
var distance = Vector3.Distance(transform.position, Player.transform.position);
float distance = Vector3.Distance(transform.position, Player.transform.position); if (!(distance <= AttackRange)) return;
if (distance <= attackRange && CanAttack)
{ if (Player.CustomCharacterController.IsSliding)
ApplyStun();
else
DealDamage(); DealDamage();
}
}
// Столкновение = -1 HP (по ТЗ)
private void OnCollisionEnter(Collision col)
{
if (col.gameObject.CompareTag("Player"))
{
PlayerHealth?.GetDamage(collisionDamage);
ApplyEffectsToPlayer();
}
}
private void OnDrawGizmosSelected()
{
Gizmos.color = Color.yellow;
Gizmos.DrawWireSphere(transform.position, detectionRange);
Gizmos.color = Color.red;
Gizmos.DrawWireSphere(transform.position, attackRange);
// Покажем направление поверхности в эдиторе (если запущено)
if (Application.isPlaying)
{
Gizmos.color = Color.cyan;
Gizmos.DrawLine(transform.position, transform.position + surfaceNormal * 0.4f);
}
} }
} }
} }
@@ -1,3 +1,5 @@
using Code.Configs;
using Reflex.Attributes;
using UnityEngine; using UnityEngine;
using UnityEngine.AI; using UnityEngine.AI;
@@ -5,6 +7,30 @@ namespace Code.Gameplay.Enemies
{ {
public class DrunkenGrandpa : BaseEnemy public class DrunkenGrandpa : BaseEnemy
{ {
[Inject]
private void Construct(DrunkenGrandpaConfig drunkenGrandpaConfig)
{
Damage = drunkenGrandpaConfig.damage;
AttackCooldown = drunkenGrandpaConfig.attackCooldown;
DetectionRange = drunkenGrandpaConfig.detectionRange;
AttackRange = drunkenGrandpaConfig.attackRange;
Speed = drunkenGrandpaConfig.speed;
IsStunnable = drunkenGrandpaConfig.isStunnable;
StunDuration = drunkenGrandpaConfig.stunDuration;
UsesIdleMovement = drunkenGrandpaConfig.usesIdleMovement;
IdleWanderRadius = drunkenGrandpaConfig.idleWanderRadius;
IdleMoveDurationMin = drunkenGrandpaConfig.idleMoveDurationMin;
IdleMoveDurationMax = drunkenGrandpaConfig.idleMoveDurationMax;
IdleMoveDurationMin = drunkenGrandpaConfig.idleMoveDurationMin;
IdleMoveDurationMax = drunkenGrandpaConfig.idleMoveDurationMax;
IdlePauseDurationMin = drunkenGrandpaConfig.idlePauseDurationMin;
IdlePauseDurationMax = drunkenGrandpaConfig.idlePauseDurationMax;
}
protected override void Awake() protected override void Awake()
{ {
base.Awake(); base.Awake();
@@ -21,7 +47,7 @@ namespace Code.Gameplay.Enemies
var distance = Vector3.Distance(transform.position, Player.transform.position); var distance = Vector3.Distance(transform.position, Player.transform.position);
if (!(distance <= attackRange)) return; if (!(distance <= AttackRange)) return;
if (Player.CustomCharacterController.IsSliding) if (Player.CustomCharacterController.IsSliding)
ApplyStun(); ApplyStun();
@@ -18,7 +18,7 @@ namespace Code.Gameplay.Enemies
if (!Player) return; if (!Player) return;
var direction = (Player.transform.position - transform.position).normalized; var direction = (Player.transform.position - transform.position).normalized;
transform.position += direction * (speed * Time.deltaTime); transform.position += direction * (Speed * Time.deltaTime);
} }
protected override void HandleAttack() protected override void HandleAttack()
@@ -27,7 +27,7 @@ namespace Code.Gameplay.Enemies
var distance = Vector3.Distance(transform.position, Player.transform.position); var distance = Vector3.Distance(transform.position, Player.transform.position);
if (!(distance < attackRange)) return; if (!(distance < AttackRange)) return;
PlayerHealth.GetDamage(PlayerHealth.MaxHealthPoints); PlayerHealth.GetDamage(PlayerHealth.MaxHealthPoints);
base.ApplyEffectsToPlayer(); base.ApplyEffectsToPlayer();
@@ -36,7 +36,7 @@ namespace Code.Gameplay.Enemies
private void OnDrawGizmosSelected() private void OnDrawGizmosSelected()
{ {
Gizmos.color = new Color(0.3f, 0.3f, 0.8f, 0.4f); Gizmos.color = new Color(0.3f, 0.3f, 0.8f, 0.4f);
Gizmos.DrawSphere(transform.position, attackRange); Gizmos.DrawSphere(transform.position, AttackRange);
} }
} }
} }
@@ -21,6 +21,8 @@ namespace Code.StaticData
SFXListConfig SFXListConfig { get; } SFXListConfig SFXListConfig { get; }
DispatcherSoundListConfig DispatcherSoundListConfig { get; } DispatcherSoundListConfig DispatcherSoundListConfig { get; }
EnemiesSoundListConfig EnemiesSoundListConfig { get; } EnemiesSoundListConfig EnemiesSoundListConfig { get; }
DrunkenGrandpaConfig DrunkenGrandpaConfig { get; }
CockroachConfig CockroachConfig { get; }
void Load(); void Load();
Task<T> InstantiateAsset<T>(AssetReference assetReference) where T : Behaviour; Task<T> InstantiateAsset<T>(AssetReference assetReference) where T : Behaviour;
} }
@@ -20,6 +20,8 @@ namespace Code.StaticData
public SFXListConfig SFXListConfig { get; private set; } public SFXListConfig SFXListConfig { get; private set; }
public DispatcherSoundListConfig DispatcherSoundListConfig { get; private set; } public DispatcherSoundListConfig DispatcherSoundListConfig { get; private set; }
public EnemiesSoundListConfig EnemiesSoundListConfig { get; private set; } public EnemiesSoundListConfig EnemiesSoundListConfig { get; private set; }
public DrunkenGrandpaConfig DrunkenGrandpaConfig {get; private set;}
public CockroachConfig CockroachConfig { get; private set; }
public void Load() public void Load()
{ {
@@ -31,6 +33,7 @@ namespace Code.StaticData
PlayerConfig = Resources.Load<PlayerConfig>(string.Format(StringPaths.ConfigSingle, "App", "PlayerConfig")); PlayerConfig = Resources.Load<PlayerConfig>(string.Format(StringPaths.ConfigSingle, "App", "PlayerConfig"));
LoadAudioConfigs(); LoadAudioConfigs();
LoadEnemiesConfigs();
} }
private void LoadAudioConfigs() private void LoadAudioConfigs()
@@ -42,6 +45,12 @@ namespace Code.StaticData
EnemiesSoundListConfig = Resources.Load<EnemiesSoundListConfig>(string.Format(StringPaths.ConfigSingle, "Audio", "EnemiesSoundListConfig")); EnemiesSoundListConfig = Resources.Load<EnemiesSoundListConfig>(string.Format(StringPaths.ConfigSingle, "Audio", "EnemiesSoundListConfig"));
} }
private void LoadEnemiesConfigs()
{
DrunkenGrandpaConfig = Resources.Load<DrunkenGrandpaConfig>(string.Format(StringPaths.ConfigSingle, "Enemies", "DrunkenGrandpaConfig"));
CockroachConfig = Resources.Load<CockroachConfig>(string.Format(StringPaths.ConfigSingle, "Enemies", "CockroachConfig"));
}
public async Task<T> InstantiateAsset<T>(AssetReference assetReference) where T : Behaviour public async Task<T> InstantiateAsset<T>(AssetReference assetReference) where T : Behaviour
{ {
return (await Addressables.InstantiateAsync(assetReference).ToUniTask()).GetComponent<T>(); return (await Addressables.InstantiateAsync(assetReference).ToUniTask()).GetComponent<T>();
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9dec9aa8ce6e1be92b7f1daeffd7a9b6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,33 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 7bc162d3127949aa950d0738beee99a4, type: 3}
m_Name: CockroachConfig
m_EditorClassIdentifier: Assembly-CSharp::Code.Configs.CockroachConfig
cockroachPrefab:
m_AssetGUID:
m_SubObjectName:
m_SubObjectType:
m_SubObjectGUID:
m_EditorAssetChanged: 0
damage: 2
attackCooldown: 1.5
detectionRange: 20
attackRange: 1.3
speed: 6
isStunnable: 0
stunDuration: 0
usesIdleMovement: 1
idleWanderRadius: 3
idleMoveDurationMin: 0.3
idleMoveDurationMax: 1
idlePauseDurationMin: 0.1
idlePauseDurationMax: 0.8
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ac804127a406a864f8c178cd56e2b210
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,33 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 4d157e8891074b90957a7434cff0ae71, type: 3}
m_Name: DrunkenGrandpaConfig
m_EditorClassIdentifier: Assembly-CSharp::Code.Configs.DrunkenGrandpaConfig
drunkenGrandpaPrefab:
m_AssetGUID:
m_SubObjectName:
m_SubObjectType:
m_SubObjectGUID:
m_EditorAssetChanged: 0
damage: 2
attackCooldown: 5
detectionRange: 10
attackRange: 1.5
speed: 3
isStunnable: 1
stunDuration: 3
usesIdleMovement: 1
idleWanderRadius: 5
idleMoveDurationMin: 1
idleMoveDurationMax: 5
idlePauseDurationMin: 3
idlePauseDurationMax: 5
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: fd5e843255fee395ea687b9d5ad5741d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -249,13 +249,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4c70370426e4457aa9a56c77689158ff, type: 3} m_Script: {fileID: 11500000, guid: 4c70370426e4457aa9a56c77689158ff, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: Assembly-CSharp::Code.Gameplay.Enemies.FogEnemy m_EditorClassIdentifier: Assembly-CSharp::Code.Gameplay.Enemies.FogEnemy
collisionDamage: 1
attackDamage: 3
detectionRange: 0
attackRange: 5
speed: 3
stunDuration: 0
attackCooldown: 1.5
agent: {fileID: 0} agent: {fileID: 0}
enemyCollider: {fileID: 0} enemyCollider: {fileID: 0}
--- !u!23 &471754161 --- !u!23 &471754161
@@ -524,7 +517,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 0 m_IsActive: 1
--- !u!23 &599793082 --- !u!23 &599793082
MeshRenderer: MeshRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -608,23 +601,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 119c0b675c944ed7ada6cdc8db4b04aa, type: 3} m_Script: {fileID: 11500000, guid: 119c0b675c944ed7ada6cdc8db4b04aa, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: Assembly-CSharp::Code.Gameplay.Enemies.Cockroach m_EditorClassIdentifier: Assembly-CSharp::Code.Gameplay.Enemies.Cockroach
collisionDamage: 1 agent: {fileID: 599793087}
attackDamage: 3 enemyCollider: {fileID: 599793086}
detectionRange: 10
attackRange: 1.5
speed: 1
stunDuration: 3
attackCooldown: 1.5
agent: {fileID: 0}
enemyCollider: {fileID: 0}
wallCheckDistance: 0.5
moveForce: 10
maxSpeed: 5
climbableLayers:
serializedVersion: 2
m_Bits: 192
rb: {fileID: 599793087}
model: {fileID: 599793084}
--- !u!65 &599793086 --- !u!65 &599793086
BoxCollider: BoxCollider:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -646,33 +624,28 @@ BoxCollider:
serializedVersion: 3 serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1} m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
--- !u!54 &599793087 --- !u!195 &599793087
Rigidbody: NavMeshAgent:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 599793080} m_GameObject: {fileID: 599793080}
serializedVersion: 5 m_Enabled: 1
m_Mass: 1 m_AgentTypeID: -1372625422
m_LinearDamping: 0 m_Radius: 0.5
m_AngularDamping: 0.05 m_Speed: 3.5
m_CenterOfMass: {x: 0, y: 0, z: 0} m_Acceleration: 8
m_InertiaTensor: {x: 1, y: 1, z: 1} avoidancePriority: 50
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} m_AngularSpeed: 120
m_IncludeLayers: m_StoppingDistance: 0
serializedVersion: 2 m_AutoTraverseOffMeshLink: 1
m_Bits: 0 m_AutoBraking: 1
m_ExcludeLayers: m_AutoRepath: 1
serializedVersion: 2 m_Height: 1
m_Bits: 0 m_BaseOffset: 0.5
m_ImplicitCom: 1 m_WalkableMask: 4294967295
m_ImplicitTensor: 1 m_ObstacleAvoidanceType: 4
m_UseGravity: 0
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!1 &1217683572 --- !u!1 &1217683572
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1146,7 +1119,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!195 &1719040499 --- !u!195 &1719040499
NavMeshAgent: NavMeshAgent:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1181,13 +1154,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5e77164596e249bca15e09cdfc9ddac2, type: 3} m_Script: {fileID: 11500000, guid: 5e77164596e249bca15e09cdfc9ddac2, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: Assembly-CSharp::Code.Gameplay.Enemies.DrunkenGrandpa m_EditorClassIdentifier: Assembly-CSharp::Code.Gameplay.Enemies.DrunkenGrandpa
collisionDamage: 1
attackDamage: 3
detectionRange: 50
attackRange: 1.2
speed: 3
stunDuration: 3
attackCooldown: 1.5
agent: {fileID: 1719040499} agent: {fileID: 1719040499}
enemyCollider: {fileID: 1719040501} enemyCollider: {fileID: 1719040501}
--- !u!65 &1719040501 --- !u!65 &1719040501
@@ -406,7 +406,7 @@ MonoBehaviour:
m_Scale: 1 m_Scale: 1
m_AtlasIndex: 0 m_AtlasIndex: 0
m_ClassDefinitionType: 0 m_ClassDefinitionType: 0
- m_Index: 22 - m_Index: 21
m_Metrics: m_Metrics:
m_Width: 43.953125 m_Width: 43.953125
m_Height: 61.53125 m_Height: 61.53125
@@ -421,7 +421,7 @@ MonoBehaviour:
m_Scale: 1 m_Scale: 1
m_AtlasIndex: 0 m_AtlasIndex: 0
m_ClassDefinitionType: 0 m_ClassDefinitionType: 0
- m_Index: 26 - m_Index: 24
m_Metrics: m_Metrics:
m_Width: 43.953125 m_Width: 43.953125
m_Height: 61.53125 m_Height: 61.53125
@@ -436,7 +436,7 @@ MonoBehaviour:
m_Scale: 1 m_Scale: 1
m_AtlasIndex: 0 m_AtlasIndex: 0
m_ClassDefinitionType: 0 m_ClassDefinitionType: 0
- m_Index: 24 - m_Index: 25
m_Metrics: m_Metrics:
m_Width: 43.953125 m_Width: 43.953125
m_Height: 61.53125 m_Height: 61.53125
@@ -451,7 +451,7 @@ MonoBehaviour:
m_Scale: 1 m_Scale: 1
m_AtlasIndex: 0 m_AtlasIndex: 0
m_ClassDefinitionType: 0 m_ClassDefinitionType: 0
- m_Index: 21 - m_Index: 22
m_Metrics: m_Metrics:
m_Width: 43.953125 m_Width: 43.953125
m_Height: 61.53125 m_Height: 61.53125
@@ -466,7 +466,7 @@ MonoBehaviour:
m_Scale: 1 m_Scale: 1
m_AtlasIndex: 0 m_AtlasIndex: 0
m_ClassDefinitionType: 0 m_ClassDefinitionType: 0
- m_Index: 25 - m_Index: 26
m_Metrics: m_Metrics:
m_Width: 43.953125 m_Width: 43.953125
m_Height: 61.53125 m_Height: 61.53125
@@ -680,25 +680,25 @@ MonoBehaviour:
m_GlyphIndex: 28 m_GlyphIndex: 28
m_Scale: 1 m_Scale: 1
- m_ElementType: 1 - m_ElementType: 1
m_Unicode: 51 m_Unicode: 50
m_GlyphIndex: 22 m_GlyphIndex: 21
m_Scale: 1
- m_ElementType: 1
m_Unicode: 55
m_GlyphIndex: 26
m_Scale: 1 m_Scale: 1
- m_ElementType: 1 - m_ElementType: 1
m_Unicode: 53 m_Unicode: 53
m_GlyphIndex: 24 m_GlyphIndex: 24
m_Scale: 1 m_Scale: 1
- m_ElementType: 1
m_Unicode: 50
m_GlyphIndex: 21
m_Scale: 1
- m_ElementType: 1 - m_ElementType: 1
m_Unicode: 54 m_Unicode: 54
m_GlyphIndex: 25 m_GlyphIndex: 25
m_Scale: 1 m_Scale: 1
- m_ElementType: 1
m_Unicode: 51
m_GlyphIndex: 22
m_Scale: 1
- m_ElementType: 1
m_Unicode: 55
m_GlyphIndex: 26
m_Scale: 1
- m_ElementType: 1 - m_ElementType: 1
m_Unicode: 71 m_Unicode: 71
m_GlyphIndex: 42 m_GlyphIndex: 42
@@ -1044,7 +1044,7 @@ Texture2D:
m_ColorSpace: 1 m_ColorSpace: 1
m_PlatformBlob: m_PlatformBlob:
image data: 1048576 image data: 1048576
_typelessdata: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005080a0b0e0e0e0e0e0e0e0e0807050200000306070e0e0e0e0e0e0e0e0c0c0a0602000407090a0e0e0e0e0e0e0e0e090806030000000000000000000000050a0f121313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313100f0d090500000000000000000000000005080a0b0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0908060300000000000000000000000000000000000000000000000000000407090a0e0e0e0e0e0e0e0e0e0e0e0e0c0c0a0602000407090a0e0e0e0e0e0e0e0e09080603000000000000000000000000000000000000000000000000000000000000020507080e0e0e0e0e0e0e0e0b0a08050000000000000000000000000005080a0b0e0e0e0e0e0e0e0e08070502000000000000000000000000000000000000000407090a0e0e0e0e0e0e0e0e0908060300000000000000000000000000000000000000000002060a0c0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0b0a0805000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020507080e0e0e0e0e0e0e0e0b0a0805000000000000000000000000000000000000000000000000000000000000000000000000000000000306070e0e0e0e0e0e0e0e0c0c0a0602000000000000000000000000000000000000000000000000000000000000000000000000000002060a0c0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0b0a08050000000000000000000000000000000000000000000005080a0b0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0908060300000000000000000000000000000000000000000002060a0c0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0b0a080500000000000000000000000000000000000000000000000000000000000002060a0c0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0b0a08050000000000000000000000000000000000000000000005080a0b0e0e0e0e0e0e0e0e08070502000000000000000000000000000000000000000407090a0e0e0e0e0e0e0e0e090806030000000000000000000000000005080a0b0e0e0e0e0e0e0e0e08070502000000000000000000000000000000000000000407090a0e0e0e0e0e0e0e0e090806030000000000000000000000000005080a0b0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e09080603000000000000000000000000000000000000000000060c111517181b1b1b1b1b1b1b1b1514120e090c1012131b1b1b1b1b1b1b1b191816120d0b101416171b1b1b1b1b1b1b1b1615130f0a0400000000000000010910161b1e20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020201d1c1915100a030000000000000000060c111517181b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1615130f0a0400000000000000000000000000000000000000000000050b101316161b1b1b1b1b1b1b1b1b1b1b1b191816120d0b101416171b1b1b1b1b1b1b1b1615130f0a04000000000000000000000000000000000000000000000000000003090e1214151b1b1b1b1b1b1b1b171714110c05000000000000000000060c111517181b1b1b1b1b1b1b1b1514120e0903000000000000000000000000000000050b101416171b1b1b1b1b1b1b1b1615130f0a04000000000000000000000000000000000000070d121619191b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b171714110c05000000000000000000000000000000000000Line truncated _typelessdata: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005080a0b0e0e0e0e0e0e0e0e0807050200000306070e0e0e0e0e0e0e0e0c0c0a0602000407090a0e0e0e0e0e0e0e0e090806030000000000000000000000050a0f121313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313100f0d090500000000000000000000000005080a0b0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0908060300000000000000000000000000000000000000000000000000000407090a0e0e0e0e0e0e0e0e0e0e0e0e0c0c0a0602000407090a0e0e0e0e0e0e0e0e09080603000000000000000000000000000000000000000000000000000000000000020507080e0e0e0e0e0e0e0e0b0a08050000000000000000000000000005080a0b0e0e0e0e0e0e0e0e08070502000000000000000000000000000000000000000407090a0e0e0e0e0e0e0e0e0908060300000000000000000000000000000000000000000002060a0c0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0b0a0805000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020507080e0e0e0e0e0e0e0e0b0a080500000000000000000000000000000000000000000000000000000000000002060a0c0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0b0a080500000000000000000000000000000000000000000000000000000000000002060a0c0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0b0a080500000000000000000000000000000000000000000000000000000000000002060a0c0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0b0a0805000000000000000000000000000000000000000000000000000000000000000000000000000000000306070e0e0e0e0e0e0e0e0c0c0a0602000000000000000000000000000000000000000000000000000000000000000000000000000002060a0c0d0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0b0a08050000000000000000000000000000000000000000000005080a0b0e0e0e0e0e0e0e0e08070502000000000000000000000000000000000000000407090a0e0e0e0e0e0e0e0e090806030000000000000000000000000005080a0b0e0e0e0e0e0e0e0e08070502000000000000000000000000000000000000000407090a0e0e0e0e0e0e0e0e090806030000000000000000000000000005080a0b0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e09080603000000000000000000000000000000000000000000060c111517181b1b1b1b1b1b1b1b1514120e090c1012131b1b1b1b1b1b1b1b191816120d0b101416171b1b1b1b1b1b1b1b1615130f0a0400000000000000010910161b1e20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020201d1c1915100a030000000000000000060c111517181b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1615130f0a0400000000000000000000000000000000000000000000050b101316161b1b1b1b1b1b1b1b1b1b1b1b191816120d0b101416171b1b1b1b1b1b1b1b1615130f0a04000000000000000000000000000000000000000000000000000003090e1214151b1b1b1b1b1b1b1b171714110c05000000000000000000060c111517181b1b1b1b1b1b1b1b1514120e0903000000000000000000000000000000050b101416171b1b1b1b1b1b1b1b1615130f0a04000000000000000000000000000000000000070d121619191b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b171714110c05000000000000000000000000000000000000Line truncated
m_StreamData: m_StreamData:
serializedVersion: 2 serializedVersion: 2
offset: 0 offset: 0