// -------------------------------------------

        /*
         * Release resources
         */
        public void Destroy()
        {
            if (m_hasBeenDestroyed)
            {
                return;
            }
            m_hasBeenDestroyed = true;

            NetworkEventController.Instance.NetworkEvent -= OnNetworkEvent;

            if (instance != null)
            {
                GameObject.Destroy(instance.gameObject);
                instance = null;
            }
        }
Example #2
0
        // -------------------------------------------

        /*
         * Set if the connection is going to be local(UNET) or global(Sockets)
         */
        public void MenuController_SetLocalGame(bool _value)
        {
            YourNetworkTools.SetLocalGame(_value);
        }