protected virtual void TryComplete(UnityEngine.Object _target, ActionItem item) { if (target.Statu != ExecuteStatu.Executing) { return; //没有执行 } if (!item.OperateAble) { return; //目标无法点击 } if (actionItem != null) { return; } actionItem = item as ActionItem; item.RecordPlayer(target); item.SetInActive(target); }
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); } } }