Esempio n. 1
0
        public void Init(MagicWallManager manager)
        {
            _magicWallManager = manager;
            _dataService      = _magicWallManager.daoServiceFactory.GetDaoService(DaoTypeEnum.CBHAiqigu);

            images = new List <RawImage>();


            // 初始化最左侧图片
            _leftImages = _dataService.GetCustomImage(CustomImageType.LEFT1);
            SetLeftImages();

            // 初始化中间图片
            _middleImages = _dataService.GetCustomImage(CustomImageType.LEFT2);
            SetMiddleImages();

            // 初始化右侧图片
            _rightImages = _dataService.GetCustomImage(CustomImageType.RIGHT);
            if (_rightImages.Count > 0)
            {
                SetRightImages();
            }

            if (_leftImages.Count > 1)
            {
                InvokeRepeating("ChangeLeftImage", _leftChangeTime, _leftChangeTime + _fadeoutDuration);
            }
            if (_middleImages.Count > 1)
            {
                InvokeRepeating("ChangeMiddleImage", _middleChangeTime, _middleChangeTime + _fadeoutDuration);
            }
            if (_rightImages.Count > 1)
            {
                InvokeRepeating("ChangeRightImage", _rightChangeTime, _rightChangeTime + _fadeoutDuration);
            }
        }