Beispiel #1
0
        //显示
        public override void OnEnable()
        {
#if UNITY_STANDALONE_WIN || UNITY_EDITOR
#else
            SdkConector.ShowToolBar(1);
#endif
        }
        //显示
        public override void OnEnable()
        {
#if UNITY_STANDALONE_WIN || UNITY_EDITOR || SKIP_SDK
#else
            SdkConector.ShowToolBar(1);
#endif
            Debug.Log("GameUserData.Instance.GameUserGold.ToString()  " + GameUserModel.Instance.mGameUserGold.ToString());
            mGoldText.text    = GameUserModel.Instance.mGameUserGold.ToString();
            mDiamondText.text = GameUserModel.Instance.mGameUserDmd.ToString();


            //初始化
            mBattle.value = true;

            //             if (SystemNoticeData.Instance.StateType == GameDefine.SystemNoticeState.SystemUnRead)
            //             {
            //                 CreateSystemNotice();
            //             }

            // #if UNITY_STANDALONE_WIN
            //             if (InputNotice == null && IGuideTaskManager.Instance().IsLineTaskFinish())
            //             {
            //                 ResourceUnit objUnit = ResourcesManager.Instance.loadImmediate(GameConstDefine.LoadInputSend, ResourceType.PREFAB);
            //                 InputNotice = GameObject.Instantiate(objUnit.Asset) as GameObject;
            //                 InputNotice.transform.parent = mRoot;
            //                 InputNotice.transform.localPosition = Vector3.zero;
            //                 InputNotice.transform.localScale = Vector3.one;
            //             }
            // #endif
        }
        //SDK检查成功
        void SdkServerCheckSuccess()
        {
            ShowServer(LOGINUI.Login);
            mWaitingParent.gameObject.SetActive(false);

            #if UNITY_STANDALONE_WIN || UNITY_EDITOR || SKIP_SDK
            #else
            SdkConector.ShowToolBar(0);
            #endif
        }
Beispiel #4
0
        public static void LogOutToLogin()
        {
            if (PlayerManager.Instance != null)
            {
                if (PlayerManager.Instance.AccountDic != null)
                {
                    PlayerManager.Instance.AccountDic.Clear();
                }
                Iselfplayer player = PlayerManager.Instance.LocalPlayer;
                if (player != null)
                {
                    player.UserGameItemsCount.Clear();
                    player.UserGameItemsCoolDown.Clear();
                    player.UserGameItems.Clear();
                    Debug.LogError("player");
                }
                MsgInfoManager.Instance.RemoveKillMsg();
                AltarData.Instance.DelAllAltar();
                FriendManager.Instance.DelAllList();
                PlayerManager.Instance.DestoryAllEntity();
                GameUserModel.Instance.Clear();
                //GoodsModel.Instance.Clear();
                MailModel.Instance.Clear();
                SystemNoticeData.Instance.Clear();
                MarketHeroListModel.Instance.Clear();
                MarketRuneListModel.Instance.Clear();
                RuneEquipModel.Instance.Clear();
                PlayerManager.Instance.LocalAccount = PlayerManager.Instance.LocalPlayer = null;
            }

            NetworkManager.Instance.canReconnect = false;
            NetworkManager.Instance.Close();

#if UNITY_STANDALONE_WIN || UNITY_EDITOR || SKIP_SDK
#else
            SdkConector.ShowToolBar(1);
#endif
        }