public void TurnOver() { //攻击后返回 takedamage.PhysicAttackDamage(); //计算伤害 anim.SetBool("fightToWalk", true); Vector3 backPos = transform.position - dir.normalized * (policeRange - attackRange); //mySequence.Append(transform.DORotate(new Vector3(0,180,0), 0.3f)); //mySequence.Append(transform.DOLookAt(-dir, 0.3f)); transform.Rotate(Vector3.up, 180); //转身 mySequence.Append(transform.DOMove(backPos, 1f)); //返回 StartCoroutine("Backed"); //返回后开启携程重新面对敌人 }