Example #1
0
    public void DequeueAndDestroy()
    {
        GameObject explosion = Instantiate(explosionParticleObj, this.transform) as GameObject;

        explosion.transform.SetParent(null);
        if (isEF)
        {
            GameManager._EFDeathCount--;
            //Debug.Log("BoidHealthBreakPoint1");
            dialogue.ZionCelebrate(GameManager._EFDeathCount);
            // Debug.Log("BoidHealthBreakPoint2");
        }
        else
        {
            GameManager._ZionDeathCount--;
            //  Debug.Log("BoidHealthBreakPoint1");
            dialogue.EFCelebrate(GameManager._ZionDeathCount);
            //Debug.Log("BoidHealthBreakPoint2");
        }
        // targetingSystem.targetList.Remove(this.gameObject);
        Destroy(gameObject);
    }