Как реализовать теплак в софте (Contract Wars) c#

Начинающий
Статус
Оффлайн
Регистрация
29 Дек 2016
Сообщения
105
Реакции[?]
19
Поинты[?]
2K
Кароче, есть игра cw. Там есть теплак, который работает только если купить в клане. Но я хочу сделать его в софте. Дак вот. Делаю потихоньку хак для себя, по крупицам инфу в инете собираю. Хочу добавить теплак, чтобы спокойно работал без клана на любом лвле.
Поискал в Assembly-CSharp.dll нашел это добро:

C#:
using System;
using System.Collections.Generic;
using UnityEngine;

internal class StartData : MonoBehaviour
{
  private static StartData \uE000;
  private LinkedList<Material> \uE001;
  public StartData.ThermalVision _thermalVision;
  public StartData.Shaders _shaders;
  public StartData.Binocular _binocular;
  public StartData.Sun _sun;
  public StartData.WeaponShaders _weaponShaders;
  public Shader[] ShitCode;

  public static event Action \uE000 = () => {};

  public static StartData Instance
  {
    get
    {
      if ((UnityEngine.Object) StartData.\uE000 == (UnityEngine.Object) null)
        StartData.\uE000 = (StartData) UnityEngine.Object.FindObjectOfType(typeof (StartData));
      return StartData.\uE000;
    }
  }

  private void Awake()
  {
    StartData.\uE000 = this;
    \uE1E2.\uE000();
    Shader.SetGlobalFloat(\uE20D.\uE000(20204), 2f);
    Shader.SetGlobalFloat(\uE20D.\uE000(19986), 0.0f);
  }

  private bool \uE000()
  {
    return true;
  }

  private void Update()
  {
    \uE1E2.\uE000();
    StartData.\uE002();
  }

  public static StartData.ThermalVision thermalVision
  {
    get
    {
      return StartData.Instance._thermalVision;
    }
  }

  public static StartData.Shaders shaders
  {
    get
    {
      return StartData.Instance._shaders;
    }
  }

  public static StartData.Binocular binocular
  {
    get
    {
      return StartData.Instance._binocular;
    }
  }

  public static StartData.Sun sun
  {
    get
    {
      return StartData.Instance._sun;
    }
  }

  public static StartData.WeaponShaders weaponShaders
  {
    get
    {
      return StartData.Instance._weaponShaders;
    }
  }

  [Serializable]
  internal class ThermalVision
  {
    public AnimationCurve blackFlashGoingToOn;
    public AnimationCurve blackFlashGoingToOff;
    public AnimationCurve HighlightImpulse;
    public AudioClip SwitchOn;
    public AudioClip SwitchOff;
    public Texture mask;
    public Shader ThermalShaderW;
  }

  [Serializable]
  internal class Shaders
  {
    public Texture noise;
    public Shader Tonemapper2;
    public Shader Noise;
  }

  [Serializable]
  internal class Binocular
  {
    public Texture2D Reticle;
    public AnimationCurve blackFlashGoingToOn;
    public AnimationCurve blackFlashGoingToOff;
    public float GoingToOnTimeMax;
    public float GoingToOffTimeMax;
    public AudioClip SwitchOn;
    public AudioClip SwitchOff;
    public LayerMask LayerMask;
  }

  [Serializable]
  internal class Sun
  {
    public Color SunColor;
    public Texture ScreenTexture;
    public Shader ScreenShader;
    public Shader VisibilityCheckerShader;
    public CustomLensFlare LensFlares;
    public Texture SunBackTexture;
    public AnimationCurve SunCurve;
    public Shader SunShaftsShader;
    public Shader SunShaftsClearShader;
  }

  [Serializable]
  internal class WeaponShaders
  {
    public StartData.WeaponShaders.ReplaceShader[] Shaders;
    public StartData.WeaponShaders.ReplaceShader[] ShadersInvert;
    private static Dictionary<string, Shader> _shaders;
    private static Dictionary<string, Shader> _invertShaders;

    private void \uE000()
    {
      if (StartData.WeaponShaders._shaders != null)
        return;
      StartData.WeaponShaders._shaders = new Dictionary<string, Shader>();
      foreach (StartData.WeaponShaders.ReplaceShader shader in this.Shaders)
        StartData.WeaponShaders._shaders.Add(shader.Name, shader.Shader);
      StartData.WeaponShaders._invertShaders = new Dictionary<string, Shader>();
      foreach (StartData.WeaponShaders.ReplaceShader replaceShader in this.ShadersInvert)
        StartData.WeaponShaders._invertShaders.Add(replaceShader.Name, replaceShader.Shader);
    }

    private void \uE001(GameObject _param1)
    {
      if ((UnityEngine.Object) _param1 == (UnityEngine.Object) null)
      {
        Debug.LogError((object) \uE20D.\uE000(104136));
      }
      else
      {
        this.\uE000();
        foreach (Renderer componentsInChild in _param1.GetComponentsInChildren<Renderer>(true))
        {
          componentsInChild.castShadows = false;
          foreach (Material material in componentsInChild.materials)
          {
            Shader shader;
            if (StartData.WeaponShaders._shaders.TryGetValue(material.shader.name, out shader))
              material.shader = shader;
            else if (!material.shader.name.EndsWith(\uE20D.\uE000(104167)))
              Debug.Log((object) (\uE20D.\uE000(104169) + material.shader.name + \uE20D.\uE000(103939)));
          }
        }
      }
    }

    private void \uE002(GameObject _param1)
    {
      if ((UnityEngine.Object) _param1 == (UnityEngine.Object) null)
        return;
      this.\uE000();
      Renderer renderer = _param1.renderer;
      renderer.castShadows = false;
      foreach (Material material in renderer.materials)
      {
        Shader shader;
        if (StartData.WeaponShaders._shaders.TryGetValue(material.shader.name, out shader))
          material.shader = shader;
        else if (material.shader.name[material.shader.name.Length - 1] != 'W')
          Debug.Log((object) (\uE20D.\uE000(103985) + material.shader.name));
      }
    }

    public void \uE003(GameObject _param1)
    {
      this.\uE001(_param1);
    }

    public void \uE004(GameObject _param1)
    {
      if ((UnityEngine.Object) _param1 == (UnityEngine.Object) null)
        return;
      this.\uE000();
      foreach (Renderer componentsInChild in _param1.GetComponentsInChildren<Renderer>(true))
      {
        componentsInChild.castShadows = false;
        foreach (Material material in componentsInChild.materials)
        {
          Shader shader;
          if (StartData.WeaponShaders._invertShaders.TryGetValue(material.shader.name, out shader))
            material.shader = shader;
        }
      }
    }

    [Serializable]
    internal class ReplaceShader
    {
      public Shader Shader;
      public string Name;
    }

    internal class \uE1F4
    {
      private static float \uE001 = 0.664f;
      private static float \uE002 = -1f;
      private static Transform \uE000;

      public void \uE000()
      {
        StartData.WeaponShaders.\uE1F4.\uE000 = SunOnGlass.SunOnGlassInstance.transform;
        Transform transform = GameObject.Find(\uE20D.\uE000(103972)).transform;
        StartData.weaponShaders.\uE001(transform.gameObject);
        Camera[] componentsInChildren = transform.gameObject.GetComponentsInChildren<Camera>();
        if (componentsInChildren == null || componentsInChildren.Length == 0)
          return;
        foreach (Camera camera in componentsInChildren)
          camera.near = !(camera.name == \uE20D.\uE000(25844)) || (double) SingletoneForm<LevelSettings>.Instance.ModOpticCameraNearClipPlane == 0.0 ? 0.02f : SingletoneForm<LevelSettings>.Instance.ModOpticCameraNearClipPlane;
      }

      public static void \uE001(float _param0)
      {
        if ((double) StartData.WeaponShaders.\uE1F4.\uE002 == (double) _param0)
          return;
        Shader.SetGlobalVector(\uE20D.\uE000(103982), new Vector4(1f, 1f, _param0, 1f));
        StartData.WeaponShaders.\uE1F4.\uE002 = _param0;
      }

      public static Vector3 \uE002(Vector3 _param0)
      {
        _param0 = StartData.WeaponShaders.\uE1F4.\uE000.InverseTransformPoint(_param0);
        _param0.z *= StartData.WeaponShaders.\uE1F4.\uE002;
        _param0 = StartData.WeaponShaders.\uE1F4.\uE000.TransformPoint(_param0);
        return _param0;
      }
    }
  }
}
это
C#:
using System;
using System.Collections.Generic;
using UnityEngine;

internal class Thermal : MonoBehaviour
{
  public float Offset = 0.04f;
  public float Treshold = 1.5f;
  private static Thermal \uE000;
  private Shader \uE001;
  private Material \uE002;
  private Tonemapping2 \uE003;
  private NoiseEffect \uE004;
  private Thermal.\uE104 \uE005;
  private Thermal.\uE105 \uE006;
  private Thermal.\uE109 \uE007;
  private Thermal.\uE10A \uE008;
  private LightenEffect \uE009;
  private ColorCorrectionCurves \uE00A;
  private \uE1E3 \uE00B;
  private \uE1E4 \uE00C;
  private \uE1E5 \uE00D;
  private \uE1EB \uE00E;
  private bool \uE00F;

  public static bool Exist
  {
    get
    {
      return (UnityEngine.Object) Thermal.\uE000 != (UnityEngine.Object) null;
    }
  }

  public static bool HighLight
  {
    set
    {
      Thermal.\uE000.\uE008.Enable = value;
    }
  }

  public static bool On
  {
    get
    {
      return Thermal.\uE000.\uE00F;
    }
  }

  private void Awake()
  {
    Thermal.\uE000 = this;
    this.\uE00E = new \uE1EB();
    this.\uE003 = this.gameObject.AddComponent<Tonemapping2>();
    this.\uE003.enabled = false;
    this.\uE003.Thermal = this;
    this.\uE004 = this.gameObject.AddComponent<NoiseEffect>();
    this.\uE004.enabled = false;
    this.\uE004.Scale = 2f;
    this.\uE004.Intensity = 0.3f;
    this.\uE009 = this.gameObject.GetComponent<LightenEffect>();
    this.\uE00A = this.gameObject.GetComponent<ColorCorrectionCurves>();
    this.\uE005 = new Thermal.\uE104(this.gameObject);
    this.\uE006 = new Thermal.\uE105();
    this.\uE007 = new Thermal.\uE109();
    this.\uE008 = new Thermal.\uE10A();
    this.\uE00B = new \uE1E3(StartData.thermalVision.mask, true);
    this.\uE00D = new \uE1E5((Texture) \uE1EA.\uE001(1, 2, new Color(0.0f, 0.0f, 0.0f, 0.0f), new Color(0.0f, 0.0f, 0.0f, 0.1f)), 2f, false, true);
    this.\uE00C = new \uE1E4((Texture) \uE1EA.\uE001(1, 1, Color.black));
    this.\uE00E.SwitchingOn = StartData.thermalVision.blackFlashGoingToOn;
    this.\uE00E.SwitchingOff = StartData.thermalVision.blackFlashGoingToOff;
    this.\uE00E.\uE003(Thermal.\uE007(this.\uE00E.SwitchingOn), (Action) (() => this.\uE005(true)), true);
    this.\uE00E.\uE003(Thermal.\uE007(this.\uE00E.SwitchingOff), (Action) (() => this.\uE005(false)), false);
  }

  private void OnGUI()
  {
    if (this.\uE00F)
    {
      this.\uE008.Update();
      this.\uE00D.\uE002();
    }
    if (!this.\uE00E.InProcess)
      return;
    this.\uE00C.\uE002(this.\uE00E.Value);
  }

  public void \uE000()
  {
    if (!this.\uE00F)
      return;
    this.\uE00B.\uE003();
  }

  public static void \uE001(bool _param0)
  {
    if ((UnityEngine.Object) Thermal.\uE000 == (UnityEngine.Object) null || Thermal.\uE000.\uE00E.InProcess || !Thermal.\uE000.\uE00E.\uE001(_param0))
      return;
    \uE1E1.\uE000(!_param0 ? StartData.thermalVision.SwitchOff : StartData.thermalVision.SwitchOn);
  }

  private bool \uE002()
  {
    if (this.\uE00E.InProcess || !this.\uE00E.\uE001(true))
      return false;
    \uE1E1.\uE000(StartData.thermalVision.SwitchOn);
    return true;
  }

  private bool \uE003()
  {
    if (this.\uE00E.InProcess || !this.\uE00E.\uE001(false))
      return false;
    \uE1E1.\uE000(StartData.thermalVision.SwitchOff);
    return true;
  }

  private void Update()
  {
    this.\uE00E.\uE000(Time.deltaTime);
    this.\uE007.\uE001();
  }

  public static void \uE004()
  {
    if ((UnityEngine.Object) Thermal.\uE000 == (UnityEngine.Object) null)
      return;
    Thermal.\uE000.\uE00E.\uE002(false);
    Thermal.\uE000.\uE005(false);
  }

  private void \uE005(bool _param1)
  {
    this.\uE006();
    this.\uE007.\uE002(!_param1);
    this.\uE004.enabled = _param1;
    this.\uE005.\uE001(_param1);
    this.\uE006.\uE005(_param1);
    if ((UnityEngine.Object) this.\uE009 != (UnityEngine.Object) null)
      ((Behaviour) this.\uE009).enabled = !_param1;
    if (Main.\uE002.settings.graphics.PostEffects)
      ((Behaviour) this.\uE00A).enabled = !_param1;
    this.\uE003.enabled = _param1;
    this.\uE00F = _param1;
    this.\uE008.\uE001();
  }

  private void \uE006()
  {
    this.\uE005.\uE000();
    this.\uE006.\uE001();
    this.\uE007.\uE000();
  }

  private static float \uE007(AnimationCurve _param0)
  {
    float num = 0.0f;
    float minValue = float.MinValue;
    foreach (Keyframe key in _param0.keys)
    {
      if ((double) key.value > (double) minValue)
      {
        num = key.time;
        minValue = key.value;
      }
    }
    return num;
  }

  public static void \uE008(GameObject _param0)
  {
    if ((UnityEngine.Object) Thermal.\uE000 == (UnityEngine.Object) null)
      return;
    Thermal.\uE000.\uE006.\uE004(_param0);
  }

  public static void \uE009(EntityNetPlayer _param0)
  {
    if ((UnityEngine.Object) Thermal.\uE000 == (UnityEngine.Object) null)
      return;
    Thermal.\uE000.\uE008.\uE000(_param0);
  }

  public static Thermal \uE00A(GameObject _param0)
  {
    return _param0.GetComponent<Thermal>() ?? _param0.AddComponent<Thermal>();
  }

  private class \uE104
  {
    private BloomAndLensFlares \uE000;
    private GameObject \uE001;
    private float \uE002;
    private float \uE003;
    private float \uE004;

    public \uE104(GameObject _param1)
    {
      this.\uE001 = _param1;
    }

    public void \uE000()
    {
      if ((UnityEngine.Object) this.\uE000 != (UnityEngine.Object) null)
        return;
      this.\uE000 = this.\uE001.GetComponent<BloomAndLensFlares>();
      this.\uE002 = (float) this.\uE000.bloomIntensity;
      this.\uE003 = (float) this.\uE000.bloomThreshhold;
      this.\uE004 = (float) this.\uE000.sepBlurSpread;
    }

    public void \uE001(bool _param1)
    {
      if (Main.\uE002.settings.graphics.PostEffects)
        ((Behaviour) this.\uE000).enabled = !_param1;
      if (_param1)
      {
        this.\uE000.bloomIntensity = (__Null) 0.360000014305115;
        this.\uE000.bloomThreshhold = (__Null) -0.0500000007450581;
        this.\uE000.sepBlurSpread = (__Null) 5.53000020980835;
      }
      else
      {
        this.\uE000.bloomIntensity = (__Null) (double) this.\uE002;
        this.\uE000.bloomThreshhold = (__Null) (double) this.\uE003;
        this.\uE000.sepBlurSpread = (__Null) (double) this.\uE004;
      }
    }
  }

  private class \uE105
  {
    private Material \uE000;
    private Material \uE001;
    private Dictionary<Renderer, Thermal.\uE105.\uE106> \uE002;
    private Dictionary<Renderer, Thermal.\uE105.\uE107> \uE003;
    private BaseAmmunitions \uE004;

    public \uE105()
    {
      Thermal.\uE105.\uE106.\uE000 = (Material[]) null;
      Thermal.\uE105.\uE106.\uE002 = (Material[]) null;
      Thermal.\uE105.\uE106.\uE001 = (Material[]) null;
      Thermal.\uE105.\uE106.\uE003 = (Material[]) null;
    }

    private void \uE000()
    {
      string[] strArray = new string[9]
      {
        \uE20D.\uE000(3353),
        \uE20D.\uE000(3381),
        \uE20D.\uE000(3411),
        \uE20D.\uE000(3400),
        \uE20D.\uE000(3453),
        \uE20D.\uE000(30945),
        \uE20D.\uE000(3433),
        \uE20D.\uE000(3210),
        \uE20D.\uE000(3238)
      };
    }

    public void \uE001()
    {
      if ((UnityEngine.Object) this.\uE000 == (UnityEngine.Object) null)
      {
        this.\uE000 = new Material(\uE20D.\uE000(3267));
        this.\uE001 = new Material(StartData.thermalVision.ThermalShaderW);
      }
      if (this.\uE002 == null)
      {
        this.\uE002 = new Dictionary<Renderer, Thermal.\uE105.\uE106>();
        if (!this.\uE002())
        {
          this.\uE002 = (Dictionary<Renderer, Thermal.\uE105.\uE106>) null;
          return;
        }
      }
      if (this.\uE003 == null)
        this.\uE003 = new Dictionary<Renderer, Thermal.\uE105.\uE107>();
      this.\uE003();
    }

    private bool \uE002()
    {
      GameObject gameObject = GameObject.Find(\uE20D.\uE000(3086));
      if ((UnityEngine.Object) gameObject == (UnityEngine.Object) null)
        return false;
      Renderer renderer = gameObject.renderer;
      if ((UnityEngine.Object) renderer == (UnityEngine.Object) null)
        return false;
      this.\uE002.Add(renderer, new Thermal.\uE105.\uE106(renderer, this.\uE001));
      SkinnedMeshRenderer[] objectsOfType = (SkinnedMeshRenderer[]) UnityEngine.Object.FindObjectsOfType(typeof (SkinnedMeshRenderer));
      if (objectsOfType.Length == 0)
        return false;
      foreach (SkinnedMeshRenderer skinnedMeshRenderer in objectsOfType)
      {
        if (!this.\uE002.ContainsKey((Renderer) skinnedMeshRenderer))
          this.\uE002.Add((Renderer) skinnedMeshRenderer, new Thermal.\uE105.\uE106((Renderer) skinnedMeshRenderer, !(skinnedMeshRenderer.name == \uE20D.\uE000(3086)) ? this.\uE000 : this.\uE001));
      }
      return true;
    }

    private bool \uE003()
    {
      if ((UnityEngine.Object) this.\uE004 == (UnityEngine.Object) null)
        this.\uE004 = Peer.ClientGame.LocalPlayer.Ammo;
      if ((UnityEngine.Object) this.\uE004 == (UnityEngine.Object) null)
        return false;
      UnityEngine.Object[] objectArray = new UnityEngine.Object[2]
      {
        (UnityEngine.Object) this.\uE004.cPrimary,
        (UnityEngine.Object) this.\uE004.cSecondary
      };
      if (objectArray.Length == 0)
        return false;
      foreach (UnityEngine.Object @object in objectArray)
      {
        if (!(@object == (UnityEngine.Object) null))
        {
          GameObject gameObject = ((Component) @object).gameObject;
          if (gameObject.active)
          {
            Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>(false);
            for (int index = 0; index < componentsInChildren.Length; ++index)
            {
              if (!this.\uE003.ContainsKey(componentsInChildren[index]))
                this.\uE003.Add(componentsInChildren[index], new Thermal.\uE105.\uE107(componentsInChildren[index], new string[2]
                {
                  \uE20D.\uE000(19840),
                  \uE20D.\uE000(3125)
                }, new Color[2]{ Color.black, Color.black }));
            }
          }
        }
      }
      return true;
    }

    public void \uE004(GameObject _param1)
    {
      foreach (SkinnedMeshRenderer componentsInChild in _param1.GetComponentsInChildren<SkinnedMeshRenderer>())
      {
        if (!this.\uE002.ContainsKey((Renderer) componentsInChild))
        {
          if ((UnityEngine.Object) componentsInChild.material == (UnityEngine.Object) null)
            break;
          Thermal.\uE105.\uE106 obj = new Thermal.\uE105.\uE106((Renderer) componentsInChild, this.\uE000);
          obj.\uE000(Thermal.\uE000.\uE00F);
          this.\uE002.Add((Renderer) componentsInChild, obj);
        }
      }
    }

    public void \uE005(bool _param1)
    {
      if (this.\uE002 == null || this.\uE003 == null)
        return;
      using (Dictionary<Renderer, Thermal.\uE105.\uE106>.Enumerator enumerator = this.\uE002.GetEnumerator())
      {
        while (enumerator.MoveNext())
          enumerator.Current.Value.\uE000(_param1);
      }
      using (Dictionary<Renderer, Thermal.\uE105.\uE107>.Enumerator enumerator = this.\uE003.GetEnumerator())
      {
        while (enumerator.MoveNext())
          enumerator.Current.Value.\uE000(_param1);
      }
    }

    private class \uE106
    {
      public static Material[] \uE000;
      public static Material[] \uE001;
      public static Material[] \uE002;
      public static Material[] \uE003;
      private Renderer \uE004;
      private Material[] \uE005;
      private Material[] \uE006;

      public \uE106(Renderer _param1, Material _param2)
      {
        this.\uE004 = _param1;
        this.\uE005 = this.\uE004.materials;
        string name = _param1.transform.parent.name;
        bool flag = _param1.name == \uE20D.\uE000(3107);
        if (name == \uE20D.\uE000(3110))
        {
          if (flag)
          {
            if (Thermal.\uE105.\uE106.\uE000 == null)
              Thermal.\uE105.\uE106.\uE000 = this.\uE005;
            else
              this.\uE005 = Thermal.\uE105.\uE106.\uE000;
          }
          else if (Thermal.\uE105.\uE106.\uE002 == null)
            Thermal.\uE105.\uE106.\uE002 = this.\uE005;
          else
            this.\uE005 = Thermal.\uE105.\uE106.\uE002;
        }
        else if (name == \uE20D.\uE000(3154))
        {
          if (flag)
          {
            if (Thermal.\uE105.\uE106.\uE001 == null)
              Thermal.\uE105.\uE106.\uE001 = this.\uE005;
            else
              this.\uE005 = Thermal.\uE105.\uE106.\uE001;
          }
          else if (Thermal.\uE105.\uE106.\uE003 == null)
            Thermal.\uE105.\uE106.\uE003 = this.\uE005;
          else
            this.\uE005 = Thermal.\uE105.\uE106.\uE003;
        }
        this.\uE006 = new Material[this.\uE005.Length];
        for (int index = 0; index < this.\uE006.Length; ++index)
          this.\uE006[index] = _param2;
      }

      public void \uE000(bool _param1)
      {
        foreach (UnityEngine.Object sharedMaterial in this.\uE004.sharedMaterials)
        {
          if (sharedMaterial.name.Contains(\uE20D.\uE000(3166)))
            return;
        }
        this.\uE004.materials = !_param1 ? this.\uE005 : this.\uE006;
      }
    }

    private class \uE107
    {
      private Renderer \uE000;
      private Thermal.\uE105.\uE107.\uE108[] \uE001;

      public \uE107(Renderer _param1, string[] _param2, Color[] _param3)
      {
        this.\uE000 = _param1;
        Material[] materials = this.\uE000.materials;
        this.\uE001 = new Thermal.\uE105.\uE107.\uE108[materials.Length];
        for (int index = 0; index < materials.Length; ++index)
          this.\uE001[index] = new Thermal.\uE105.\uE107.\uE108(materials[index], _param2, _param3);
      }

      public void \uE000(bool _param1)
      {
        for (int index = 0; index < this.\uE001.Length; ++index)
          this.\uE001[index].\uE000(_param1);
      }

      private class \uE108
      {
        private Material \uE000;
        private string[] \uE001;
        private Color[] \uE002;
        private Color[] \uE003;

        public \uE108(Material _param1, string[] _param2, Color[] _param3)
        {
          this.\uE000 = _param1;
          int length = 0;
          for (int index = 0; index < _param2.Length; ++index)
          {
            if (_param1.HasProperty(_param2[index]))
              ++length;
          }
          this.\uE001 = new string[length];
          this.\uE002 = new Color[length];
          this.\uE003 = new Color[length];
          int index1 = 0;
          for (int index2 = 0; index2 < _param2.Length; ++index2)
          {
            if (_param1.HasProperty(_param2[index2]))
            {
              this.\uE001[index1] = _param2[index2];
              this.\uE002[index1] = _param1.GetColor(_param2[index2]);
              this.\uE003[index1] = _param3[index2];
              ++index1;
            }
          }
        }

        public void \uE000(bool _param1)
        {
          for (int index = 0; index < this.\uE001.Length; ++index)
            this.\uE000.SetColor(this.\uE001[index], !_param1 ? this.\uE002[index] : this.\uE003[index]);
        }
      }
    }
  }

  private class \uE109
  {
    private int \uE006 = -1;
    private Material \uE000;
    private Material \uE001;
    private Light \uE002;
    private Light \uE003;
    private Quality \uE004;
    private bool \uE005;

    public void \uE000()
    {
      if ((UnityEngine.Object) this.\uE002 == (UnityEngine.Object) null)
      {
        UnityEngine.Object[] objectsOfType = UnityEngine.Object.FindObjectsOfType(typeof (Light));
        for (int index = 0; index < objectsOfType.Length && !((UnityEngine.Object) this.\uE002 != (UnityEngine.Object) null); ++index)
        {
          if (objectsOfType[index].name == \uE20D.\uE000(20056))
            this.\uE002 = (Light) objectsOfType[index];
          else if (objectsOfType[index].name == \uE20D.\uE000(3146))
            this.\uE003 = (Light) objectsOfType[index];
        }
      }
      if ((UnityEngine.Object) this.\uE000 == (UnityEngine.Object) null)
      {
        this.\uE000 = new Material(Shader.Find(\uE20D.\uE000(3188)));
        this.\uE000.SetColor(\uE20D.\uE000(3178), Color.black);
      }
      if (!((UnityEngine.Object) this.\uE001 == (UnityEngine.Object) null))
        return;
      this.\uE001 = RenderSettings.skybox;
    }

    public void \uE001()
    {
      if (this.\uE005 || (UnityEngine.Object) this.\uE002 == (UnityEngine.Object) null || !((UnityEngine.Object) RenderSettings.skybox != (UnityEngine.Object) this.\uE000))
        return;
      this.\uE004();
    }

    public void \uE002(bool _param1)
    {
      this.\uE005 = _param1;
      if (_param1)
        this.\uE003();
      else
        this.\uE004();
    }

    private void \uE003()
    {
      LevelSettings.\uE001(true);
      Main.\uE002.settings.graphics.\uE002();
      SunOnGlass.\uE00A();
    }

    private void \uE004()
    {
      if ((bool) (UnityEngine.Object) PrefabFactory.Terrain)
        PrefabFactory.Terrain.lightmapIndex = (int) byte.MaxValue;
      for (int index = 0; index < PrefabFactory.Renderers.Length; ++index)
      {
        if (PrefabFactory.RenderersIndex[index] != -1)
          PrefabFactory.Renderers[index].lightmapIndex = (int) byte.MaxValue;
      }
      if ((UnityEngine.Object) this.\uE002 != (UnityEngine.Object) null)
        this.\uE002.enabled = false;
      if ((UnityEngine.Object) this.\uE003 != (UnityEngine.Object) null)
        this.\uE003.enabled = false;
      RenderSettings.skybox = this.\uE000;
      RenderSettings.fogColor = Color.black;
      RenderSettings.fogDensity = !Peer.ClientGame.LocalPlayer.playerInfo.\uE001(Cl_Skills.cl_storm3) ? 0.05f : 0.03f;
      RenderSettings.fogMode = FogMode.ExponentialSquared;
      RenderSettings.ambientLight = (Color) new Color32((byte) 125, (byte) 147, (byte) 160, byte.MaxValue);
      SunOnGlass.SunOnGlassInstance.enabled = false;
      ((Behaviour) SunOnGlass.SunShaftsInstance).enabled = false;
    }
  }

  private class \uE10A
  {
    private Dictionary<EntityNetPlayer, Thermal.\uE10A.\uE10B> \uE000 = new Dictionary<EntityNetPlayer, Thermal.\uE10A.\uE10B>();
    private Vector3 \uE001 = new Vector3(-0.34f, 0.0f, -0.15f);
    private bool \uE002;
    private int \uE003;
    private Camera \uE004;
    private Texture \uE005;
    private AnimationCurve \uE006;

    public \uE10A()
    {
      this.\uE005 = (Texture) ((RadarGUI) UnityEngine.Object.FindObjectOfType(typeof (RadarGUI))).hotspot;
      this.\uE006 = StartData.thermalVision.HighlightImpulse;
    }

    public bool Enable { set; get; }

    public void \uE000(EntityNetPlayer _param1)
    {
      if (!this.Enable || ((UnityEngine.Object) _param1 == (UnityEngine.Object) null || (UnityEngine.Object) _param1.Controller == (UnityEngine.Object) null))
        return;
      if (this.\uE000.ContainsKey(_param1))
      {
        if (_param1.IsBear == this.\uE002 && !_param1.isPlayer)
          this.\uE000[_param1] = new Thermal.\uE10A.\uE10B(_param1.Controller.spine);
        else
          this.\uE000.Remove(_param1);
      }
      else
      {
        if (_param1.IsBear != this.\uE002 || _param1.isPlayer)
          return;
        this.\uE000.Add(_param1, new Thermal.\uE10A.\uE10B(_param1.Controller.spine));
      }
    }

    public void \uE001()
    {
      using (List<EntityNetPlayer>.Enumerator enumerator = Peer.ClientGame.AllPlayers.GetEnumerator())
      {
        while (enumerator.MoveNext())
          this.\uE000(enumerator.Current);
      }
    }

    public void Update()
    {
      if (!this.Enable || !Main.\uE019)
        return;
      if (this.\uE002 != Main.\uE008.IsBear)
      {
        this.\uE002 = Main.\uE008.IsBear;
        this.\uE001();
      }
      if ((UnityEngine.Object) this.\uE004 == (UnityEngine.Object) null)
        this.\uE004 = Camera.main ?? Camera.mainCamera;
      Vector3 position = this.\uE004.transform.position;
      using (Dictionary<EntityNetPlayer, Thermal.\uE10A.\uE10B>.Enumerator enumerator = this.\uE000.GetEnumerator())
      {
        while (enumerator.MoveNext())
        {
          KeyValuePair<EntityNetPlayer, Thermal.\uE10A.\uE10B> current = enumerator.Current;
          if (!current.Key.IsSpectactor)
          {
            Thermal.\uE10A.\uE10B obj = current.Value;
            Vector3 vector3 = obj.Tr.TransformPoint(this.\uE001);
            Vector3 screenPoint = this.\uE004.WorldToScreenPoint(vector3);
            if ((double) screenPoint.z >= 0.0 && !Physics.Linecast(vector3, position, 4458496))
            {
              GUI.color = new Color(1f, 1f, 1f, this.\uE006.Evaluate(Time.time + obj.RndVal));
              int num1 = (int) (1000.0 / (double) (vector3 - position).magnitude);
              int num2 = num1 >> 1;
              GUI.DrawTexture(new Rect(screenPoint.x - (float) num2, (float) Screen.height - screenPoint.y - (float) num2, (float) num1, (float) num1), this.\uE005);
            }
          }
        }
      }
      GUI.color = Color.white;
    }

    private class \uE10B
    {
      public Transform Tr;
      public float RndVal;

      public \uE10B(Transform _param1)
      {
        this.Tr = _param1;
        int hashCode = this.Tr.GetHashCode();
        this.RndVal = (float) ((hashCode <= 0 ? -hashCode : hashCode) % 8483) * 0.02351f;
        this.RndVal %= 1f;
      }
    }
  }
}
и это

C#:
using UnityEngine;

internal class Tonemapping2 : MonoBehaviour
{
  private Material \uE000;
  private Texture2D \uE001;
  public AnimationCurve remapCurve;
  public Thermal Thermal;

  private void Start()
  {
    if ((Object) this.\uE000 == (Object) null)
      this.\uE000 = new Material(StartData.shaders.Tonemapper2);
    this.\uE000();
  }

  public void \uE000()
  {
    if (this.remapCurve == null)
      this.remapCurve = new AnimationCurve(new Keyframe[4]
      {
        new Keyframe(0.0f, 0.0f),
        new Keyframe(0.1f, 0.2f),
        new Keyframe(0.2f, 0.1f),
        new Keyframe(0.8f, 1.8f)
      });
    this.\uE001 = this.\uE001(this.remapCurve, (int) byte.MaxValue, this.\uE001);
  }

  public Texture2D \uE001(AnimationCurve _param1, int _param2, Texture2D _param3 = null)
  {
    if (_param1 == null)
      return (Texture2D) null;
    if ((Object) _param3 == (Object) null)
    {
      _param3 = new Texture2D(_param2, 1, TextureFormat.ARGB32, false, true);
      _param3.filterMode = FilterMode.Bilinear;
      _param3.wrapMode = TextureWrapMode.Clamp;
      _param3.hideFlags = HideFlags.DontSave;
    }
    float num1 = 1f / (float) _param2;
    for (int x = 0; x <= _param2; ++x)
    {
      float num2 = this.remapCurve.Evaluate((float) x * num1);
      _param3.SetPixel(x, 0, new Color(num2, num2, num2));
    }
    _param3.Apply();
    return _param3;
  }

  private void OnRenderImage(RenderTexture source, RenderTexture destination)
  {
    this.\uE000.SetTexture(\uE20D.\uE000(2960), (Texture) this.\uE001);
    Graphics.Blit((Texture) source, destination, this.\uE000);
    if (!((Object) this.Thermal != (Object) null))
      return;
    this.Thermal.\uE000();
  }
}
Кто шарит, помогите пожалуйста. Дайте наводку как это реализовать. Заранее спасибо. p.s - кому интересно, длл залил, ссылка ниже.
Пожалуйста, авторизуйтесь для просмотра ссылки.
 
Начинающий
Статус
Оффлайн
Регистрация
19 Май 2019
Сообщения
104
Реакции[?]
9
Поинты[?]
0
Бля ору я в эту штуку в классе 2-3 играл (щас 9) эта игра устарела и играть там или читерить уже не в кайф
 
Начинающий
Статус
Оффлайн
Регистрация
29 Дек 2016
Сообщения
105
Реакции[?]
19
Поинты[?]
2K
Проблему решил сам. Вопрос более не актуален!
 
Начинающий
Статус
Оффлайн
Регистрация
20 Май 2021
Сообщения
5
Реакции[?]
0
Поинты[?]
0
Проблему решил сам. Вопрос более не актуален!
Каким образом решил проблему? Что нужно добавить и в какой строке?
Выпускай статью, советуй, помогай - ждем)
 
Сверху Снизу