コード例 #1
0
ファイル: TableManager.cs プロジェクト: robin1392/robin
 public bool LoadFromFile(string path)
 {
     BoxProductInfo.Init(new TableLoaderLocalCSV <int, TDataBoxOpenInfo>(), path, "BoxOpenInfo.csv");
     CoopMode.Init(new TableLoaderLocalCSV <int, TDataCoopMode>(), path, "CoopMode.csv");
     CoopModeMinion.Init(new TableLoaderLocalCSV <int, TDataCoopModeMinion>(), path, "CoopModeMinion.csv");
     CoopModeBossInfo.Init(new TableLoaderLocalCSV <int, TDataCoopModeBossInfo>(), path, "CoopModeBossInfo.csv");
     DiceInfo.Init(new TableLoaderLocalCSV <int, TDataDiceInfo>(), path, "DiceInfo.csv");
     DiceUpgrade.Init(new TableLoaderLocalCSV <int, TDataDiceUpgrade>(), path, "DiceUpgrade.csv");
     DiceLevelInfo.Init(new TableLoaderLocalCSV <int, TDataDiceLevelInfo>(), path, "DiceLevelInfo.csv");
     GuardianInfo.Init(new TableLoaderLocalCSV <int, TDataGuardianInfo>(), path, "GuardianInfo.csv");
     Vsmode.Init(new TableLoaderLocalCSV <int, TDataVsmode>(), path, "Vsmode.csv");
     LangEN.Init(new TableLoaderLocalCSV <int, TDataLangEN>(), path, "LangEN.csv");
     LangKO.Init(new TableLoaderLocalCSV <int, TDataLangKO>(), path, "LangKO.csv");
     RankingReward.Init(new TableLoaderLocalCSV <int, TDataRankingReward>(), path, "RankingReward.csv");
     ClassInfo.Init(new TableLoaderLocalCSV <int, TDataClassInfo>(), path, "ClassInfo.csv");
     SeasonpassInfo.Init(new TableLoaderLocalCSV <int, TDataSeasonpassInfo>(), path, "SeasonpassInfo.csv");
     SeasonpassReward.Init(new TableLoaderLocalCSV <int, TDataSeasonpassReward>(), path, "SeasonpassReward.csv");
     ClassReward.Init(new TableLoaderLocalCSV <int, TDataClassReward>(), path, "ClassReward.csv");
     ItemList.Init(new TableLoaderLocalCSV <int, TDataItemList>(), path, "ItemList.csv");
     QuestInfo.Init(new TableLoaderLocalCSV <int, TDataQuestInfo>(), path, "QuestInfo.csv");
     QuestData.Init(new TableLoaderLocalCSV <int, TDataQuestData>(), path, "QuestData.csv");
     QuestDayReward.Init(new TableLoaderLocalCSV <int, TDataQuestDayReward>(), path, "QuestDayReward.csv");
     ShopInfo.Init(new TableLoaderLocalCSV <int, TDataShopInfo>(), path, "ShopInfo.csv");
     ShopProductList.Init(new TableLoaderLocalCSV <int, TDataShopProductList>(), path, "ShopProductList.csv");
     MailInfo.Init(new TableLoaderLocalCSV <int, TDataMailInfo>(), path, "MailInfo.csv");
     loaded = true;
     return(true);
 }
コード例 #2
0
ファイル: ShopUI.cs プロジェクト: lxc1030/ServerTest
    private void ShowInfos()
    {
        //删除不需要显示的数据
        List <ChargeItem> selectItem = new List <ChargeItem>();

        foreach (var item in config.Values)
        {
            if ((item.isShop == 1))
            {
                selectItem.Add(item);
            }
        }
        //

        GameObject      obj  = null;
        GridLayoutGroup grid = transContain.GetComponent <GridLayoutGroup>();

        RectTransform trans  = transContain.GetComponent <RectTransform>();
        float         height = 0;

        height += grid.padding.top;
        height += grid.padding.bottom;
        height += (grid.cellSize.y + grid.spacing.y) * selectItem.Count;

        Vector2 org = trans.sizeDelta;

        trans.sizeDelta = new Vector2(0, height);

        foreach (var item in selectItem)
        {
            obj = Common.Generate(prefab, transContain);
            ShopInfo info = obj.GetComponent <ShopInfo>();
            info.Init(item);
        }
        //AD按钮随机显示一个
        CloseADButtons();
        int ad = Random.Range(0, adBtns.Length);

        adBtns[ad].SetActive(true);
    }