protected void OnRemovedFromPool(ActionItem arg0) { RemoveComplete(arg0); }
protected void OnAddedToPool(ActionItem arg0) { RegistComplete(arg0); }
public virtual void Init(ActionItem actionItem, string itemLayer) { target = actionItem; LayerName = itemLayer; }
protected virtual void TryComplete(UnityEngine.Object context, ActionItem actionItem) { if (context != target) { if (log) { Debug.Log("目标不一至"); } return; } if (target.Statu != ExecuteStatu.Executing) { if (log) { Debug.Log("没有执行"); } return; } if (!actionItem.OperateAble && !actionItem.HavePlayer(target)) { if (log) { Debug.Log("目标无法操作"); } return; } if (currents.Count >= itemList.Count) { if (log) { Debug.Log("超过需要"); } return; } if (itemList[currents.Count] == actionItem.Name) { if (log) { Debug.Log("regist:" + actionItem); } currents.Add(actionItem); actionItem.RecordPlayer(target); InActiveElements(actionItem.Name); } if (currents.Count >= itemList.Count) { finalGroup = currents.ToArray(); OnEndExecute(false); } else { ActiveElements(); if (autoExecute) { AutoComplete(currents.Count); } } }
internal void Init(ActionItem actionItem, UnityAction <UnityEngine.Object> onAutoExecute) { target = actionItem; this.onAutoExecute = onAutoExecute; }
public void Init(ActionItem actionItem) { target = actionItem; }