Пример #1
0
    private void OnClickOk(GameObject go)
    {
        if (this.type == InvitateType.KHOrZDY && Singleton <PvpRoomView> .Instance.IsOpen)
        {
            Singleton <TipView> .Instance.ShowViewSetText("您需要离开此房间,才能加入他的游戏", 1f);

            return;
        }
        this.task.Stop();
        Singleton <InvitationView> .Instance.FixGrid();

        if (this.type == InvitateType.KHOrZDY)
        {
            if (PvpMatchMgr.State == PvpMatchState.Matching || PvpMatchMgr.State == PvpMatchState.Matched)
            {
                Singleton <InvitationView> .Instance.GetResult(this.roomId, false, this.targetSummerId, this.type);

                Singleton <TipView> .Instance.ShowViewSetText("您正在匹配,无法接受好友开黑邀请", 1f);

                UnityEngine.Object.DestroyImmediate(base.gameObject);
                return;
            }
            CtrlManager.DestroyAllWindowsExcept(new WindowID[]
            {
                WindowID.MenuView,
                WindowID.MainBg,
                WindowID.MenuTopBarView,
                WindowID.MenuBottomBarView,
                WindowID.ArenaModeView
            });
        }
        Singleton <InvitationView> .Instance.GetResult(this.roomId, true, this.targetSummerId, this.type);

        UnityEngine.Object.DestroyImmediate(base.gameObject);
    }
 public override void ClearViews()
 {
     base.ClearViews();
     CtrlManager.DestroyAllWindowsExcept(new WindowID[]
     {
         WindowID.VictoryView
     });
     ResourceManager.UnLoadAllAssets(false);
     this.SendAddProgress(5);
     base.SetGoOn();
 }
 public override void ClearViews()
 {
     base.ClearViews();
     if (NewbieManager.Instance.IsDoNewbieSpecialProcess())
     {
         CtrlManager.DestroyAllWindowsExcept(new WindowID[]
         {
             WindowID.NewbieLoadView
         });
     }
     else
     {
         CtrlManager.DestroyAllWindows();
         ResourceManager.UnLoadAllAssets(false);
     }
     base.SetGoOn();
 }