コード例 #1
0
        IArrowTrailAdaptor[] CollectArrowTrailAdaptors()
        {
            List <IArrowTrailAdaptor> resultList = new List <IArrowTrailAdaptor>(numToCreate);

            for (int i = 0; i < numToCreate; i++)
            {
                GameObject trailGO = GameObject.Instantiate(
                    trailAdaptorPrefab
                    );
                trailGO.transform.SetParent(this.GetTransform());
                IArrowTrailAdaptor adaptor = (IArrowTrailAdaptor)trailGO.GetComponent(typeof(IArrowTrailAdaptor));
                resultList.Add(adaptor);
                adaptor.SetUp();
                adaptor.SetArrowTrailReserveAdaptor(this);
            }
            return(resultList.ToArray());
        }