Пример #1
0
        void SetRight(RectTransform target)
        {
            // Down //
            BackgroundMove _moveDown = GamePlayController.instance.CheckBackgroundPool();
            RectTransform  _basePos  = SetRect(_moveDown.transform as RectTransform, new Vector2(target.anchoredPosition.x, -target.rect.height + target.anchoredPosition.y - 835));
            // DownRight //
            BackgroundMove _moveDownRight = GamePlayController.instance.CheckBackgroundPool();

            SetRect(_moveDownRight.transform as RectTransform, new Vector2(_basePos.anchoredPosition.x + _basePos.rect.width + 380, _basePos.anchoredPosition.y));
            // Right //
            BackgroundMove _moveRight = GamePlayController.instance.CheckBackgroundPool();

            SetRect(_moveRight.transform as RectTransform, new Vector2(target.anchoredPosition.x + target.rect.width + 380, target.anchoredPosition.y));

            _moveDown.SetDefault();
            _moveDownRight.SetDefault();
            _moveRight.SetDefault();

            RefBg(ref _moveDown.rightBg, _moveDownRight);
            RefBg(ref _moveDownRight.leftBg, _moveDown);
            RefBg(ref _moveRight.downBg, _moveDownRight);

            RefActive(ref _moveDown.rightCol);
            RefActive(ref _moveDownRight.leftCol);

            RefActive(ref _moveRight.rightCol);
            RefActive(ref _moveRight.leftCol);
            RefActive(ref _moveRight.downCol);
        }
Пример #2
0
        public void SetDefault()
        {
            leftBg  = null;
            rightBg = null;
            downBg  = null;

            leftCol.SetActive(true);
            rightCol.SetActive(true);
            downCol.SetActive(true);
        }
Пример #3
0
 void RefBg(ref BackgroundMove target, BackgroundMove refBgMove) => target = refBgMove;