Ejemplo n.º 1
0
    //用于获取小关卡 数据
    public NewFloorData GetFloorConfigData(int num)
    {
        NewFloorData fd = null;

        if (!FloorConfigList.TryGetValue(num, out fd))
        {
            fd = null;
        }
        return(fd);
    }
Ejemplo n.º 2
0
    //建筑物被点击了
    public void OnBuildingClick(string btnName)
    {
        int buildingID = 0;

        int.TryParse(btnName, out buildingID);
        NewFloor floorData = null;

        if (FloorList == null)
        {
            FloorList = Core.Data.newDungeonsManager.FloorList;
        }
        if (FloorList.TryGetValue(buildingID, out floorData))
        {
            if (floorData.state != NewFloorState.Unlocked)
            {
                // wxl    打过的小关卡  要能点击 看漫画
                if (buildingID <= Core.Data.newDungeonsManager.lastFloorId)
                {
                    NewFloorData tNewData = Core.Data.newDungeonsManager.GetFloorData(buildingID).config;
                    if (tNewData != null)
                    {
                        if (tNewData.isBoss != 1)
                        {
                            PVEDownloadCartoonController.CreateCartoonPanel(tNewData, true);
                            Lab_Title.transform.parent.gameObject.SetActive(false);
                            Debug.Log(" building click ");
                            PVEDownloadCartoonController.Instance.HideDownBtn(false);
                            return;
                        }
                    }
                }
                if (Core.Data.playerManager.RTData.curLevel >= floorData.config.Unlock)
                {
                    Lab_Title.transform.parent.gameObject.SetActive(false);
                    JCPVEPlotDes.OpenUI(floorData);
                }
                else
                {
                    string strText = Core.Data.stringManager.getString(9094);
                    strText = string.Format(strText, floorData.config.Unlock);
                    SQYAlertViewMove.CreateAlertViewMove(strText);
                }
            }
        }
    }
Ejemplo n.º 3
0
 public static PVEDownloadCartoonController CreateCartoonPanel(NewFloorData tNewFD, bool isShow = false)
 {
     if (instance == null)
     {
         UnityEngine.Object obj = WXLLoadPrefab.GetPrefab(WXLPrefabsName.UIDownloadCartoonPanel);
         if (obj != null)
         {
             GameObject go = Instantiate(obj) as GameObject;
             DBUIController.mDBUIInstance._PVERoot.AddPage(go.name, go);
             PVEDownloadCartoonController fc = go.GetComponent <PVEDownloadCartoonController>();
             instance = fc;
             Transform goTrans = go.transform;
             go.transform.parent        = DBUIController.mDBUIInstance._PVERoot.transform;
             go.transform.localPosition = new Vector3(0, -580, 0);
             goTrans.localScale         = Vector3.one;
             fc.curFD = tNewFD;
             if (isShow == true)
             {
                 fc.OpenCartoonPanel();
             }
             return(fc);
         }
         return(null);
     }
     else
     {
         RED.SetActive(true, instance.gameObject);
         instance.transform.parent        = DBUIController.mDBUIInstance._PVERoot.transform;
         instance.transform.localPosition = new Vector3(0, -580, 0);
         instance.transform.localScale    = Vector3.one;
         instance.curFD = tNewFD;
         instance.Start();
         if (isShow == true)
         {
             instance.OpenCartoonPanel();
         }
         return(instance);
     }
 }
Ejemplo n.º 4
0
    public void SetReward(ItemOfReward[] reward, int floorID, Transform obj)
    {
        ShowUI();
        while (m_grid.transform.childCount > 0)
        {
            Transform child = m_grid.transform.GetChild(0);
            child.parent = null;
            Destroy(child.gameObject);
            child = null;
        }

        m_arryReward                 = reward;
        this.transform.parent        = obj;
        this.transform.localScale    = Vector3.one;
        this.transform.localPosition = Vector3.zero;
        if (m_prefab == null)
        {
            m_prefab = PrefabLoader.loadFromPack("ZQ/PveRewardCell");
        }
        m_flrData = Core.Data.newDungeonsManager.GetFloorConfigData(floorID);

        ShowNormalUI();
    }