Exemplo n.º 1
0
        public void Unload()
        {
            InputManager.instance.inputReceived -= player.ParseInput;
            player = null;

            // For now delete everything non root
            foreach (GameObject root in rootObjects)
            {
                Container containerRoot = root as Container;
                if (containerRoot != null)
                {
                    ContainerAttachmentPoint contents = containerRoot.GetContents();
                    foreach (GameObject obj in contents.GetAttached())
                    {
                        contents.Remove(obj);
                    }
                }
            }
        }