Esempio n. 1
0
    public void BreakOrb()
    {
        if (this.orbColor == Orb.OrbColor.WHITE)
        {
            // undo the pickupz but keep the ball in place
            this.item.Drop();
            Vector3 removePickupZ = new Vector3(0, this.item.pickupZ, 0);
            this.item.transform.position += removePickupZ;
            for (int i = 0; i < this.childOrbs.Count; i++)
            {
                Orb orb = this.childOrbs[i];
                orb.item.transform.position = this.item.transform.position;
                orb.item.ReturnToLab();
            }
            this.childOrbs.Clear();

            OrbManager om = FindObjectOfType <OrbManager>();
            om.ReturnGhostOrb(this);
        }
    }