Example #1
0
    // 获得相关ID的随机提示
    public string GetTips(int id)
    {
        LoadingTipsInfo info = Lookup(id);

        if (null == info || info.DescribeList.Count == 0)
        {
            return("");
        }
        int index = UnityEngine.Random.Range(0, info.DescribeList.Count);

        return(info.DescribeList[index]);
    }
Example #2
0
    public void Load(byte[] bytes)
    {
        InfoList = new Dictionary <int, LoadingTipsInfo>();
        BinaryHelper helper = new BinaryHelper(bytes);
        int          length = helper.ReadInt();

        for (int index = 0; index < length; ++index)
        {
            LoadingTipsInfo info = new LoadingTipsInfo();
            info.Load(helper);
            InfoList.Add(info.ID, info);
        }
    }