Пример #1
0
    public static DemoVO GetConfig(int id)
    {
        if (_Data == null)
        {
            LoadVO();
        }
        DemoVO data = null;

        _Data.TryGetValue(id, out data);
        return(data);
    }
Пример #2
0
    public static void SetVO(string text)
    {
        DemoVO data = new DemoVO();

        string[] tokens = Table.GetTokens(text);
        int.TryParse(tokens[0], out data.Id);
        if (tokens[1] != null)
        {
            data.Name = tokens[1];
        }
        float.TryParse(tokens[2], out data.FloatCol);
        _Data[data.Id] = data;
    }
Пример #3
0
 // Use this for initialization
 void Start()
 {
     Debug.LogError(DemoVO.GetConfig(1).Name);
 }