public void Init()
    {
        UIRootCamera = GameObject.Find("UI Root/Camera").transform;

        VTabFile tabFile = new VTabFile("gamesetting/ui/uisetting.tab");

        for (int i = 2; i <= tabFile.GetHeight(); ++i)
        {
            VUISetting uiSetting = new VUISetting();
            string     uiName    = tabFile.GetString(i, "UIName");
            uiSetting.UIName  = uiName;
            uiSetting.Side    = tabFile.GetString(i, "AnchorSide");
            uiSetting.OffsetX = tabFile.GetFloat(i, "OffsetX");
            uiSetting.OffsetY = tabFile.GetFloat(i, "OffsetY");
            uiSetting.OffsetZ = tabFile.GetFloat(i, "OffsetZ");

            UISettings[uiName] = uiSetting;
        }
    }
Exemple #2
0
    public void Load(Dictionary <int, VAnimalInfo> setting, string path)
    {
        setting.Clear();

        VTabFile tab    = new VTabFile(path);
        int      height = tab.GetHeight();

        for (int row = 2; row <= height; row++)
        {
            VAnimalInfo info = new VAnimalInfo();
            info.Id           = tab.GetInteger(row, "Id");
            info.Path         = tab.GetString(row, "Path");
            info.Name         = tab.GetString(row, "Name");
            info.Level        = tab.GetInteger(row, "Level");
            info.Hp           = tab.GetFloat(row, "Hp");
            info.Defense      = tab.GetFloat(row, "Defense");
            info.AttackPhysic = tab.GetFloat(row, "AttackPhysic");
            info.AttackCriticalPossibility = tab.GetFloat(row, "AttackCriticalPossibility");
            info.MoveSpeed = tab.GetFloat(row, "MoveSpeed");

            setting.Add(info.Id, info);
        }
    }
    public void Load()
    {
        VTabFile tab    = new VTabFile(Main.StageDataPath);
        int      height = tab.GetHeight();

        for (int row = 2; row <= height; row++)
        {
            VStageInfo info = new VStageInfo();
            info.Id    = tab.GetInteger(row, "Id");
            info.Name  = tab.GetString(row, "Name");
            info.MapId = tab.GetInteger(row, "MapId");

            _StageSetting.Add(info.Id, info);
        }
    }
    public void LoadPlayerSetting()
    {
        if (!System.IO.File.Exists(Application.persistentDataPath + "/gamesetting/user/user_config.tab"))
        {
            _BaseDada.Name = string.Empty;
            _BaseDada.Age  = -1;
            return;
        }

        VTabFile tab = new VTabFile(Main.ClientPlayerDataPath);

        //int height = tab.GetHeight();

        //string test = tab.GetString(2, "Age");

        _BaseDada.Name   = tab.GetString(2, "Name");
        _BaseDada.Age    = tab.GetInteger(2, "Age");
        _BaseDada.HeroId = tab.GetInteger(2, "HeroId");
    }
Exemple #5
0
    public void Load()
    {
        VTabFile tab    = new VTabFile(Main.WeaponDataPath);
        int      height = tab.GetHeight();

        for (int row = 2; row <= height; row++)
        {
            VWeaponInfo info = new VWeaponInfo();
            info.Id           = tab.GetInteger(row, "Id");
            info.ResName      = tab.GetString(row, "ResName");
            info.Type         = (WeaponType)tab.GetInteger(row, "Type");;
            info.HurtId       = tab.GetInteger(row, "HurtId");
            info.AddHp        = tab.GetFloat(row, "AddHp");
            info.AddDefense   = tab.GetFloat(row, "AddDefense");
            info.AttackPhysic = tab.GetFloat(row, "AttackPhysic");
            info.AddAttackCriticalPossibility = tab.GetFloat(row, "AddAttackCriticalPossibility");
            info.AddMoveSpeed = tab.GetFloat(row, "AddMoveSpeed");

            _WeaponSetting.Add(info.Id, info);
        }
    }