/** * */ public static void ReleaseGhost(GhostController ghost) { print ("ReleaseGhostReleaseGhostReleaseGhostReleaseGhost"); if (bKillingGhosts) return; Debug.Log("ReleaseGhost - Begin"); GameObject go = ghost.gameObject; if (ghost.nameLabel != null) { ReleaseUserNameLabel(ghost.nameLabel); ghost.setLabel(null); } // Delete hat // GameObject head = ghost.transform.FindChild("Head").gameObject; // if (head.transform.childCount > 0) // { // GameObject.Destroy(head.transform.GetChild(0).gameObject); // } go.SetActive(false); mGhosts.Add(go); mActiveGhosts.Remove(ghost); mActiveGhostMap.Remove( (int)ghost.DiesAtMeters ); Debug.Log("ReleaseGhost - End"); }