Ejemplo n.º 1
0
 public static void init()
 {
     if (instance == null)
     {
         instance = new MouseClickMgr();
     }
 }
Ejemplo n.º 2
0
        public static void init()
        {
            bool flag = MouseClickMgr.instance == null;

            if (flag)
            {
                MouseClickMgr.instance = new MouseClickMgr();
            }
        }
Ejemplo n.º 3
0
        private void setChangeMapData(uint scene_setting_mapid, Variant svrConf, Variant localConf_TO_DEL)
        {
            changeMapTimeSt = NetClient.instance.CurServerTimeStamp;
            curSvrConf      = svrConf;
            InterfaceMgr.doCommandByLua("MapModel:getInstance().getmapinfo", "model/MapModel", curSvrConf);
            debug.Log("C#1::::" + svrConf.dump());
            MediaClient.instance.StopSounds(); //清理所有的音效缓存
            GAMEAPI.ClearAllOneAsset();
            Resources.UnloadUnusedAssets();
            System.GC.Collect(0, System.GCCollectionMode.Forced);

            if (sdk_sendroleLogin)
            {
                sdk_sendroleLogin = false;
                //     LGPlatInfo.inst.logSDKAP("roleLogin");
            }

            MouseClickMgr.init();


            int local_mapid = svrConf["id"]._int;

            //m_nCurMapSceneSettingID = scene_setting_mapid;
            m_nCurMapID = local_mapid;

            bool isFb = false;
            int  idx  = -1;

            for (int i = 0; i < AutoPlayModel.getInstance().autoplayCfg4FB.Count; i++)
            {
                if (AutoPlayModel.getInstance().autoplayCfg4FB[i].map.Contains(m_nCurMapID))
                {
                    isFb = true;
                    idx  = i;
                    break;
                }
            }
            if (isFb)
            {
                if (idx != -1)
                {
                    StateInit.Instance.Distance     = AutoPlayModel.getInstance().autoplayCfg4FB[idx].Distance;
                    StateInit.Instance.PickDistance = AutoPlayModel.getInstance().autoplayCfg4FB[idx].DistancePick;
                }
            }
            else
            {
                StateInit.Instance.Distance     = StateInit.Instance.DistanceNormal;
                StateInit.Instance.PickDistance = StateInit.Instance.PickDistanceNormal;
            }
            //m_CurLocalConf = localConf;
            InterfaceMgr.getInstance().closeAllWin();

            if (MapProxy.getInstance().openWin != null && MapProxy.getInstance().openWin != "")
            {
                if (MapProxy.getInstance().Win_uiData != null && MapProxy.getInstance().Win_uiData != "")
                {
                    ArrayList arr = new ArrayList();
                    arr.Add(MapProxy.getInstance().Win_uiData);
                    InterfaceMgr.getInstance().ui_async_open(MapProxy.getInstance().openWin, arr);
                }
                else
                {
                    InterfaceMgr.getInstance().ui_async_open(MapProxy.getInstance().openWin);
                }
                MapProxy.getInstance().openWin    = null;
                MapProxy.getInstance().Win_uiData = null;
            }
            //combo_txt.clear();


            //TaskModel.getInstance().isSubTask = false;
            LEVEL_PLOT_ID = 0;
            REV_RES_LIST_OK();
            REV_PLOT_PLAY_OVER();
        }