fixed spider death
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq.Expressions;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Events;
|
using UnityEngine.Events;
|
||||||
|
|
||||||
@@ -45,16 +46,17 @@ namespace Invector
|
|||||||
|
|
||||||
if (!_isDead && _currentHealth <= 0)
|
if (!_isDead && _currentHealth <= 0)
|
||||||
{
|
{
|
||||||
_isDead = true;
|
//_isDead = true;
|
||||||
|
isDead = true;
|
||||||
onDead.Invoke(gameObject);
|
onDead.Invoke(gameObject);
|
||||||
}
|
}
|
||||||
else if (isDead && _currentHealth > 0)
|
else if (isDead && _currentHealth > 0)
|
||||||
{
|
{
|
||||||
_isDead = false;
|
isDead = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public bool isDead
|
public virtual bool isDead
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -593,7 +593,7 @@ namespace Invector.vCharacterController.AI
|
|||||||
_capsuleCollider.height = colliderHeight;
|
_capsuleCollider.height = colliderHeight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public new bool isDead
|
public override bool isDead
|
||||||
{
|
{
|
||||||
get => base.isDead;
|
get => base.isDead;
|
||||||
set
|
set
|
||||||
|
|||||||
Reference in New Issue
Block a user