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;
if (targetAudience.Hp<=0)
{
UserObj.killNum++;
Debug.Log(UserObj.name+"击杀数量"+ UserObj.killNum);
}
targetAudience.HurtDirectin = direction;
}

View File

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