清除缓存
This commit is contained in:
parent
e79bd2ada7
commit
a187c6ecc7
26
Role/Role.cs
26
Role/Role.cs
@ -6,6 +6,7 @@ using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using DG.Tweening;
|
||||
using TMPro;
|
||||
using Debug = UnityEngine.Debug;
|
||||
|
||||
public enum Camp
|
||||
{/// <summary>
|
||||
@ -281,6 +282,13 @@ public class Role : Fun
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
if (hp < 0)
|
||||
{
|
||||
Debug.LogError("!!!!!!!!!!!跳过while");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (AnimationTree.Count == 0)
|
||||
{
|
||||
isAnimationPlay = false;
|
||||
@ -318,6 +326,13 @@ public class Role : Fun
|
||||
|
||||
if (animationHighlight >= 0 && animationHighlight < AnimationTree.Count)
|
||||
{
|
||||
if (hp < 0)
|
||||
{
|
||||
Debug.LogError("@@@@@@@@@@@@跳过while");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
OnAnimationIng?.Invoke(animationHighlight);
|
||||
await Task.Delay(AnimationTree[animationHighlight].CharacterAnimationFrameInterval);
|
||||
}
|
||||
@ -343,9 +358,9 @@ public class Role : Fun
|
||||
SpawnMonster.intance.Index += 1;
|
||||
}
|
||||
|
||||
Destroy(gameObject);
|
||||
Destroy(this);
|
||||
//IsDead = true;
|
||||
Destroy(this.gameObject);
|
||||
//Destroy(this);
|
||||
|
||||
}
|
||||
|
||||
if (lsanimationHighlight == hitIndex)
|
||||
@ -719,4 +734,9 @@ public class Role : Fun
|
||||
//UnityEngine.Debug.Log("破甲关系:" + "萌妖" + AttackType + "::" + "敌人" + Target.defenseType + "伤害加成" + relation);
|
||||
return relation;
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
this.AnimationTree = null;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user