This commit is contained in:
parent
414700473b
commit
531c745b73
|
@ -77,9 +77,8 @@ public class HighPriorityTarget : MonoBehaviour
|
||||||
{
|
{
|
||||||
HP = hp;
|
HP = hp;
|
||||||
}
|
}
|
||||||
GameObject Bao = Instantiate(explodePrefab, transform);
|
GameObject Bao = Instantiate(explodePrefab);
|
||||||
Bao.transform.localPosition = Pos;
|
Bao.transform.position = Pos;
|
||||||
Bao.transform.SetParent(null);
|
|
||||||
Bao.SetActive(true);
|
Bao.SetActive(true);
|
||||||
if (HP < 50 && HP > 0)
|
if (HP < 50 && HP > 0)
|
||||||
{
|
{
|
||||||
|
@ -88,11 +87,11 @@ public class HighPriorityTarget : MonoBehaviour
|
||||||
}
|
}
|
||||||
else if (HP <= 0)
|
else if (HP <= 0)
|
||||||
{
|
{
|
||||||
GameObject BaoMain = Instantiate(explodePrefab, transform);
|
GameObject BaoMain = Instantiate(explodePrefab,transform);
|
||||||
Bao.transform.localPosition = Pos;
|
BaoMain.transform.localPosition = Vector3.zero;
|
||||||
Bao.transform.localScale = Vector3.one * 10;
|
BaoMain.transform.localScale = Vector3.one * 10;
|
||||||
Bao.transform.SetParent(null);
|
BaoMain.transform.SetParent(null);
|
||||||
Bao.SetActive(true);
|
BaoMain.SetActive(true);
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue