This commit is contained in:
GL 2024-12-27 17:13:06 +08:00
parent 7d53694eb5
commit cdcf8585ab
3 changed files with 9 additions and 3 deletions

View File

@ -82,6 +82,11 @@ public class Fun : Base
} }
targetAudience.Hp -= finalDamage; targetAudience.Hp -= finalDamage;
if (targetAudience.Hp<=0)
{
UserObj.killNum++;
Debug.Log(UserObj.name+"击杀数量"+ UserObj.killNum);
}
targetAudience.HurtDirectin = direction; targetAudience.HurtDirectin = direction;
} }

View File

@ -75,7 +75,7 @@ public class Role : Fun
public float AttackCD;//攻击CD public float AttackCD;//攻击CD
public float CritRate;//暴击率 public float CritRate;//暴击率
public float CriticalHitRateBonus;//暴击加成 public float CriticalHitRateBonus;//暴击加成
[Header("击杀数量")] public int killNum;
public float Hp public float Hp
{ {
@ -160,7 +160,7 @@ public class Role : Fun
public event AnimationItem OnAnimationIng; public event AnimationItem OnAnimationIng;
public event AnimationItem OnAnimationEnd; public event AnimationItem OnAnimationEnd;
[Header("动画是否正常播放")] public bool isAnimationPlay = false;//动画是否正常播放 [Header("动画是否正常播放")] public bool isAnimationPlay = false;//动画是否正常播放
[Header("ÅöײÌå")]public CircleCollider2D mycollider; [Header("碰撞体")]public Collider2D mycollider;
[Header("攻击脚本")] public Attack attackClass; [Header("攻击脚本")] public Attack attackClass;
[Header("当前播放图片序列")] public int CurrentIndex; [Header("当前播放图片序列")] public int CurrentIndex;
@ -314,6 +314,7 @@ public class Role : Fun
{ {
animationHighlight = dieIndex; animationHighlight = dieIndex;
Navigation.PauseAnimation(); Navigation.PauseAnimation();
mycollider.enabled = false;
Debug.Log("die"); Debug.Log("die");
} }