角色死亡
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Combat;
|
||||
using Lean.Pool;
|
||||
using NaughtyAttributes;
|
||||
using SLSFramework.UModAssistance;
|
||||
using UnityEngine;
|
||||
@@ -131,5 +132,10 @@ namespace Continentis.MainGame.Character
|
||||
this.characterView = characterView;
|
||||
return characterView;
|
||||
}
|
||||
|
||||
public virtual void Die()
|
||||
{
|
||||
CombatMainManager.Instance.characterController.RemoveCharacter(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -226,6 +226,11 @@ namespace Continentis.MainGame.Character
|
||||
{
|
||||
ModifyAttribute("Health", -damage);
|
||||
MainGameManager.Instance.basePrefabs.GenerateHurtText(damage, characterView);
|
||||
|
||||
if (GetAttribute("Health") <= 0)
|
||||
{
|
||||
Die();
|
||||
}
|
||||
}
|
||||
|
||||
public void Heal(int heal)
|
||||
|
||||
Reference in New Issue
Block a user