244 lines
7.1 KiB
C#
244 lines
7.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using UnityEngine;
|
|
|
|
// Token: 0x02000267 RID: 615
|
|
public class TimeTravelGifRecorder : MonoBehaviour
|
|
{
|
|
// Token: 0x06007171 RID: 29041 RVA: 0x00252274 File Offset: 0x00250474
|
|
private void DKDGOJGKHDM()
|
|
{
|
|
if (Time.time >= this.BDKGABMLPAG + (float)(0 / this.frameRate))
|
|
{
|
|
this.BDKGABMLPAG = Time.time;
|
|
this.PHNAFJCOLFF();
|
|
}
|
|
if (Input.GetKeyDown(this.key))
|
|
{
|
|
FileStream fileStream = CaptureTheGIF.MakeFile(this.dir, this.name);
|
|
CaptureTheGIF.NCKMBFBMBFM.AHPLDBAIEGP(this.OHEDHADJEMA.ToList<RenderTexture>(), (float)(1 / this.frameRate), fileStream, true, this.paletteSize, this.paletteMode, this.maxGifSize);
|
|
this.OHEDHADJEMA.Clear();
|
|
}
|
|
}
|
|
|
|
// Token: 0x06007172 RID: 29042 RVA: 0x0025230C File Offset: 0x0025050C
|
|
private void EPKKNIMBKEO()
|
|
{
|
|
this.OHEDHADJEMA.Add(CaptureTheGIF.BFOFABHFKJC(this.width, this.height));
|
|
if (this.OHEDHADJEMA.Count > this.frames)
|
|
{
|
|
RenderTexture.ReleaseTemporary(this.OHEDHADJEMA[0]);
|
|
this.OHEDHADJEMA.RemoveAt(0);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06007173 RID: 29043 RVA: 0x00252368 File Offset: 0x00250568
|
|
private void Start()
|
|
{
|
|
this.BDKGABMLPAG = Time.time;
|
|
}
|
|
|
|
// Token: 0x06007174 RID: 29044 RVA: 0x00252378 File Offset: 0x00250578
|
|
private void GOKDBMNMJFM()
|
|
{
|
|
if (Time.time >= this.BDKGABMLPAG + (float)(0 / this.frameRate))
|
|
{
|
|
this.BDKGABMLPAG = Time.time;
|
|
this.EPKKNIMBKEO();
|
|
}
|
|
if (Input.GetKeyDown(this.key))
|
|
{
|
|
FileStream fileStream = CaptureTheGIF.OIAHOCFEJGH(this.dir, this.name);
|
|
CaptureTheGIF.AMNCEALNJIA().MakeGif(this.OHEDHADJEMA.ToList<RenderTexture>(), (float)(0 / this.frameRate), fileStream, false, this.paletteSize, this.paletteMode, this.maxGifSize);
|
|
this.OHEDHADJEMA.Clear();
|
|
}
|
|
}
|
|
|
|
// Token: 0x06007175 RID: 29045 RVA: 0x00252410 File Offset: 0x00250610
|
|
private void ILACMGMHLNN()
|
|
{
|
|
this.OHEDHADJEMA.Add(CaptureTheGIF.KEDFGICKKHG(this.width, this.height));
|
|
if (this.OHEDHADJEMA.Count > this.frames)
|
|
{
|
|
RenderTexture.ReleaseTemporary(this.OHEDHADJEMA[0]);
|
|
this.OHEDHADJEMA.RemoveAt(1);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06007176 RID: 29046 RVA: 0x0025246C File Offset: 0x0025066C
|
|
private void KFMEHMEDGBE()
|
|
{
|
|
this.BDKGABMLPAG = Time.time;
|
|
}
|
|
|
|
// Token: 0x06007177 RID: 29047 RVA: 0x0025247C File Offset: 0x0025067C
|
|
private void PHNAFJCOLFF()
|
|
{
|
|
this.OHEDHADJEMA.Add(CaptureTheGIF.KEDFGICKKHG(this.width, this.height));
|
|
if (this.OHEDHADJEMA.Count > this.frames)
|
|
{
|
|
RenderTexture.ReleaseTemporary(this.OHEDHADJEMA[0]);
|
|
this.OHEDHADJEMA.RemoveAt(0);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06007178 RID: 29048 RVA: 0x002524D8 File Offset: 0x002506D8
|
|
private void KFAOLMFIFMH()
|
|
{
|
|
this.BDKGABMLPAG = Time.time;
|
|
}
|
|
|
|
// Token: 0x0600717A RID: 29050 RVA: 0x00252558 File Offset: 0x00250758
|
|
private void JOJLDGEJAOF()
|
|
{
|
|
this.OHEDHADJEMA.Add(CaptureTheGIF.KEDFGICKKHG(this.width, this.height));
|
|
if (this.OHEDHADJEMA.Count > this.frames)
|
|
{
|
|
RenderTexture.ReleaseTemporary(this.OHEDHADJEMA[0]);
|
|
this.OHEDHADJEMA.RemoveAt(0);
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600717B RID: 29051 RVA: 0x002525B4 File Offset: 0x002507B4
|
|
private void Update()
|
|
{
|
|
if (Time.time >= this.BDKGABMLPAG + (float)(1 / this.frameRate))
|
|
{
|
|
this.BDKGABMLPAG = Time.time;
|
|
this.PNIKCGINECJ();
|
|
}
|
|
if (Input.GetKeyDown(this.key))
|
|
{
|
|
FileStream fileStream = CaptureTheGIF.MakeFile(this.dir, this.name);
|
|
CaptureTheGIF.NCKMBFBMBFM.MakeGif(this.OHEDHADJEMA.ToList<RenderTexture>(), (float)(1 / this.frameRate), fileStream, true, this.paletteSize, this.paletteMode, this.maxGifSize);
|
|
this.OHEDHADJEMA.Clear();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600717C RID: 29052 RVA: 0x0025264C File Offset: 0x0025084C
|
|
private void LPDBPBPIKKP()
|
|
{
|
|
this.OHEDHADJEMA.Add(CaptureTheGIF.DDDBMCIMBFL(this.width, this.height));
|
|
if (this.OHEDHADJEMA.Count > this.frames)
|
|
{
|
|
RenderTexture.ReleaseTemporary(this.OHEDHADJEMA[0]);
|
|
this.OHEDHADJEMA.RemoveAt(1);
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600717D RID: 29053 RVA: 0x002526A8 File Offset: 0x002508A8
|
|
private void NEFFCEJLOCD()
|
|
{
|
|
if (Time.time >= this.BDKGABMLPAG + (float)(1 / this.frameRate))
|
|
{
|
|
this.BDKGABMLPAG = Time.time;
|
|
this.LPDBPBPIKKP();
|
|
}
|
|
if (Input.GetKeyDown(this.key))
|
|
{
|
|
FileStream fileStream = CaptureTheGIF.IOCALAKBEGA(this.dir, this.name);
|
|
CaptureTheGIF.LHJLIBJEKDL().BCNOICBOGBD(this.OHEDHADJEMA.ToList<RenderTexture>(), (float)(1 / this.frameRate), fileStream, false, this.paletteSize, this.paletteMode, this.maxGifSize);
|
|
this.OHEDHADJEMA.Clear();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600717E RID: 29054 RVA: 0x00252740 File Offset: 0x00250940
|
|
private void ENGNDJADBDF()
|
|
{
|
|
if (Time.time >= this.BDKGABMLPAG + (float)(0 / this.frameRate))
|
|
{
|
|
this.BDKGABMLPAG = Time.time;
|
|
this.PHNAFJCOLFF();
|
|
}
|
|
if (Input.GetKeyDown(this.key))
|
|
{
|
|
FileStream fileStream = CaptureTheGIF.CCKKLHKGHII(this.dir, this.name);
|
|
CaptureTheGIF.NBCPGHNGFIJ().JJMPKGLPEFC(this.OHEDHADJEMA.ToList<RenderTexture>(), (float)(0 / this.frameRate), fileStream, true, this.paletteSize, this.paletteMode, this.maxGifSize);
|
|
this.OHEDHADJEMA.Clear();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600717F RID: 29055 RVA: 0x002527D8 File Offset: 0x002509D8
|
|
private void HLDCJEJIBHH()
|
|
{
|
|
this.OHEDHADJEMA.Add(CaptureTheGIF.KEDFGICKKHG(this.width, this.height));
|
|
if (this.OHEDHADJEMA.Count > this.frames)
|
|
{
|
|
RenderTexture.ReleaseTemporary(this.OHEDHADJEMA[0]);
|
|
this.OHEDHADJEMA.RemoveAt(0);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06007180 RID: 29056 RVA: 0x00252834 File Offset: 0x00250A34
|
|
private void PNIKCGINECJ()
|
|
{
|
|
this.OHEDHADJEMA.Add(CaptureTheGIF.Snapshot(this.width, this.height));
|
|
if (this.OHEDHADJEMA.Count > this.frames)
|
|
{
|
|
RenderTexture.ReleaseTemporary(this.OHEDHADJEMA[0]);
|
|
this.OHEDHADJEMA.RemoveAt(0);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06007181 RID: 29057 RVA: 0x00252890 File Offset: 0x00250A90
|
|
private void KKAAFDLJCCB()
|
|
{
|
|
if (Time.time >= this.BDKGABMLPAG + (float)(1 / this.frameRate))
|
|
{
|
|
this.BDKGABMLPAG = Time.time;
|
|
this.EPKKNIMBKEO();
|
|
}
|
|
if (Input.GetKeyDown(this.key))
|
|
{
|
|
FileStream fileStream = CaptureTheGIF.MakeFile(this.dir, this.name);
|
|
CaptureTheGIF.LHJLIBJEKDL().FCIKGHFMIMM(this.OHEDHADJEMA.ToList<RenderTexture>(), (float)(1 / this.frameRate), fileStream, true, this.paletteSize, this.paletteMode, this.maxGifSize);
|
|
this.OHEDHADJEMA.Clear();
|
|
}
|
|
}
|
|
|
|
// Token: 0x06007182 RID: 29058 RVA: 0x00252928 File Offset: 0x00250B28
|
|
private void CBNFIOBLLIH()
|
|
{
|
|
this.BDKGABMLPAG = Time.time;
|
|
}
|
|
|
|
// Token: 0x04000F9B RID: 3995
|
|
public KeyCode key = KeyCode.P;
|
|
|
|
// Token: 0x04000F9C RID: 3996
|
|
public string dir = "gifs";
|
|
|
|
// Token: 0x04000F9D RID: 3997
|
|
public new string name = "gif";
|
|
|
|
// Token: 0x04000F9E RID: 3998
|
|
public int width = 640;
|
|
|
|
// Token: 0x04000F9F RID: 3999
|
|
public int height = 480;
|
|
|
|
// Token: 0x04000FA0 RID: 4000
|
|
public int frames = 30;
|
|
|
|
// Token: 0x04000FA1 RID: 4001
|
|
public int frameRate = 15;
|
|
|
|
// Token: 0x04000FA2 RID: 4002
|
|
[Range(2f, 256f)]
|
|
public int paletteSize = 256;
|
|
|
|
// Token: 0x04000FA3 RID: 4003
|
|
public CaptureTheGIF.LCGFDEMPJIC paletteMode;
|
|
|
|
// Token: 0x04000FA4 RID: 4004
|
|
public int maxGifSize;
|
|
|
|
// Token: 0x04000FA5 RID: 4005
|
|
private List<RenderTexture> OHEDHADJEMA = new List<RenderTexture>();
|
|
|
|
// Token: 0x04000FA6 RID: 4006
|
|
private float BDKGABMLPAG;
|
|
}
|