コード例 #1
0
    /*public AnimationCollector(List<AnimationUI> animations,RectTransform target)
     * {
     *  foreach (var ani in animations)
     *      animationList.Add
     * }*/

    public AnimationCollector(AnimationCollector source)
    {
        isForward = source.IsForward;
        foreach (var ani in source.AnimationList)
        {
            animationList.Add(new AnimationBase(ani));
        }
    }
コード例 #2
0
 public void Initialize(GameObject target)
 {
     if (!isInitialized)
     {
         isInitialized = true;
         aniTarget     = target.GetComponent <RectTransform>();
         var anime = target.GetComponents <AnimationUI>();
         animationCollector = new AnimationCollector(anime.Select(x => x.UiAnimation).ToList(), aniTarget);
         animationList      = new List <AnimationUI>();
         animationList.AddRange(anime);
     }
 }
コード例 #3
0
 public IEnumerator Initialize()
 {
     if (!isInitialized)
     {
         isInitialized = true;
         if (aniTarget == null)
         {
             aniTarget = GetComponent <RectTransform>();
         }
         var anime = GetComponents <AnimationUI>();
         animationList = new List <AnimationUI>();
         animationList.AddRange(anime);
         foreach (var ani in animationList)
         {
             ani.Initialize();
         }
         animationCollector = new AnimationCollector(anime.Select(x => x.UiAnimation).ToList(), aniTarget);
     }
     isReady = false;
     yield break;
 }
コード例 #4
0
    void CreateCollector()
    {
        for (int i = 0; i < animationUIList.Count; i++)
        {
            var animeUI = animationUIList[i];
            animationList.Add(animeUI.UiAnimation);
        }

        if (targetList == null)
        {
            targetList = new List <RectTransform>();
        }
        for (int i = 0; i < targetList.Count; i++)
        {
            AnimationCollector aniCollector = new AnimationCollector(animationList, targetList[i]);
            collectorList.Add(aniCollector);
            if (delayList.Count <= i)
            {
                delayList.Add(0);
            }
        }
    }