Exemple #1
0
 /// <summary>
 /// 删除唯一id列表
 /// </summary>
 private void RemoveDynamicIDs()
 {
     for (int i = 0; i < dynamicId.Count; i++)
     {
         ObjectIdentity.UnregisterIdentity(dynamicId[i]);
     }
     dynamicId.Clear();
 }
Exemple #2
0
 /// <summary>
 /// 生成唯一id列表
 /// </summary>
 private void GenerateDynamicIDs()
 {
     RemoveDynamicIDs();
     for (int i = 0; i < DynamicIdCount; i++)
     {
         ObjectIdentity objectIdentity = new ObjectIdentity();
         ObjectIdentity.RegisterIdentity(objectIdentity);
         dynamicId.Add(objectIdentity);
     }
     Debug.Log("当前动态Id列表数量为:[" + dynamicId.Count + "]");
 }
Exemple #3
0
 private void OnDestroy()
 {
     ObjectIdentity.UnregisterIdentity(this.objectIdentity);
 }
Exemple #4
0
 private void Awake()
 {
     ObjectIdentity.RegisterIdentity(this.objectIdentity);
 }