if (animname_attack_now == animname_normalAttack)
{
if (attack_timer > time_Attack)
{
//产生伤害
target.GetComponent<PlayAttack>().TakeDamage(attack);
animname_attack_now = animname_idle;
}
}
else if (animname_attack_now == animname_maxAttack)
{
if (attack_timer > time_Attack)
{
//产生伤害
target.GetComponent<PlayAttack>().TakeDamage(attack);
animname_attack_now = animname_idle;
}
}
调试过。可以使用playerattack的takedamege方法,但是狼的脚本不能调用这个方法