Beispiel #1
0
 public override void ParseData(long index, int fieldCount, string[] headers, string[] values)
 {
     Buff_ID = ReadString("Type", headers, values, "");
     string[] doubleValue = ReadDoubleValue("TriggerTime", headers, values, "");
     TriggerTime  = (Buff_NOTIFY_TYPE)Enum.Parse(typeof(Buff_NOTIFY_TYPE), doubleValue[0]);
     TriggerParam = doubleValue[1];
     CutCountTime = (Buff_NOTIFY_TYPE)Enum.Parse(typeof(Buff_NOTIFY_TYPE), ReadString("CutCountTime", headers, values, ""));
     string[] effect_data = ReadStringArray("Effects", headers, values, "");
     EffectList = EffectInfoData.ParseData(effect_data);
 }
Beispiel #2
0
        public static EffectBase CreateEffect(EffectInfoData data)
        {
            Type       effectClass = Type.GetType("GamePlay." + data.EffectID);
            object     effect_obj  = Activator.CreateInstance(effectClass);
            EffectBase effect      = null;

            if (effect_obj != null)
            {
                effect = (EffectBase)effect_obj;
                effect.InitEffect(data.elementPtoprtty, data.EffectParam1, data.EffectParam2);
            }
            else
            {
                Debug.LogError("effect id can not be find!");
            }
            return(effect);
        }