Merge branch 'master' of http://git.umayle.com:2023/yulong/NewN_UAVPlane
This commit is contained in:
commit
46cca7cade
|
@ -80,11 +80,20 @@ public class HighPriorityTarget : MonoBehaviour
|
||||||
Bao.transform.localPosition = Pos;
|
Bao.transform.localPosition = Pos;
|
||||||
Bao.transform.SetParent(null);
|
Bao.transform.SetParent(null);
|
||||||
Bao.SetActive(true);
|
Bao.SetActive(true);
|
||||||
if (HP < 50)
|
if (HP < 50 && HP > 0)
|
||||||
{
|
{
|
||||||
ModerFull.SetActive(false);
|
ModerFull.SetActive(false);
|
||||||
ModerDamage.SetActive(true);
|
ModerDamage.SetActive(true);
|
||||||
}
|
}
|
||||||
|
else if (HP <= 0)
|
||||||
|
{
|
||||||
|
GameObject BaoMain = Instantiate(explodePrefab, transform);
|
||||||
|
Bao.transform.localPosition = Pos;
|
||||||
|
Bao.transform.localScale = Vector3.one * 10;
|
||||||
|
Bao.transform.SetParent(null);
|
||||||
|
Bao.SetActive(true);
|
||||||
|
Destroy(gameObject);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -304,8 +304,8 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
var highPriorityTargets = attackColliders1.FindAll(x => x.transform.GetComponent<HighPriorityTarget>());
|
var highPriorityTargets = attackColliders1.FindAll(x => x.transform.GetComponent<HighPriorityTarget>());
|
||||||
if (highPriorityTargets.Count > 0)
|
if (highPriorityTargets.Count > 0)
|
||||||
{
|
{
|
||||||
SendMsg(attackColliders1[0].transform);
|
SendMsg(highPriorityTargets[0].transform);
|
||||||
unmannedAerialVehicles[0].AttAck(attackColliders1[0].transform);
|
unmannedAerialVehicles[0].AttAck(highPriorityTargets[0].transform);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
SendMsg(attackColliders1[0].transform);
|
SendMsg(attackColliders1[0].transform);
|
||||||
|
|
Loading…
Reference in New Issue