示例#1
0
    public static uint Get(string str)
    {
        if (string.IsNullOrEmpty(str))
        {
            return(0);
        }
        StringPool.Init();
        uint num;

        if (StringPool.toNumber.TryGetValue(str, out num))
        {
            return(num);
        }
        Debug.LogWarning((object)("StringPool.GetNumber - no number for string " + str));
        return(0);
    }
    public static uint Get(string str)
    {
        uint num;

        if (string.IsNullOrEmpty(str))
        {
            return((uint)0);
        }
        StringPool.Init();
        if (StringPool.toNumber.TryGetValue(str, out num))
        {
            return(num);
        }
        Debug.LogWarning(string.Concat("StringPool.GetNumber - no number for string ", str));
        return((uint)0);
    }
示例#3
0
    public static string Get(uint i)
    {
        if ((int)i == 0)
        {
            return(string.Empty);
        }
        StringPool.Init();
        string str;

        if (StringPool.toString.TryGetValue(i, out str))
        {
            return(str);
        }
        Debug.LogWarning((object)("StringPool.GetString - no string for ID" + (object)i));
        return(string.Empty);
    }
    public static string Get(uint i)
    {
        string str;

        if (i == 0)
        {
            return(string.Empty);
        }
        StringPool.Init();
        if (StringPool.toString.TryGetValue(i, out str))
        {
            return(str);
        }
        Debug.LogWarning(string.Concat("StringPool.GetString - no string for ID", i));
        return("");
    }