fixed spider death

This commit is contained in:
2025-02-03 14:22:39 +01:00
parent d606dae8c2
commit fdf972b1da
2 changed files with 6 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq.Expressions;
using UnityEngine;
using UnityEngine.Events;
@@ -45,16 +46,17 @@ namespace Invector
if (!_isDead && _currentHealth <= 0)
{
_isDead = true;
//_isDead = true;
isDead = true;
onDead.Invoke(gameObject);
}
else if (isDead && _currentHealth > 0)
{
_isDead = false;
isDead = false;
}
}
}
public bool isDead
public virtual bool isDead
{
get
{

View File

@@ -593,7 +593,7 @@ namespace Invector.vCharacterController.AI
_capsuleCollider.height = colliderHeight;
}
}
public new bool isDead
public override bool isDead
{
get => base.isDead;
set