示例#1
0
        private void OnDestroy()
        {
            JoinButton.onClick.RemoveAllListeners();
            HostButton.onClick.RemoveAllListeners();
            CloseButton.onClick.RemoveAllListeners();

            HostPanel.GameRegistered -= OnHostedGameRegistered;
            HostPanel.Canceled       -= OnHostingCanceled;

            JoinPanel.GameJoined -= OnGameJoined;
            JoinPanel.Canceled   -= OnJoinCanceled;

            HostPanel = null;
            JoinPanel = null;
        }
        private void OnDestroy()
        {
            JoinButton.onClick.RemoveAllListeners();
            HostButton.onClick.RemoveAllListeners();
            CloseButton.onClick.RemoveAllListeners();

            HostPanel.GameRegistered -= OnHostedGameRegistered;
            HostPanel.Canceled -= OnHostingCanceled;

            JoinPanel.GameJoined -= OnGameJoined;
            JoinPanel.Canceled -= OnJoinCanceled;

            HostPanel = null;
            JoinPanel = null;
        }