26 public GameObject TargetObject = null;
31 public int DefaultIndex = 0;
36 public int Index {
get;
set;}
45 return Array[Index % Array.Length];
49 private bool mHasInit =
false;
56 if (TargetObject == null)
58 TargetObject = this.gameObject;
69 SetIndex(DefaultIndex);
80 if (index > -1 && index <= GetLastIndex())
86 Debug.LogError(
"index out of bounds!");
100 if (Index < GetLastIndex())
121 SetIndex(GetLastIndex());
132 return Array.Length - 1;