public void HitCallBack(BulletComponent bullet_componet) { // 结算伤害 var all_enemys = BattleVisionControl.Instance().GetEnemys(my_unit.team_id); int hit_radius_sqr = my_unit.aoe_radius * my_unit.aoe_radius; var enumerator = all_enemys.GetEnumerator(); while (enumerator.MoveNext()) { BLUnitBase unit = enumerator.Current; if (unit.IsAlive() && (unit.position - bullet_componet.end_position).SqrMagnitude() <= hit_radius_sqr) { unit.OnDamage(my_unit.attack_power); } } // my_unit.AddEffect(bullet_componet.end_position, "hit_effect3"); // }