统计
This commit is contained in:
parent
7d53694eb5
commit
cdcf8585ab
@ -18,7 +18,7 @@ public class Attack : MonoBehaviour
|
||||
|
||||
[Header("攻击CD时间")] public float attackCooldown = 1f; // 攻击冷却时间
|
||||
private float lastAttackTime = 0f; // 上次攻击的时间
|
||||
|
||||
|
||||
[HideInInspector]
|
||||
public List<GameObject> bulltes = new List<GameObject>();
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user