Пример #1
0
    private void InitUIPlay()
    {
        mask.SetActive(false);
        needMask = 0;
        if (LevelMgr.GetInstance().GetIndexByID(LevelMgr.GetInstance().CurLevelID) == "1-1")
        {
            Debug.Log("1-1");
            needMask = 1;
        }
        if (LevelMgr.GetInstance().GetIndexByID(LevelMgr.GetInstance().CurLevelID) == "1-2")
        {
            needMask = 2;
        }



        buttonCheck = true;
        animator    = GetComponent <Animator>();
        UIEvent.RegEvent(UIEvent.UI_LEVELSTART, LevelStart);
        //UIEvent.RegEvent(UIEvent.UI_LEVEL_USEREC, LevelUseRec);

        //显示关卡拼图面板原图
        levelID = LevelMgr.GetInstance().CurLevelID;
        if (!debugFlag)
        {
            LoadOriginImg();
        }

        operationHistoryRecorder.SetLevelId(levelID);
        // data = LevelMgr.GetInstance().GetLevelConfig(levelID);
        // value = LevelMgr.GetInstance().GetValueConfig();

        //显示关卡序号
        BaseLevel levelmode = LevelMgr.GetInstance().CurLevelMode;

        levelmode.OnEnter(levelText);
        //levelText.text="LEVEL "+LevelMgr.GetInstance().GetIndexByID(levelID);//modify at 20191108 wuhuolong

        // Debug.LogError(LevelMgr.GetInstance().GetIndexByID(levelID));

        //heimu-test
        //black.alpha = 1.0f;
        //isShadow = false;
        //// levelTimer.SetTime(0);
        //StartCoroutine(ShadowInit());
        UIEvent.Broadcast(UIEvent.UI_LEVELSTART);

        //heimu-test
        StartCoroutine(Guiding());
    }