233 lines
8.0 KiB
C#
233 lines
8.0 KiB
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace RecRoom.VFX
|
|
{
|
|
// Token: 0x020011A0 RID: 4512
|
|
[Serializable]
|
|
public class JitteringTransform
|
|
{
|
|
// Token: 0x060267EB RID: 157675 RVA: 0x00AB2878 File Offset: 0x00AB0A78
|
|
public void NPBMOBIKNHD()
|
|
{
|
|
if (this.transform != null)
|
|
{
|
|
this.defaultLocalPosition = this.transform.localPosition;
|
|
this.defaultLocalScale = this.transform.localScale;
|
|
this.savedDefaultValues = true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060267EC RID: 157676 RVA: 0x00AB28B4 File Offset: 0x00AB0AB4
|
|
public void AGPCFAAOAIN()
|
|
{
|
|
if (this.transform != null)
|
|
{
|
|
this.defaultLocalPosition = this.transform.localPosition;
|
|
this.defaultLocalScale = this.transform.localScale;
|
|
this.savedDefaultValues = true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060267EE RID: 157678 RVA: 0x00AB2918 File Offset: 0x00AB0B18
|
|
public void PKICAHHDEML()
|
|
{
|
|
if (this.transform != null)
|
|
{
|
|
this.defaultLocalPosition = this.transform.localPosition;
|
|
this.defaultLocalScale = this.transform.localScale;
|
|
this.savedDefaultValues = true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060267EF RID: 157679 RVA: 0x00AB2954 File Offset: 0x00AB0B54
|
|
public void AMHNBHJAGCO()
|
|
{
|
|
if (!this.savedDefaultValues)
|
|
{
|
|
this.OFOCALCGIBD();
|
|
}
|
|
float num = 1f / (float)this.jitterFPS;
|
|
float num2 = Time.time - this.lastJitterTime;
|
|
if (num2 >= num)
|
|
{
|
|
this.lastJitterTime = Time.time;
|
|
this.jitterOffset.x = global::UnityEngine.Random.Range(-this.maxJitterOffset.x, this.maxJitterOffset.x);
|
|
this.jitterOffset.y = global::UnityEngine.Random.Range(-this.maxJitterOffset.y, this.maxJitterOffset.y);
|
|
this.jitterScale.x = global::UnityEngine.Random.Range(-this.maxJitterScale.x, this.maxJitterScale.x);
|
|
this.jitterScale.y = global::UnityEngine.Random.Range(-this.maxJitterScale.y, this.maxJitterScale.y);
|
|
if (this.transform != null)
|
|
{
|
|
Vector3 vector = new Vector3(this.defaultLocalPosition.x + this.jitterOffset.x, this.defaultLocalPosition.y + this.jitterOffset.y, this.defaultLocalPosition.z);
|
|
Vector3 vector2 = new Vector3(this.defaultLocalScale.x + this.jitterScale.x, this.defaultLocalScale.y + this.jitterScale.y, this.defaultLocalScale.z);
|
|
this.transform.localScale = vector2;
|
|
this.transform.localPosition = vector;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x060267F0 RID: 157680 RVA: 0x00AB2AE4 File Offset: 0x00AB0CE4
|
|
public void KEBFFJJIFED()
|
|
{
|
|
if (this.transform != null)
|
|
{
|
|
this.defaultLocalPosition = this.transform.localPosition;
|
|
this.defaultLocalScale = this.transform.localScale;
|
|
this.savedDefaultValues = true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060267F1 RID: 157681 RVA: 0x00AB2B20 File Offset: 0x00AB0D20
|
|
public void OFOCALCGIBD()
|
|
{
|
|
if (this.transform != null)
|
|
{
|
|
this.defaultLocalPosition = this.transform.localPosition;
|
|
this.defaultLocalScale = this.transform.localScale;
|
|
this.savedDefaultValues = true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060267F2 RID: 157682 RVA: 0x00AB2B5C File Offset: 0x00AB0D5C
|
|
public void OJHPKIKLDEL()
|
|
{
|
|
if (!this.savedDefaultValues)
|
|
{
|
|
this.LLPHGBGCFMH();
|
|
}
|
|
float num = 469f / (float)this.jitterFPS;
|
|
float num2 = Time.time - this.lastJitterTime;
|
|
if (num2 >= num)
|
|
{
|
|
this.lastJitterTime = Time.time;
|
|
this.jitterOffset.x = global::UnityEngine.Random.Range(-this.maxJitterOffset.x, this.maxJitterOffset.x);
|
|
this.jitterOffset.y = global::UnityEngine.Random.Range(-this.maxJitterOffset.y, this.maxJitterOffset.y);
|
|
this.jitterScale.x = global::UnityEngine.Random.Range(-this.maxJitterScale.x, this.maxJitterScale.x);
|
|
this.jitterScale.y = global::UnityEngine.Random.Range(-this.maxJitterScale.y, this.maxJitterScale.y);
|
|
if (this.transform != null)
|
|
{
|
|
Vector3 vector = new Vector3(this.defaultLocalPosition.x + this.jitterOffset.x, this.defaultLocalPosition.y + this.jitterOffset.y, this.defaultLocalPosition.z);
|
|
Vector3 vector2 = new Vector3(this.defaultLocalScale.x + this.jitterScale.x, this.defaultLocalScale.y + this.jitterScale.y, this.defaultLocalScale.z);
|
|
this.transform.localScale = vector2;
|
|
this.transform.localPosition = vector;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x060267F3 RID: 157683 RVA: 0x00AB2CEC File Offset: 0x00AB0EEC
|
|
public void DPIECEHAGOC()
|
|
{
|
|
if (!this.savedDefaultValues)
|
|
{
|
|
this.LLPHGBGCFMH();
|
|
}
|
|
float num = 1242f / (float)this.jitterFPS;
|
|
float num2 = Time.time - this.lastJitterTime;
|
|
if (num2 >= num)
|
|
{
|
|
this.lastJitterTime = Time.time;
|
|
this.jitterOffset.x = global::UnityEngine.Random.Range(-this.maxJitterOffset.x, this.maxJitterOffset.x);
|
|
this.jitterOffset.y = global::UnityEngine.Random.Range(-this.maxJitterOffset.y, this.maxJitterOffset.y);
|
|
this.jitterScale.x = global::UnityEngine.Random.Range(-this.maxJitterScale.x, this.maxJitterScale.x);
|
|
this.jitterScale.y = global::UnityEngine.Random.Range(-this.maxJitterScale.y, this.maxJitterScale.y);
|
|
if (this.transform != null)
|
|
{
|
|
Vector3 vector = new Vector3(this.defaultLocalPosition.x + this.jitterOffset.x, this.defaultLocalPosition.y + this.jitterOffset.y, this.defaultLocalPosition.z);
|
|
Vector3 vector2 = new Vector3(this.defaultLocalScale.x + this.jitterScale.x, this.defaultLocalScale.y + this.jitterScale.y, this.defaultLocalScale.z);
|
|
this.transform.localScale = vector2;
|
|
this.transform.localPosition = vector;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x060267F4 RID: 157684 RVA: 0x00AB2E7C File Offset: 0x00AB107C
|
|
public void HINLGGILPFH()
|
|
{
|
|
if (this.transform != null)
|
|
{
|
|
this.defaultLocalPosition = this.transform.localPosition;
|
|
this.defaultLocalScale = this.transform.localScale;
|
|
this.savedDefaultValues = false;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060267F5 RID: 157685 RVA: 0x00AB2EB8 File Offset: 0x00AB10B8
|
|
public void DIJLNOAOFCM()
|
|
{
|
|
if (this.transform != null)
|
|
{
|
|
this.defaultLocalPosition = this.transform.localPosition;
|
|
this.defaultLocalScale = this.transform.localScale;
|
|
this.savedDefaultValues = true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060267F6 RID: 157686 RVA: 0x00AB2EF4 File Offset: 0x00AB10F4
|
|
public void BBFPJNKIDDH()
|
|
{
|
|
if (!this.savedDefaultValues)
|
|
{
|
|
this.DIJLNOAOFCM();
|
|
}
|
|
float num = 938f / (float)this.jitterFPS;
|
|
float num2 = Time.time - this.lastJitterTime;
|
|
if (num2 >= num)
|
|
{
|
|
this.lastJitterTime = Time.time;
|
|
this.jitterOffset.x = global::UnityEngine.Random.Range(-this.maxJitterOffset.x, this.maxJitterOffset.x);
|
|
this.jitterOffset.y = global::UnityEngine.Random.Range(-this.maxJitterOffset.y, this.maxJitterOffset.y);
|
|
this.jitterScale.x = global::UnityEngine.Random.Range(-this.maxJitterScale.x, this.maxJitterScale.x);
|
|
this.jitterScale.y = global::UnityEngine.Random.Range(-this.maxJitterScale.y, this.maxJitterScale.y);
|
|
if (this.transform != null)
|
|
{
|
|
Vector3 vector = new Vector3(this.defaultLocalPosition.x + this.jitterOffset.x, this.defaultLocalPosition.y + this.jitterOffset.y, this.defaultLocalPosition.z);
|
|
Vector3 vector2 = new Vector3(this.defaultLocalScale.x + this.jitterScale.x, this.defaultLocalScale.y + this.jitterScale.y, this.defaultLocalScale.z);
|
|
this.transform.localScale = vector2;
|
|
this.transform.localPosition = vector;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x060267F7 RID: 157687 RVA: 0x00AB3084 File Offset: 0x00AB1284
|
|
public void LLPHGBGCFMH()
|
|
{
|
|
if (this.transform != null)
|
|
{
|
|
this.defaultLocalPosition = this.transform.localPosition;
|
|
this.defaultLocalScale = this.transform.localScale;
|
|
this.savedDefaultValues = false;
|
|
}
|
|
}
|
|
|
|
// Token: 0x04006132 RID: 24882
|
|
public Transform transform;
|
|
|
|
// Token: 0x04006133 RID: 24883
|
|
public int jitterFPS = 6;
|
|
|
|
// Token: 0x04006134 RID: 24884
|
|
public Vector2 maxJitterOffset;
|
|
|
|
// Token: 0x04006135 RID: 24885
|
|
public Vector2 maxJitterScale;
|
|
|
|
// Token: 0x04006136 RID: 24886
|
|
private float lastJitterTime;
|
|
|
|
// Token: 0x04006137 RID: 24887
|
|
private Vector2 jitterOffset;
|
|
|
|
// Token: 0x04006138 RID: 24888
|
|
private Vector3 jitterScale;
|
|
|
|
// Token: 0x04006139 RID: 24889
|
|
private Vector3 defaultLocalPosition = Vector3.zero;
|
|
|
|
// Token: 0x0400613A RID: 24890
|
|
private Vector3 defaultLocalScale = Vector3.one;
|
|
|
|
// Token: 0x0400613B RID: 24891
|
|
private bool savedDefaultValues;
|
|
}
|
|
}
|