/// <summary> /// Get the string at index. /// </summary> public static string GetString(int index) { if (index < 0 || index > mStrings.Length) { GBGenLog.LogError("Try to get string with index: " + index); return(null); } return(mStrings[index]); }
public bool Load(BinaryReader br) { int count = br.ReadInt32(); // 数组大小暂时限制到10K个,一般count超过10K都是读的错误数据 // if (count < 0 || count > 10240) { GBGenLog.LogError("Array size is invalid: " + count); return(false); } indices = new int[count]; for (int i = 0; i < indices.Length; ++i) { indices[i] = br.ReadInt32(); } return(true); }