Example #1
0
 private void UpdateFateCell(GameObject go, int index)
 {
     if (updateNum - currentUpdateNum != 1)
     {
         for (int i = 10 * index + 1; i < 10 * (index + 1); i++)
         {
             var tmpObj = go.CloneEx();
             tmpObj.transform.SetParent(go.transform.parent);
             tmpObj.transform.localPosition = go.transform.localPosition;
             tmpObj.transform.localScale    = Vector3.one;
             var cell = new UIConclusionWindowCell(tmpObj);
             cell.RefreshFate(FateAllList[i]);
             cell.setBoolInit();
             cell.m_bool_Fate = true;
             cellObj.Add(tmpObj);
         }
     }
     else
     {
         for (int i = 10 * index + 1; i < (10 * index) + remainder; i++)
         {
             var tmpObj = go.CloneEx();
             tmpObj.transform.SetParent(go.transform.parent);
             tmpObj.transform.localPosition = go.transform.localPosition;
             tmpObj.transform.localScale    = Vector3.one;
             var cell = new UIConclusionWindowCell(tmpObj);
             cell.RefreshFate(FateAllList[i]);
             cell.setBoolInit();
             cell.m_bool_Fate = true;
             cellObj.Add(tmpObj);
         }
     }
 }
Example #2
0
        void _createCurrentOpportunityCell(GameObject go)
        {
            cellDestory();

            outerOpportunityAllList = CardManager.Instance.outerOpportunityAllList;
            foreach (Opportunity r in outerOpportunityAllList)
            {
                foreach (int i in CardManager.Instance.opportunityIDList)
                {
                    if (i == r.id)
                    {
                        currentOpportunityList.Add(r);
                    }
                }
            }

            if (currentOpportunityList.Count == 0)
            {
                _objItem.SetActiveEx(false);
            }
            else
            {
                for (int i = 0; i < currentOpportunityList.Count; i++)
                {
                    if (i == 0)
                    {
                        var cell = new UIConclusionWindowCell(go);
                        cell.RefreshOuterOpportunity(currentOpportunityList[i]);
                        cell.setBoolInit();
                        cell.m_bool_Big = true;
                    }
                    else
                    {
                        var tmpObj = go.CloneEx();
                        tmpObj.transform.SetParent(go.transform.parent);
                        tmpObj.transform.localPosition = go.transform.localPosition;
                        tmpObj.transform.localScale    = Vector3.one;
                        var cell = new UIConclusionWindowCell(tmpObj);
                        cell.RefreshOuterOpportunity(currentOpportunityList[i]);
                        cell.setBoolInit();
                        cell.m_bool_Big = true;
                        cellObj.Add(tmpObj);
                    }
                }
            }
        }
Example #3
0
        void _createCurrentRelaxCell(GameObject go)
        {
            cellDestory();

            innerRelaxkAllList = CardManager.Instance.innerRelaxkAllList;
            foreach (Relax r in innerRelaxkAllList)
            {
                foreach (int i in CardManager.Instance.relaxkIDList)
                {
                    if (i == r.id)
                    {
                        currentRelaxkList.Add(r);
                    }
                }
            }
            if (currentRelaxkList.Count == 0)
            {
                _objItem.SetActiveEx(false);
            }
            else
            {
                for (int i = 0; i < currentRelaxkList.Count; i++)
                {
                    if (i == 0)
                    {
                        var cell = new UIConclusionWindowCell(go);
                        cell.RefreshRichLeisure(currentRelaxkList[i]);
                        cell.setBoolInit();
                        cell.m_bool_RichLeisure = true;
                    }
                    else
                    {
                        var tmpObj = go.CloneEx();
                        tmpObj.transform.SetParent(go.transform.parent);
                        tmpObj.transform.localPosition = go.transform.localPosition;
                        tmpObj.transform.localScale    = Vector3.one;
                        var cell = new UIConclusionWindowCell(tmpObj);
                        cell.RefreshRichLeisure(currentRelaxkList[i]);
                        cell.setBoolInit();
                        cell.m_bool_RichLeisure = true;
                        cellObj.Add(tmpObj);
                    }
                }
            }
        }
Example #4
0
        private void _createOuterOpportunityCell(GameObject go)
        {
            cellDestory();

            outerOpportunityAllList = CardManager.Instance.outerOpportunityAllList;

            listNum = outerOpportunityAllList.Count / divisor;

            if (outerOpportunityAllList.Count % divisor != 0)
            {
                updateNum = listNum + 1;
                remainder = outerOpportunityAllList.Count % divisor;
            }
            else
            {
                updateNum = listNum;
                remainder = outerOpportunityAllList.Count % divisor;
            }

            for (int i = 0; i < 10; i++)
            {
                if (i == 0)
                {
                    var cell = new UIConclusionWindowCell(go);
                    cell.RefreshOuterOpportunity(outerOpportunityAllList[i]);
                    cell.setBoolInit();
                    cell.m_bool_Big = true;
                }
                else
                {
                    var tmpObj = go.CloneEx();
                    tmpObj.transform.SetParent(go.transform.parent);
                    tmpObj.transform.localPosition = go.transform.localPosition;
                    tmpObj.transform.localScale    = Vector3.one;
                    var cell = new UIConclusionWindowCell(tmpObj);
                    cell.RefreshOuterOpportunity(outerOpportunityAllList[i]);
                    cell.setBoolInit();
                    cell.m_bool_Big = true;
                    cellObj.Add(tmpObj);
                }
            }
        }
Example #5
0
        private void _createChanceCell(GameObject go)
        {
            cellDestory();

            chanceAllList = CardManager.Instance.chanceAllList;

            listNum = chanceAllList.Count / divisor;
            Debug.LogError(chanceAllList.Count);
            if (chanceAllList.Count % divisor != 0)
            {
                updateNum = listNum + 1;
                remainder = chanceAllList.Count % divisor;
            }
            else
            {
                updateNum = listNum;
                remainder = chanceAllList.Count % divisor;
            }

            for (int i = 0; i < 10; i++)
            {
                if (i == 0)
                {
                    var cell = new UIConclusionWindowCell(go);
                    cell.RefreshChance(chanceAllList[i]);
                    cell.setBoolInit();
                    cell.m_bool_Small = true;
                }
                else
                {
                    var tmpObj = go.CloneEx();
                    tmpObj.transform.SetParent(go.transform.parent);
                    tmpObj.transform.localPosition = go.transform.localPosition;
                    tmpObj.transform.localScale    = Vector3.one;
                    var cell = new UIConclusionWindowCell(tmpObj);
                    cell.RefreshChance(chanceAllList[i]);
                    cell.setBoolInit();
                    cell.m_bool_Small = true;
                    cellObj.Add(tmpObj);
                }
            }
        }
Example #6
0
        private void _createRichLeisureCell(GameObject go)
        {
            cellDestory();

            innerRelaxkAllList = CardManager.Instance.innerRelaxkAllList;
            listNum            = innerQualityLifeAllList.Count / divisor;

            if (outerRiskAllList.Count % divisor != 0)
            {
                updateNum = listNum + 1;
                remainder = innerRelaxkAllList.Count % divisor;
            }
            else
            {
                updateNum = listNum;
                remainder = innerRelaxkAllList.Count % divisor;
            }

            for (int i = 0; i < 10; i++)
            {
                if (i == 0)
                {
                    var cell = new UIConclusionWindowCell(go);
                    cell.RefreshRichLeisure(innerRelaxkAllList[i]);
                    cell.setBoolInit();
                    cell.m_bool_RichLeisure = true;
                }
                else
                {
                    var tmpObj = go.CloneEx();
                    tmpObj.transform.SetParent(go.transform.parent);
                    tmpObj.transform.localPosition = go.transform.localPosition;
                    tmpObj.transform.localScale    = Vector3.one;
                    var cell = new UIConclusionWindowCell(tmpObj);
                    cell.RefreshRichLeisure(innerRelaxkAllList[i]);
                    cell.setBoolInit();
                    cell.m_bool_RichLeisure = true;
                    cellObj.Add(tmpObj);
                }
            }
        }