Exemplo n.º 1
0
    public void PrepareEnterDungeons()
    {
        if (GameSettings.Singleton.m_isSingle)
        {
            //test
            //Debug.Log("begin random map");
            RandomMapGenerator rmg = new RandomMapGenerator();
            rmg.setup(1, 1, 4f, 9f, 8f, 5f, 5);
            //FileStream aFiler = File.OpenRead("testData.txt");

            //StreamReader sr = new StreamReader("E:\\testData.txt", Encoding.Default);
            string result = "";
            //                String line;
            //while ((line = sr.ReadLine()) != null)
            //{
            //   result += line;
            //}
            Debug.Log("finish random map");
            result = rmg.generate();
            Debug.Log(result);
            SM.RandomRoomLevel.Singleton.ParseDataBuildTree(result);
            SM.RandomRoomLevel.Singleton.NotifyChanged((int)SM.RandomRoomLevel.ENPropertyChanged.enEnterDungeon, null);
        }
        else
        {
            // 进入LOADING
            Loading.Singleton.SetLoadingTips((int)LOADINGTIPSENUM.enEnterCopy);


            // 发送当前选择的 战友
            int msgID = MiniServer.Singleton.SendSelectBattleHelper(StageMenu.Singleton.m_curHelperGuid);

            UIStageMenu.GetInstance().RegisterRespondFuncByMessageID(msgID, OnSelectHelperCallback);
        }
    }
Exemplo n.º 2
0
    UIToggle m_isRolling = null; //是否允许翻滚

    static public UIStageMenu GetInstance()
    {
        UIStageMenu self = UIManager.Singleton.GetUIWithoutLoad <UIStageMenu>();

        if (self != null)
        {
            return(self);
        }
        self = UIManager.Singleton.LoadUI <UIStageMenu>("UI/UIStageMenu", UIManager.Anchor.Center);
        return(self);
    }