Update layers for GameObjects and add EnemyDeathBehavior class
This commit is contained in:
@@ -20,8 +20,14 @@ namespace Weapons
|
||||
if (hit.gameObject == character.gameObject) continue;
|
||||
|
||||
var damage = GetFinalDamage();
|
||||
health.TakeDamage(damage);
|
||||
health?.TakeDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDrawGizmosSelected()
|
||||
{
|
||||
Gizmos.color = Color.red;
|
||||
Gizmos.DrawWireSphere(transform.position, GetFinalRange());
|
||||
}
|
||||
}
|
||||
}
|
@@ -11,7 +11,6 @@ namespace Weapons
|
||||
{
|
||||
private float timer;
|
||||
|
||||
[SerializeField] private float cooldown = 1f;
|
||||
[SerializeField] protected Character character;
|
||||
[OdinSerialize, InlineProperty] public WeaponStats weaponStats = new();
|
||||
|
||||
|
Reference in New Issue
Block a user