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