This commit is contained in:
parent
ab43740c90
commit
414700473b
|
@ -172,6 +172,7 @@ public class DeviceManager : MonoSingleton<DeviceManager>
|
|||
}
|
||||
else if (info[0] == "KeyTarget")
|
||||
{
|
||||
Debug.Log("KeyTarget...:" + data);
|
||||
HighPriorityTarget highPriorityTarget= HighPriorityTarget.HighPriorityTargets.Find(x => x.Number == info[1]);
|
||||
if(highPriorityTarget)
|
||||
{
|
||||
|
|
|
@ -47,7 +47,8 @@ public class HighPriorityTarget : MonoBehaviour
|
|||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
HighPriorityTargets.Add(this);
|
||||
Number = HighPriorityTargets.Count.ToString();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
|
|
|
@ -254,12 +254,13 @@ public class UnmannedAerialVehicle : MonoBehaviour
|
|||
{
|
||||
while (attackTarget)
|
||||
{
|
||||
Vector3 v3 = attackTarget.position;
|
||||
yield return new WaitForSeconds(5f);
|
||||
GameObject obj = Instantiate(bulletPrefab, bulletPoint.position, bulletPoint.rotation);
|
||||
obj.SetActive(true);
|
||||
//Rigidbody rb = obj.GetComponent<Rigidbody>();
|
||||
//rb.AddForce(bulletPoint.forward * 20f, ForceMode.Impulse);
|
||||
obj.transform.DOMove(attackTarget.position, 2).SetEase(Ease.Linear);
|
||||
obj.transform.DOMove(v3, 2).SetEase(Ease.Linear);
|
||||
ShellBoom sb = obj.AddComponent<ShellBoom>();
|
||||
sb.isPlayer = unmannedAerialVehicleManage.equipmentCommon.isPlayer;
|
||||
sb.onShellAttack.AddListener(() =>
|
||||
|
|
Loading…
Reference in New Issue