ILandedArrowAdaptor[] CreateLandedArrowAdaptors() { List <ILandedArrowAdaptor> resultList = new List <ILandedArrowAdaptor>(); for (int i = 0; i < totalLandedArrowsCount; i++) { GameObject landedArrowGO = GameObject.Instantiate( landedArrowPrefab, Vector3.zero, Quaternion.identity ); ILandedArrowAdaptor arrowAdaptor = (ILandedArrowAdaptor)landedArrowGO.GetComponent(typeof(ILandedArrowAdaptor)); if (arrowAdaptor == null) { throw new System.InvalidOperationException( "landedArrowAdaptor missing" ); } arrowAdaptor.SetIndex(i); arrowAdaptor.SetLandedArrowReserveAdaptor(this); arrowAdaptor.SetUp(); resultList.Add(arrowAdaptor); } return(resultList.ToArray()); }
public ConstArg( ILandedArrowAdaptor adaptor, int index ) : base( adaptor ) { thisIndex = index; }