Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        //Here i save form in "Assets" folder for test, you can change it where you like.
        mSavePath = Application.dataPath + "/GameConfig.txt";

        if (File.Exists(mSavePath))
        {
            mForm = OOFormArray.ReadFromFile(mSavePath);
        }
        else
        {
            mForm = OOFormArray.ReadFromResources("OOForm/Tables/GameConfig");
        }

        //read data by column string name
        int run_times = mForm.GetInt("Value", "RUN_TIMES") + 1;

        mForm.SetInt(run_times, "Value", "RUN_TIMES");
        Save();

        //Read data by enum
        mIsTick = mForm.GetBool("Value", "IS_TICK");

        mWindowRect = mForm.GetRect("Value", "WINDOW_RECT");

        Debug.Log(mWindowRect.ToString());
    }
Beispiel #2
0
    public static string GetString(object key)
    {
        if (mForm == null)
        {
            mForm = OOFormArray.ReadFromResources("OOForm/Tables/StringTable");
        }

        return(mForm.GetString(mLanguage.ToString(), key));
    }
    // Use this for initialization
    void Start()
    {
        //Here i save form in "Assets" folder for test, you can change it where you like.
        mSavePath = Application.dataPath + "/RuntimeTable.txt";

        if (File.Exists(mSavePath))
        {
            mForm = OOFormArray.ReadFromFile(mSavePath);
        }
        else
        {
            mForm = OOFormArray.ReadFromResources("OOForm/Tables/RuntimeTable");
        }
    }
Beispiel #4
0
 // Use this for initialization
 void Start()
 {
     mAnimalArray = OOFormArray.ReadFromResources("OOForm/Tables/Animals");
     SetAnimal(mCurrentAnimal);
 }