コード例 #1
0
    public static CDailyCellView CreateCellView(int day)
    {
        if (mObj == null)
        {
            mObj = Resources.Load("pbWGDailyCellView");
        }

        GameObject go = Instantiate(mObj) as GameObject;

        CDailyCellView cv = go.GetComponent <CDailyCellView>();

        return(cv);
    }
コード例 #2
0
    public void freshWithDailyReward(int daily, bool signed)
    {
        for (int i = 0, max = szDaily7Reward.Count; i < max; i++)
        {
            CDailyCellView cell = CDailyCellView.CreateCellView(i + 1);

            cell.freshDailyCell(szDaily7Reward[i], i + 1, daily + 1);

            SDK.AddChild(cell.gameObject, szCellPanel[i]);
        }


        if (signed)
        {
            curReward = szDaily7Reward[daily - 1];
        }
        else
        {
            curReward = szDaily7Reward[daily];
        }
    }