Example #1
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);
 }
Example #2
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);
        }