Пример #1
0
 /// <summary>破棄</summary>
 private void OnDestroy()
 {
     if (onChangeMode != null)
     {
         onChangeMode.RemoveAllListeners();
         onChangeMode = null;
     }
     if (onSelect != null)
     {
         onSelect.RemoveAllListeners();
         onSelect = null;
     }
     if (onBeginOrder != null)
     {
         onBeginOrder.RemoveAllListeners();
         onBeginOrder = null;
     }
     if (onUpdateOrder != null)
     {
         onUpdateOrder.RemoveAllListeners();
         onUpdateOrder = null;
     }
     if (onEndOrder != null)
     {
         onEndOrder.RemoveAllListeners();
         onEndOrder = null;
     }
 }
Пример #2
0
 /// <summary>モード切替コールバックの登録</summary>
 public void AddOnChangeModeListener(UnityAction <bool> onChangeModeAction)
 {
     if (onChangeModeAction != null)
     {
         if (onChangeMode == null)
         {
             onChangeMode = new OnChangeModeCallback();
         }
         onChangeMode.AddListener(onChangeModeAction);
     }
 }