This commit is contained in:
parent
531c745b73
commit
6b8725f0f8
|
@ -160,7 +160,7 @@ public class UnmannedAerialVehicle : MonoBehaviour
|
||||||
HighPriorityTarget highPriorityTarget = _transform.GetComponent<HighPriorityTarget>();
|
HighPriorityTarget highPriorityTarget = _transform.GetComponent<HighPriorityTarget>();
|
||||||
if (highPriorityTarget )
|
if (highPriorityTarget )
|
||||||
{
|
{
|
||||||
highPriorityTarget.BeAssaulted(transform.position, true);
|
highPriorityTarget.BeAssaulted(atkPos, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
GameObject Bao = Instantiate(explodePrefab, _transform);
|
GameObject Bao = Instantiate(explodePrefab, _transform);
|
||||||
|
@ -246,6 +246,7 @@ public class UnmannedAerialVehicle : MonoBehaviour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vector3 atkPos = new Vector3();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 远程攻击
|
/// 远程攻击
|
||||||
|
@ -260,11 +261,14 @@ public class UnmannedAerialVehicle : MonoBehaviour
|
||||||
obj.SetActive(true);
|
obj.SetActive(true);
|
||||||
//Rigidbody rb = obj.GetComponent<Rigidbody>();
|
//Rigidbody rb = obj.GetComponent<Rigidbody>();
|
||||||
//rb.AddForce(bulletPoint.forward * 20f, ForceMode.Impulse);
|
//rb.AddForce(bulletPoint.forward * 20f, ForceMode.Impulse);
|
||||||
obj.transform.DOMove(v3, 2).SetEase(Ease.Linear);
|
obj.transform.DOMove(v3, 2).SetEase(Ease.Linear).OnComplete(() => {
|
||||||
|
Destroy(obj);
|
||||||
|
});
|
||||||
ShellBoom sb = obj.AddComponent<ShellBoom>();
|
ShellBoom sb = obj.AddComponent<ShellBoom>();
|
||||||
sb.isPlayer = unmannedAerialVehicleManage.equipmentCommon.isPlayer;
|
sb.isPlayer = unmannedAerialVehicleManage.equipmentCommon.isPlayer;
|
||||||
sb.onShellAttack.AddListener(() =>
|
sb.onShellAttack.AddListener(() =>
|
||||||
{
|
{
|
||||||
|
atkPos = sb.transform.position;
|
||||||
AddBao(attackTarget.transform);
|
AddBao(attackTarget.transform);
|
||||||
// 销毁objectToDestroy对象
|
// 销毁objectToDestroy对象
|
||||||
//BeAssaulted("攻击到目标");
|
//BeAssaulted("攻击到目标");
|
||||||
|
|
Loading…
Reference in New Issue