/// <summary> /// 获取唯一ID /// </summary> /// <returns></returns> public InterObjectUnitID GetUID(InterObjectType type) { uint idx = 0; m_CurrentIdxs.TryGetValue(type, out idx); InterObjectUnitID uid = new InterObjectUnitID(); uid.m_Type = type; uid.m_Idx = idx; m_CurrentIdxs[type] = idx + 1; return(uid); }
public InterObjectUnitID(InterObjectType t, uint idx) { m_Type = t; m_Idx = idx; }
public uint m_Idx; // 互动物体的索引id public InterObjectUnitID() { m_Type = 0; m_Idx = 0; }