/// <summary>
 /// 设置激活状态的prefab
 /// </summary>
 public void ChangeActivePrefab(RecordingPrefab activeItem)
 {
     if (onActivePrefabChanged != null)
     {
         onActivePrefabChanged(activeItem);
     }
 }
 /// <summary>
 /// 清除打开的对象
 /// </summary>
 /// <param name="item"></param>
 public void RemoveRecord(RecordingPrefab item)
 {
     if (records.Contains(item))
     {
         records.Remove(item);
         ChangeActivePrefab(null);
     }
 }
 /// <summary>
 /// 记录场景中打开的对象
 /// </summary>
 /// <param name="item"></param>
 public void SaveRecord(RecordingPrefab item)
 {
     if (!records.Contains(item))
     {
         records.Add(item);
         ChangeActivePrefab(item);
     }
 }
Beispiel #4
0
 /// <summary>
 /// 选中对象
 /// </summary>
 /// <param name="recordItem"></param>
 void OnItemSelected(RecordingPrefab recordItem)
 {
     selected = recordItem == null ? false : true;
     if (selected)
     {
         centerImage.sprite = recordItem.prefabItemInfo.sprite;
         //Facade.Instance.SendNotification<string>(sendName, "选中了" + recordItem.prefabItemInfo.prefabName);
         selectedObj = recordItem.gameObject.transform;
     }
 }