コード例 #1
0
        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());
        }
コード例 #2
0
 public ConstArg(
     ILandedArrowAdaptor adaptor,
     int index
     ) : base(
         adaptor
         )
 {
     thisIndex = index;
 }