コード例 #1
0
 //-------------------------------------------------------------------------
 public void addSingleEffect(int effect_id, string effect_name, int effect_type, float delay_time,
                             Dictionary <string, object> map_param, EffectTypeEnum effect_generate_type)
 {
     if (mEffectMgr != null && map_param != null)
     {
         map_param.Add("RenderScene", this);
         mEffectMgr.createEffect(effect_id, effect_name, effect_type, delay_time, map_param, effect_generate_type);
     }
 }
コード例 #2
0
    public void getNewItem()
    {
        m_itemView      = InstanceFactory.instance.getRandomItemView(GetComponent<Transform>().position, Quaternion.identity);
        m_itemView.GetComponent<Transform>().SetParent(this.GetComponent<Transform>());
        m_itemView.GetComponent<Transform>().localScale = Vector3.one;

        m_itemName      = m_itemView.m_itemName;
        m_effectType    = m_itemView.m_effectType;
    }
コード例 #3
0
ファイル: LogicScene.cs プロジェクト: yinlei/Fishing
 //---------------------------------------------------------------------
 public List<List<object>> addEffect(int vib_compose_id, Dictionary<string, object> param, EffectTypeEnum effect_type)
 {
     if (param != null)
     {
         param.Add("LogicScene", this);
         return mEffectMgr.createCombineEffect(vib_compose_id, param, effect_type);
     }
     else return null;
 }
コード例 #4
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();
        }
コード例 #5
0
ファイル: RenderScene.cs プロジェクト: yinlei/Fishing
 //-------------------------------------------------------------------------
 public void addSingleEffect(int effect_id, string effect_name, int effect_type, float delay_time,
     Dictionary<string, object> map_param, EffectTypeEnum effect_generate_type)
 {
     if (mEffectMgr != null && map_param != null)
     {
         map_param.Add("RenderScene", this);
         mEffectMgr.createEffect(effect_id, effect_name, effect_type, delay_time, map_param, effect_generate_type);
     }
 }
コード例 #6
0
ファイル: RenderScene.cs プロジェクト: yinlei/Fishing
 //-------------------------------------------------------------------------
 public void addEffect(int effect_vib_id, Dictionary<string, object> map_param, EffectTypeEnum effect_type)
 {
     if (mEffectMgr != null && map_param != null)
     {
         map_param.Add("RenderScene", this);
         mEffectMgr.createCombineEffect(effect_vib_id, map_param, effect_type);
     }
 }
コード例 #7
0
ファイル: LogicScene.cs プロジェクト: zhilianghuang/Fishing
 //---------------------------------------------------------------------
 public List <List <object> > addEffect(int vib_compose_id, Dictionary <string, object> param, EffectTypeEnum effect_type)
 {
     if (param != null)
     {
         param.Add("LogicScene", this);
         return(mEffectMgr.createCombineEffect(vib_compose_id, param, effect_type));
     }
     else
     {
         return(null);
     }
 }
コード例 #8
0
ファイル: EffectMgr.cs プロジェクト: yinlei/Fishing
 //---------------------------------------------------------------------
 public CEffect buildByEffectElementData(int effect_id, string effect_name, int effect_type, float delay_time, Dictionary<string, object> param, EffectTypeEnum effect_generate_type)
 {
     if (mDicEffectFactory.ContainsKey(effect_name))
     {
         if (mDicEffectFactory[effect_name].getEffectType() != effect_generate_type) return null;
         CEffect effect_component = mDicEffectFactory[effect_name].createEffect(param);
         effect_component.setEffectElementData(effect_id, effect_name, (TbDataEffectCompose.EffectElementStruct.EffectTypeEnum)effect_type, delay_time);
         effect_component.create(param);
         effect_component.setName(effect_name);
         return effect_component;
     }
     return null;
 }
コード例 #9
0
ファイル: EffectMgr.cs プロジェクト: yinlei/Fishing
 //---------------------------------------------------------------------
 public CEffect buildByEffectElementData(TbDataEffectCompose.EffectElementStruct data, Dictionary<string, object> param, EffectTypeEnum effect_type)
 {
     string effect_name = data.EffectName.EffectName;
     if (mDicEffectFactory.ContainsKey(effect_name))
     {
         if (mDicEffectFactory[effect_name].getEffectType() != effect_type) return null;
         CEffect effect_component = mDicEffectFactory[effect_name].createEffect(param);
         effect_component.setEffectElementData(data.EffectId, effect_name, (TbDataEffectCompose.EffectElementStruct.EffectTypeEnum)data.EffectType, data.EffectDelayTime * 0.01f);
         effect_component.create(param);
         effect_component.setName(effect_name);
         return effect_component;
     }
     return null;
 }
コード例 #10
0
ファイル: EffectMgr.cs プロジェクト: yinlei/Fishing
        //---------------------------------------------------------------------
        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();
        }
コード例 #11
0
ファイル: EffectMgr.cs プロジェクト: yinlei/Fishing
 //---------------------------------------------------------------------
 public List<object> createEffect(int effect_id, string effect_name, int effect_type, float delay_time, Dictionary<string, object> param, EffectTypeEnum effect_generate_type)
 {
     CEffect effect = mFactory.buildByEffectElementData(effect_id, effect_name, effect_type, delay_time, param, effect_generate_type);
     if (effect == null) return null;
     mSingleEffect.Add(effect);
     return effect.ReturnValue;
 }
コード例 #12
0
ファイル: EffectMgr.cs プロジェクト: yinlei/Fishing
 //---------------------------------------------------------------------
 public List<List<object>> createCombineEffect(int vib_component_id, Dictionary<string, object> param, EffectTypeEnum effect_generate_type)
 {
     CombineCEffect effect = new CombineCEffect(mFactory);
     effect.create(vib_component_id, param, effect_generate_type);
     mAddCEffects.Add(effect);
     return effect.ReturnValue;
 }
コード例 #13
0
 //-------------------------------------------------------------------------
 public void addEffect(int effect_vib_id, Dictionary <string, object> map_param, EffectTypeEnum effect_type)
 {
     if (mEffectMgr != null && map_param != null)
     {
         map_param.Add("RenderScene", this);
         mEffectMgr.createCombineEffect(effect_vib_id, map_param, effect_type);
     }
 }
コード例 #14
0
 //---------------------------------------------------------------------
 public CEffect buildByEffectElementData(int effect_id, string effect_name, int effect_type, float delay_time, Dictionary <string, object> param, EffectTypeEnum effect_generate_type)
 {
     if (mDicEffectFactory.ContainsKey(effect_name))
     {
         if (mDicEffectFactory[effect_name].getEffectType() != effect_generate_type)
         {
             return(null);
         }
         CEffect effect_component = mDicEffectFactory[effect_name].createEffect(param);
         effect_component.setEffectElementData(effect_id, effect_name, (TbDataEffectCompose.EffectElementStruct.EffectTypeEnum)effect_type, delay_time);
         effect_component.create(param);
         effect_component.setName(effect_name);
         return(effect_component);
     }
     return(null);
 }
コード例 #15
0
        //---------------------------------------------------------------------
        public CEffect buildByEffectElementData(TbDataEffectCompose.EffectElementStruct data, Dictionary <string, object> param, EffectTypeEnum effect_type)
        {
            string effect_name = data.EffectName.EffectName;

            if (mDicEffectFactory.ContainsKey(effect_name))
            {
                if (mDicEffectFactory[effect_name].getEffectType() != effect_type)
                {
                    return(null);
                }
                CEffect effect_component = mDicEffectFactory[effect_name].createEffect(param);
                effect_component.setEffectElementData(data.EffectId, effect_name, (TbDataEffectCompose.EffectElementStruct.EffectTypeEnum)data.EffectType, data.EffectDelayTime * 0.01f);
                effect_component.create(param);
                effect_component.setName(effect_name);
                return(effect_component);
            }
            return(null);
        }
コード例 #16
0
        //---------------------------------------------------------------------
        public List <object> createEffect(int effect_id, string effect_name, int effect_type, float delay_time, Dictionary <string, object> param, EffectTypeEnum effect_generate_type)
        {
            CEffect effect = mFactory.buildByEffectElementData(effect_id, effect_name, effect_type, delay_time, param, effect_generate_type);

            if (effect == null)
            {
                return(null);
            }
            mSingleEffect.Add(effect);
            return(effect.ReturnValue);
        }
コード例 #17
0
        //---------------------------------------------------------------------
        public List <List <object> > createCombineEffect(int vib_component_id, Dictionary <string, object> param, EffectTypeEnum effect_generate_type)
        {
            CombineCEffect effect = new CombineCEffect(mFactory);

            effect.create(vib_component_id, param, effect_generate_type);
            mAddCEffects.Add(effect);
            return(effect.ReturnValue);
        }