示例#1
0
        public void Init(SceneConfig sceneConfig, MagicWallManager manager, Action onSceneCompleted)
        {
            _manager          = manager;
            _onSceneCompleted = onSceneCompleted;

            _cutEffect = CutEffectFactory.GetCutEffect(sceneConfig.sceneType); // 设置过场效果
            _cutEffect.Init(_manager, sceneConfig
                            , OnCutEffectCreateAgentCompleted,
                            () => {
                // on effect completed

                _runEntrance = false;
            }, () =>
            {
                // on display Start

                _runDisplay       = true;
                _displayStartTime = Time.time;
            }
                            );
            _dataType = sceneConfig.dataType; // 设置类型

            //  显示
            _displayBehavior = DisplayBehaviorFactory.GetBehavior(sceneConfig.displayBehavior);

            // 销毁
            _destoryBehavior = DestoryBehaviorFactory.GetBehavior(sceneConfig.destoryBehavior);
            _destoryBehavior.Init(_manager, this, OnDestoryCompleted, sceneConfig);

            _sceneConfig = sceneConfig;

            _magicSceneEnumStatus = MagicSceneEnum.Running;

            _runEntrance = true;
        }
示例#2
0
        void Add(MockSceneConfig cb)
        {
            var configs = cb.sceneConfigs;


            int oldCount = (configs != null) ? configs.Count : 0;

            SceneConfig[] nsceneConfig = new SceneConfig[oldCount + 1];

            for (int i = 0; i < oldCount; i++)
            {
                nsceneConfig[i] = configs[i];
                //newWeights[i] = cb.weights[i];
            }

            SceneConfig n = new SceneConfig(SceneTypeEnum.CurveStagger, DataTypeEnum.Activity
                                            , DisplayBehaviorEnum.GoLeft, DestoryBehaviorEnum.Fade, SubCutEffectTypeEnum.None, DaoTypeEnum.ShiCunFeiyue, 5f);

            configs.Add(n);


            //nsceneConfig[nsceneConfig.Length - 1] = n;

            //cb.sceneConfigs = nsceneConfig;

            cb.sceneConfigs = configs;
        }
示例#3
0
        //
        //  Init
        //
        public void Init(MagicWallManager manager, SceneConfig sceneConfig,
                         Action <DisplayBehaviorConfig> OnCreateAgentCompleted,
                         Action OnEffectCompleted, Action OnDisplayStart
                         )
        {
            //  初始化 manager
            _manager     = manager;
            _sceneConfig = sceneConfig;

            _dataTypeEnum = sceneConfig.dataType;

            _daoService = _manager.daoServiceFactory.GetDaoService(sceneConfig.daoTypeEnum);

            if (sceneConfig.isKinect == 0)
            {
                row_set = _manager.managerConfig.Row;
            }
            else
            {
                row_set = _manager.managerConfig.KinectRow;
            }


            _onCreateAgentCompleted = OnCreateAgentCompleted;
            _onEffectCompleted      = OnEffectCompleted;
            _onDisplayStart         = OnDisplayStart;
        }
示例#4
0
        public void Init(SceneConfig sceneConfig, MagicWallManager manager, Action onSceneCompleted)
        {
            _manager = manager;
            //_daoService = manager.daoService;
            _durtime    = sceneConfig.durtime;
            _dataType   = sceneConfig.dataType;
            _daoService = _manager.daoServiceFactory.GetDaoService(sceneConfig.daoTypeEnum);
            //_itemFactory = manager.itemsFactoryAgent.GetItemsFactoryByContentType(_dataType);
            _sceneUtil = new SceneUtils(_manager, sceneConfig.isKinect);

            _onSceneCompleted = onSceneCompleted;
            _sceneConfig      = sceneConfig;
        }
示例#5
0
        public void Init(SceneConfig sceneConfig, MagicWallManager manager, Action onSceneCompleted)
        {
            _manager          = manager;
            _sceneConfig      = sceneConfig;
            _onSceneCompleted = onSceneCompleted;


            Debug.Log("sceneConfig daoTypeEnum : " + sceneConfig.daoTypeEnum);

            // 销毁
            _destoryBehavior = DestoryBehaviorFactory.GetBehavior(sceneConfig.destoryBehavior);
            _destoryBehavior.Init(_manager, null, OnDestoryCompleted, sceneConfig);
        }
示例#6
0
        public void Init(MagicWallManager manager, CommonScene commonScene, Action onDestoryCompleted, SceneConfig sceneConfig)
        {
            _manager            = manager;
            _commonScene        = commonScene;
            _onDestoryCompleted = onDestoryCompleted;
            _sceneConfig        = sceneConfig;

            feiyueLogo = Resources.Load <Sprite>("UI/6ping-feiyue-logo");
            aiqiLogo   = Resources.Load <Sprite>("UI/6ping-aiqi-logo");

            logoOriginalIsActive = _manager.BgLogo.gameObject.activeInHierarchy;
            logoOriginalSprite   = _manager.BgLogo.GetComponent <Image>().sprite;
            logoOriginalSize     = _manager.BgLogo.GetComponent <RectTransform>().sizeDelta;
            logoOriginalColor    = _manager.BgLogo.GetComponent <Image>().color;
        }
示例#7
0
        //
        //  Init
        //
        public void Init(MagicWallManager manager, SceneConfig sceneConfig,
                         Action <DisplayBehaviorConfig> OnCreateAgentCompleted,
                         Action OnEffectCompleted, Action OnDisplayStart)
        {
            //  初始化 manager
            _manager     = manager;
            _sceneConfig = sceneConfig;

            _dataTypeEnum = sceneConfig.dataType;

            _onCreateAgentCompleted = OnCreateAgentCompleted;
            _onEffectCompleted      = OnEffectCompleted;
            _onDisplayStart         = OnDisplayStart;

            //  获取持续时间
            _entranceDisplayTime      = manager.cutEffectConfig.FrontBackDisplayDurTime;
            _startingTimeWithOutDelay = _entranceDisplayTime;

            //  初始化 config
            _displayBehaviorConfig = new DisplayBehaviorConfig();
        }
示例#8
0
        public void Init(MagicWallManager manager, SceneConfig sceneConfig,
                         Action <DisplayBehaviorConfig> OnCreateAgentCompleted,
                         Action OnEffectCompleted, Action OnDisplayStart
                         )
        {
            System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
            sw.Start();

            //  初始化 manager
            _manager      = manager;
            _sceneConfig  = sceneConfig;
            _dataTypeEnum = sceneConfig.dataType;
            _daoService   = _manager.daoServiceFactory.GetDaoService(sceneConfig.daoTypeEnum);

            _onCreateAgentCompleted = OnCreateAgentCompleted;
            _onEffectCompleted      = OnEffectCompleted;
            _onDisplayStart         = OnDisplayStart;



            sw.Stop();
        }
示例#9
0
        public List <SceneConfig> GetShowConfigs()
        {
            List <SceneConfig> sceneConfigs = new List <SceneConfig>();

            string showConfigStr = _manager.globalData.GetConfig().ShowConfig;

            SceneTypeEnum[] sceneTypes = new SceneTypeEnum[]
            {
                SceneTypeEnum.CurveStagger,
                SceneTypeEnum.FrontBackUnfold,
                SceneTypeEnum.LeftRightAdjust,
                SceneTypeEnum.MidDisperse,
                SceneTypeEnum.Stars,
                SceneTypeEnum.UpDownAdjustCutEffect,
            };

            DataTypeEnum[] dataTypes = new DataTypeEnum[] {
                DataTypeEnum.Enterprise,
                DataTypeEnum.Activity,
                DataTypeEnum.Product,
            };


            JsonData data = JsonMapper.ToObject(DaoUtil.ConvertShowConfigStr(showConfigStr));

            for (int i = 0; i < data.Count; i++)
            {
                //Debug.Log(data[i]["cuteffect_id"]);
                SceneConfig sceneConfig = new SceneConfig();
                sceneConfig.sceneType = sceneTypes[int.Parse(data[i]["cuteffect_id"].ToString()) - 1];
                sceneConfig.dataType  = dataTypes[int.Parse(data[i]["contcom_type"].ToString())];
                // 设置场景时间
                sceneConfig.durtime = GetSceneDurTime(sceneConfig.sceneType);
                //Debug.Log("sceneType:" + sceneConfig.sceneType + "---dataType:" + sceneConfig.dataType + "---durtime:" + sceneConfig.durtime);
                sceneConfigs.Add(sceneConfig);
            }

            return(sceneConfigs);
        }
示例#10
0
        //public void Init(MagicWallManager manager, float destoryDurTime)
        //{
        //    totalTime = destoryDurTime;
        //    _manager = manager;
        //}

        public void Init(MagicWallManager manager, CommonScene commonScene, Action onDestoryCompleted, SceneConfig sceneConfig)
        {
            _manager            = manager;
            _onDestoryCompleted = onDestoryCompleted;
        }
示例#11
0
 public void Init(SceneConfig sceneConfig, MagicWallManager manager, Action onSceneCompleted)
 {
     _manager          = manager;
     _startSceneStatus = StartSceneStatus.Init;
     _onSceneCompleted = onSceneCompleted;
 }