public static int IndexOf(ArrayList target, Object value, int startIndex) { if (startIndex > target.Count) { throw new ArgumentOutOfRangeException("startIndex", "ArgumentOutOfRange_Index"); } return(PlayMakerUtils_Extensions.IndexOf(target, value, startIndex, target.Count - startIndex)); }
public void DoArrayListIndexOf() { if (!isProxyValid()) { return; } object item = PlayMakerUtils.GetValueFromFsmVar(Fsm, variable); int indexOfResult = -1; try{ if (startIndex.IsNone) { UnityEngine.Debug.Log("hello"); indexOfResult = PlayMakerUtils_Extensions.IndexOf(proxy.arrayList, item); } else if (count.IsNone || count.Value == 0) { if (startIndex.Value < 0 || startIndex.Value >= proxy.arrayList.Count) { LogError("start index out of range"); return; } indexOfResult = PlayMakerUtils_Extensions.IndexOf(proxy.arrayList, item); } else { if (startIndex.Value < 0 || startIndex.Value >= (proxy.arrayList.Count - count.Value)) { LogError("start index and count out of range"); return; } indexOfResult = PlayMakerUtils_Extensions.IndexOf(proxy.arrayList, item); } }catch (System.Exception e) { Debug.LogError(e.Message); Fsm.Event(failureEvent); return; } indexOf.Value = indexOfResult; if (indexOfResult == -1) { Fsm.Event(itemNotFound); } else { Fsm.Event(itemFound); } }
public static int IndexOf(ArrayList target, Object value) { return(PlayMakerUtils_Extensions.IndexOf(target, value, 0, target.Count)); }