376 lines
10 KiB
C#
376 lines
10 KiB
C#
using System;
|
|
using UnityEngine;
|
|
|
|
// Token: 0x020000FA RID: 250
|
|
public class SniperScope : MonoBehaviour
|
|
{
|
|
// Token: 0x060032D1 RID: 13009 RVA: 0x000FF504 File Offset: 0x000FD704
|
|
private void JNJDENIGAHH()
|
|
{
|
|
if (this.ENBMEDIFBLM != null)
|
|
{
|
|
this.ENBMEDIFBLM.GFBCCFIMFEC -= this.BABKHOFBHEL;
|
|
this.ENBMEDIFBLM.PLPIAOHJBOB -= this.GOGEKFIMJNK;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032D2 RID: 13010 RVA: 0x000FF550 File Offset: 0x000FD750
|
|
private void NLMLLJNBKLP(Tool ENBMEDIFBLM)
|
|
{
|
|
this.PNPINCPNKPM = false;
|
|
}
|
|
|
|
// Token: 0x060032D3 RID: 13011 RVA: 0x000FF55C File Offset: 0x000FD75C
|
|
private void MAEGKFNLPAF(bool NOBAPCOKFIL)
|
|
{
|
|
if (this.scopeCamera != null)
|
|
{
|
|
this.scopeCamera.enabled = NOBAPCOKFIL;
|
|
}
|
|
if (this.ENBMEDIFBLM != null)
|
|
{
|
|
NILFAGNKNMH nilfagnknmh = ((!NOBAPCOKFIL) ? ((NILFAGNKNMH)(-16)) : ((NILFAGNKNMH)(-45)));
|
|
this.ENBMEDIFBLM.SetRenderLayer(nilfagnknmh);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032D4 RID: 13012 RVA: 0x000FF5B4 File Offset: 0x000FD7B4
|
|
private void ANHBINJLGOH(Tool ENBMEDIFBLM)
|
|
{
|
|
if (ENBMEDIFBLM.FICBNMJECCH.NHDDPGADJPJ)
|
|
{
|
|
this.PNPINCPNKPM = true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032D5 RID: 13013 RVA: 0x000FF5D0 File Offset: 0x000FD7D0
|
|
private void BJNIFHLKKEA(bool NOBAPCOKFIL)
|
|
{
|
|
if (this.scopeCamera != null)
|
|
{
|
|
this.scopeCamera.enabled = NOBAPCOKFIL;
|
|
}
|
|
if (this.ENBMEDIFBLM != null)
|
|
{
|
|
NILFAGNKNMH nilfagnknmh = ((!NOBAPCOKFIL) ? ((NILFAGNKNMH)(-96)) : ((NILFAGNKNMH)(-2)));
|
|
this.ENBMEDIFBLM.SetRenderLayer(nilfagnknmh);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032D6 RID: 13014 RVA: 0x000FF628 File Offset: 0x000FD828
|
|
private void PAEIJLKEEGJ()
|
|
{
|
|
this.PNPINCPNKPM = this.ENBMEDIFBLM == null;
|
|
}
|
|
|
|
// Token: 0x060032D7 RID: 13015 RVA: 0x000FF63C File Offset: 0x000FD83C
|
|
private void KDHBBCGHDMC()
|
|
{
|
|
if (this.ENBMEDIFBLM != null)
|
|
{
|
|
this.ENBMEDIFBLM.GFBCCFIMFEC -= this.NICKDDCOCJH;
|
|
this.ENBMEDIFBLM.PLPIAOHJBOB -= this.EKGOFMDGGAC;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032D8 RID: 13016 RVA: 0x000FF688 File Offset: 0x000FD888
|
|
private void Start()
|
|
{
|
|
this.PNPINCPNKPM = this.ENBMEDIFBLM == null;
|
|
}
|
|
|
|
// Token: 0x060032D9 RID: 13017 RVA: 0x000FF69C File Offset: 0x000FD89C
|
|
private void FKGKJOHOGMP()
|
|
{
|
|
if (this.ENBMEDIFBLM != null)
|
|
{
|
|
this.ENBMEDIFBLM.GFBCCFIMFEC -= this.GBBMJIEGILI;
|
|
this.ENBMEDIFBLM.PLPIAOHJBOB -= this.GOGEKFIMJNK;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032DB RID: 13019 RVA: 0x000FF708 File Offset: 0x000FD908
|
|
private void NICKDDCOCJH(Tool ENBMEDIFBLM)
|
|
{
|
|
if (ENBMEDIFBLM.FICBNMJECCH.GJLCBGPGIGN())
|
|
{
|
|
this.MAEGKFNLPAF(true);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032DC RID: 13020 RVA: 0x000FF724 File Offset: 0x000FD924
|
|
private void FFACLNKGBAJ(Tool ENBMEDIFBLM)
|
|
{
|
|
this.MAEGKFNLPAF(true);
|
|
}
|
|
|
|
// Token: 0x060032DD RID: 13021 RVA: 0x000FF730 File Offset: 0x000FD930
|
|
private void Awake()
|
|
{
|
|
this.ANHNNLOIDPF = new RenderTexture(this.resolution, this.resolution, 24);
|
|
if (this.scopeCamera == null || this.scopeRenderer == null)
|
|
{
|
|
Debug.LogError("SniperScope: Missing camera or renderer.");
|
|
return;
|
|
}
|
|
this.scopeCamera.fieldOfView = this.fov;
|
|
this.scopeCamera.targetTexture = this.ANHNNLOIDPF;
|
|
this.scopeRenderer.material.mainTexture = this.ANHNNLOIDPF;
|
|
this.ENBMEDIFBLM = base.GetComponent<Tool>();
|
|
if (this.ENBMEDIFBLM != null)
|
|
{
|
|
this.ENBMEDIFBLM.GFBCCFIMFEC += this.ANHBINJLGOH;
|
|
this.ENBMEDIFBLM.PLPIAOHJBOB += this.EKGOFMDGGAC;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032DE RID: 13022 RVA: 0x000FF808 File Offset: 0x000FDA08
|
|
private void CADJBBNKFIL()
|
|
{
|
|
if (this.ENBMEDIFBLM != null)
|
|
{
|
|
this.ENBMEDIFBLM.GFBCCFIMFEC -= this.FJJDODOGBEO;
|
|
this.ENBMEDIFBLM.PLPIAOHJBOB -= this.NLMLLJNBKLP;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032DF RID: 13023 RVA: 0x000FF854 File Offset: 0x000FDA54
|
|
private void CJIBCBLNGGM()
|
|
{
|
|
this.MAEGKFNLPAF(this.ENBMEDIFBLM == null);
|
|
}
|
|
|
|
// Token: 0x060032E0 RID: 13024 RVA: 0x000FF868 File Offset: 0x000FDA68
|
|
private void PGIAPNBIIJG()
|
|
{
|
|
if (this.ENBMEDIFBLM != null)
|
|
{
|
|
this.ENBMEDIFBLM.GFBCCFIMFEC -= this.FJJDODOGBEO;
|
|
this.ENBMEDIFBLM.PLPIAOHJBOB -= this.GOGEKFIMJNK;
|
|
}
|
|
}
|
|
|
|
// Token: 0x170000ED RID: 237
|
|
// (set) Token: 0x060032E1 RID: 13025 RVA: 0x000FF8B4 File Offset: 0x000FDAB4
|
|
private bool PNPINCPNKPM
|
|
{
|
|
set
|
|
{
|
|
if (this.scopeCamera != null)
|
|
{
|
|
this.scopeCamera.enabled = value;
|
|
}
|
|
if (this.ENBMEDIFBLM != null)
|
|
{
|
|
NILFAGNKNMH nilfagnknmh = ((!value) ? NILFAGNKNMH.DynamicPhysics : NILFAGNKNMH.CameraMesh);
|
|
this.ENBMEDIFBLM.SetRenderLayer(nilfagnknmh);
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032E2 RID: 13026 RVA: 0x000FF90C File Offset: 0x000FDB0C
|
|
private void PAKPLLPDIOG()
|
|
{
|
|
this.ANHNNLOIDPF = new RenderTexture(this.resolution, this.resolution, -8);
|
|
if (this.scopeCamera == null || this.scopeRenderer == null)
|
|
{
|
|
Debug.LogError("looktarget");
|
|
return;
|
|
}
|
|
this.scopeCamera.fieldOfView = this.fov;
|
|
this.scopeCamera.targetTexture = this.ANHNNLOIDPF;
|
|
this.scopeRenderer.material.mainTexture = this.ANHNNLOIDPF;
|
|
this.ENBMEDIFBLM = base.GetComponent<Tool>();
|
|
if (this.ENBMEDIFBLM != null)
|
|
{
|
|
this.ENBMEDIFBLM.GFBCCFIMFEC += this.NICKDDCOCJH;
|
|
this.ENBMEDIFBLM.PLPIAOHJBOB += this.EKGOFMDGGAC;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032E3 RID: 13027 RVA: 0x000FF9E4 File Offset: 0x000FDBE4
|
|
private void PPCCKMMADGK()
|
|
{
|
|
if (this.ENBMEDIFBLM != null)
|
|
{
|
|
this.ENBMEDIFBLM.GFBCCFIMFEC -= this.NICKDDCOCJH;
|
|
this.ENBMEDIFBLM.PLPIAOHJBOB -= this.FFACLNKGBAJ;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032E4 RID: 13028 RVA: 0x000FFA30 File Offset: 0x000FDC30
|
|
private void OKGGDGJIPAM()
|
|
{
|
|
this.ANHNNLOIDPF = new RenderTexture(this.resolution, this.resolution, -113);
|
|
if (this.scopeCamera == null || this.scopeRenderer == null)
|
|
{
|
|
Debug.LogError("gzip");
|
|
return;
|
|
}
|
|
this.scopeCamera.fieldOfView = this.fov;
|
|
this.scopeCamera.targetTexture = this.ANHNNLOIDPF;
|
|
this.scopeRenderer.material.mainTexture = this.ANHNNLOIDPF;
|
|
this.ENBMEDIFBLM = base.GetComponent<Tool>();
|
|
if (this.ENBMEDIFBLM != null)
|
|
{
|
|
this.ENBMEDIFBLM.GFBCCFIMFEC += this.ANHBINJLGOH;
|
|
this.ENBMEDIFBLM.PLPIAOHJBOB += this.NLMLLJNBKLP;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032E5 RID: 13029 RVA: 0x000FFB08 File Offset: 0x000FDD08
|
|
private void BJGJHPBABDB()
|
|
{
|
|
if (this.ENBMEDIFBLM != null)
|
|
{
|
|
this.ENBMEDIFBLM.GFBCCFIMFEC -= this.NICKDDCOCJH;
|
|
this.ENBMEDIFBLM.PLPIAOHJBOB -= this.NLMLLJNBKLP;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032E6 RID: 13030 RVA: 0x000FFB54 File Offset: 0x000FDD54
|
|
private void FJJDODOGBEO(Tool ENBMEDIFBLM)
|
|
{
|
|
if (ENBMEDIFBLM.FICBNMJECCH.NMDPPKDGAJN())
|
|
{
|
|
this.MAEGKFNLPAF(false);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032E7 RID: 13031 RVA: 0x000FFB70 File Offset: 0x000FDD70
|
|
private void OLEBPMMFNIF()
|
|
{
|
|
this.ANHNNLOIDPF = new RenderTexture(this.resolution, this.resolution, 46);
|
|
if (this.scopeCamera == null || this.scopeRenderer == null)
|
|
{
|
|
Debug.LogError("Failed to connect to RecNet");
|
|
return;
|
|
}
|
|
this.scopeCamera.fieldOfView = this.fov;
|
|
this.scopeCamera.targetTexture = this.ANHNNLOIDPF;
|
|
this.scopeRenderer.material.mainTexture = this.ANHNNLOIDPF;
|
|
this.ENBMEDIFBLM = base.GetComponent<Tool>();
|
|
if (this.ENBMEDIFBLM != null)
|
|
{
|
|
this.ENBMEDIFBLM.GFBCCFIMFEC += this.ANHBINJLGOH;
|
|
this.ENBMEDIFBLM.PLPIAOHJBOB += this.FFACLNKGBAJ;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032E8 RID: 13032 RVA: 0x000FFC48 File Offset: 0x000FDE48
|
|
private void GOGEKFIMJNK(Tool ENBMEDIFBLM)
|
|
{
|
|
this.BJNIFHLKKEA(true);
|
|
}
|
|
|
|
// Token: 0x060032E9 RID: 13033 RVA: 0x000FFC54 File Offset: 0x000FDE54
|
|
private void BABKHOFBHEL(Tool ENBMEDIFBLM)
|
|
{
|
|
if (ENBMEDIFBLM.FICBNMJECCH.HEGAPJJIPCA())
|
|
{
|
|
this.ADFONBJPKLN(false);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032EA RID: 13034 RVA: 0x000FFC70 File Offset: 0x000FDE70
|
|
private void EKGOFMDGGAC(Tool ENBMEDIFBLM)
|
|
{
|
|
this.PNPINCPNKPM = false;
|
|
}
|
|
|
|
// Token: 0x060032EB RID: 13035 RVA: 0x000FFC7C File Offset: 0x000FDE7C
|
|
private void ADFONBJPKLN(bool NOBAPCOKFIL)
|
|
{
|
|
if (this.scopeCamera != null)
|
|
{
|
|
this.scopeCamera.enabled = NOBAPCOKFIL;
|
|
}
|
|
if (this.ENBMEDIFBLM != null)
|
|
{
|
|
NILFAGNKNMH nilfagnknmh = ((!NOBAPCOKFIL) ? ((NILFAGNKNMH)(-99)) : ((NILFAGNKNMH)(-52)));
|
|
this.ENBMEDIFBLM.SetRenderLayer(nilfagnknmh);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032EC RID: 13036 RVA: 0x000FFCD4 File Offset: 0x000FDED4
|
|
private void GBBMJIEGILI(Tool ENBMEDIFBLM)
|
|
{
|
|
if (ENBMEDIFBLM.FICBNMJECCH.NMDPPKDGAJN())
|
|
{
|
|
this.PNPINCPNKPM = false;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032ED RID: 13037 RVA: 0x000FFCF0 File Offset: 0x000FDEF0
|
|
private void DLCHNOFPONJ()
|
|
{
|
|
this.ANHNNLOIDPF = new RenderTexture(this.resolution, this.resolution, -116);
|
|
if (this.scopeCamera == null || this.scopeRenderer == null)
|
|
{
|
|
Debug.LogError("move");
|
|
return;
|
|
}
|
|
this.scopeCamera.fieldOfView = this.fov;
|
|
this.scopeCamera.targetTexture = this.ANHNNLOIDPF;
|
|
this.scopeRenderer.material.mainTexture = this.ANHNNLOIDPF;
|
|
this.ENBMEDIFBLM = base.GetComponent<Tool>();
|
|
if (this.ENBMEDIFBLM != null)
|
|
{
|
|
this.ENBMEDIFBLM.GFBCCFIMFEC += this.ANHBINJLGOH;
|
|
this.ENBMEDIFBLM.PLPIAOHJBOB += this.EKGOFMDGGAC;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032EE RID: 13038 RVA: 0x000FFDC8 File Offset: 0x000FDFC8
|
|
private void BBKPAKKLOGB()
|
|
{
|
|
this.ANHNNLOIDPF = new RenderTexture(this.resolution, this.resolution, -100);
|
|
if (this.scopeCamera == null || this.scopeRenderer == null)
|
|
{
|
|
Debug.LogError("demoLong");
|
|
return;
|
|
}
|
|
this.scopeCamera.fieldOfView = this.fov;
|
|
this.scopeCamera.targetTexture = this.ANHNNLOIDPF;
|
|
this.scopeRenderer.material.mainTexture = this.ANHNNLOIDPF;
|
|
this.ENBMEDIFBLM = base.GetComponent<Tool>();
|
|
if (this.ENBMEDIFBLM != null)
|
|
{
|
|
this.ENBMEDIFBLM.GFBCCFIMFEC += this.NICKDDCOCJH;
|
|
this.ENBMEDIFBLM.PLPIAOHJBOB += this.GOGEKFIMJNK;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060032EF RID: 13039 RVA: 0x000FFEA0 File Offset: 0x000FE0A0
|
|
private void OnDestroy()
|
|
{
|
|
if (this.ENBMEDIFBLM != null)
|
|
{
|
|
this.ENBMEDIFBLM.GFBCCFIMFEC -= this.ANHBINJLGOH;
|
|
this.ENBMEDIFBLM.PLPIAOHJBOB -= this.EKGOFMDGGAC;
|
|
}
|
|
}
|
|
|
|
// Token: 0x040006A0 RID: 1696
|
|
[SerializeField]
|
|
private Renderer scopeRenderer;
|
|
|
|
// Token: 0x040006A1 RID: 1697
|
|
[SerializeField]
|
|
private Camera scopeCamera;
|
|
|
|
// Token: 0x040006A2 RID: 1698
|
|
[SerializeField]
|
|
private float fov = 5f;
|
|
|
|
// Token: 0x040006A3 RID: 1699
|
|
[SerializeField]
|
|
private int resolution = 256;
|
|
|
|
// Token: 0x040006A4 RID: 1700
|
|
private RenderTexture ANHNNLOIDPF;
|
|
|
|
// Token: 0x040006A5 RID: 1701
|
|
private Tool ENBMEDIFBLM;
|
|
}
|