Exemplo n.º 1
0
        //---------------------------------------------------------------------
        public void create(int vib_component_id, Dictionary <string, object> param, EffectTypeEnum effect_type)
        {
            if (vib_component_id < 0)
            {
                return;
            }

            List <TbDataEffectCompose.EffectElementStruct> data_list = EbDataMgr.Instance.getData <TbDataEffectCompose>(vib_component_id).EffectElements;

            if (data_list == null || data_list.Count <= 0)
            {
                return;
            }

            int     index         = 0;
            CEffect pre_component = null;

            foreach (var it in data_list)
            {
                if (0 != it.EffectId && null != it.EffectName)
                {
                    CEffect effect = mFactory.buildByEffectElementData(it, param, effect_type);

                    if (effect == null)
                    {
                        continue;
                    }

                    mComponents.Add(index, effect);
                    ComponentUpdate component_update = new ComponentUpdate(effect, pre_component);
                    mComponentFuncs.Add(component_update);

                    pre_component = effect;
                    index++;
                }
            }

            excute();
        }
Exemplo n.º 2
0
        //---------------------------------------------------------------------
        public void create(int vib_component_id, Dictionary<string, object> param, EffectTypeEnum effect_type)
        {
            if (vib_component_id < 0) return;

            List<TbDataEffectCompose.EffectElementStruct> data_list = EbDataMgr.Instance.getData<TbDataEffectCompose>(vib_component_id).EffectElements;
            if (data_list == null || data_list.Count <= 0) return;

            int index = 0;
            CEffect pre_component = null;

            foreach (var it in data_list)
            {
                if (0 != it.EffectId && null != it.EffectName)
                {
                    CEffect effect = mFactory.buildByEffectElementData(it, param, effect_type);

                    if (effect == null) continue;

                    mComponents.Add(index, effect);
                    ComponentUpdate component_update = new ComponentUpdate(effect, pre_component);
                    mComponentFuncs.Add(component_update);

                    pre_component = effect;
                    index++;
                }
            }

            excute();
        }