public void Initialize(SystemEffectSetting.Data effectData)
 {
     GroupID    = effectData.groupID;
     UniqueName = effectData.UniqueName;
 }
Beispiel #2
0
 public void SysEffectCreate(Enemy enemy, int layer, SystemEffectSetting sysEffectSetting)
 {
     //IL_00d5: Unknown result type (might be due to invalid IL or missing references)
     //IL_00e1: Expected O, but got Unknown
     //IL_00fb: Unknown result type (might be due to invalid IL or missing references)
     //IL_0100: Expected O, but got Unknown
     //IL_0130: Unknown result type (might be due to invalid IL or missing references)
     //IL_0135: Unknown result type (might be due to invalid IL or missing references)
     //IL_0139: Unknown result type (might be due to invalid IL or missing references)
     //IL_0142: Unknown result type (might be due to invalid IL or missing references)
     //IL_0150: Unknown result type (might be due to invalid IL or missing references)
     //IL_015e: Unknown result type (might be due to invalid IL or missing references)
     //IL_0163: Unknown result type (might be due to invalid IL or missing references)
     //IL_016f: Unknown result type (might be due to invalid IL or missing references)
     if (sysEffectSetting != null)
     {
         int[] array = sysEffectSetting.startGroupIds;
         bool  flag  = false;
         if (array == null || array.Length == 0)
         {
             flag  = true;
             array = new int[1];
         }
         else if (array[0] < 0)
         {
             return;
         }
         SystemEffectSetting.Data[] effectDataList = sysEffectSetting.effectDataList;
         if (effectDataList != null)
         {
             int num = effectDataList.Length;
             for (int i = 0; i < num; i++)
             {
                 SystemEffectSetting.Data data = effectDataList[i];
                 if (!flag)
                 {
                     bool flag2 = false;
                     int  j     = 0;
                     for (int num2 = array.Length; j < num2; j++)
                     {
                         if (array[j] == data.groupID)
                         {
                             flag2 = true;
                             break;
                         }
                     }
                     if (!flag2)
                     {
                         continue;
                     }
                 }
                 if (!string.IsNullOrEmpty(data.effectName) && !string.IsNullOrEmpty(data.linkNodeName))
                 {
                     Transform val = Utility.Find(body.get_transform(), data.linkNodeName);
                     if (val == null)
                     {
                         val = body.get_transform();
                     }
                     Transform effect = EffectManager.GetEffect(data.effectName, val);
                     if (effect != null)
                     {
                         if (layer != -1)
                         {
                             Utility.SetLayerWithChildren(effect, layer);
                         }
                         Vector3 localScale = effect.get_localScale();
                         effect.set_localScale(localScale * data.scale);
                         effect.set_localPosition(data.offsetPos);
                         effect.set_localRotation(Quaternion.Euler(data.offsetRot));
                         ResidentEffectObject residentEffectObject = effect.get_gameObject().AddComponent <ResidentEffectObject>();
                         residentEffectObject.Initialize(data);
                         if (enemy != null)
                         {
                             enemy.RegisterResidentEffect(residentEffectObject);
                         }
                     }
                 }
             }
         }
     }
 }