//------------------------------------------------------------------------- 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); } }
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; }
//--------------------------------------------------------------------- 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; }
//--------------------------------------------------------------------- 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(); }
//------------------------------------------------------------------------- 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); } }
//------------------------------------------------------------------------- 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); } }
//--------------------------------------------------------------------- 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); } }
//--------------------------------------------------------------------- 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; }
//--------------------------------------------------------------------- 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; }
//--------------------------------------------------------------------- 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(); }
//--------------------------------------------------------------------- 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; }
//--------------------------------------------------------------------- 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; }
//------------------------------------------------------------------------- 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); } }
//--------------------------------------------------------------------- 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); }
//--------------------------------------------------------------------- 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); }
//--------------------------------------------------------------------- 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); }
//--------------------------------------------------------------------- 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); }