Files
NobetaSource/Cpp2IL/Assembly-CSharp/DigitalRuby/LightningBolt/LightningBoltScript.cs
2023-09-06 22:09:22 +02:00

252 lines
8.3 KiB
C#

using System;
using System.Collections.Generic;
using Cpp2IlInjected;
using UnityEngine;
namespace DigitalRuby.LightningBolt
{
// Token: 0x02000597 RID: 1431
[Token(Token = "0x2000597")]
[RequireComponent(typeof(LineRenderer))]
public class LightningBoltScript : MonoBehaviour
{
// Token: 0x06002EBF RID: 11967 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002EBF")]
[Address(RVA = "0x417000", Offset = "0x415800", VA = "0x180417000")]
private void GetPerpendicularVector(ref Vector3 directionNormalized, out Vector3 side)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002EC0 RID: 11968 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002EC0")]
[Address(RVA = "0x416A90", Offset = "0x415290", VA = "0x180416A90")]
private void GenerateLightningBolt(Vector3 start, Vector3 end, int generation, int totalGenerations, float offsetAmount)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002EC1 RID: 11969 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002EC1")]
[Address(RVA = "0x417150", Offset = "0x415950", VA = "0x180417150")]
public void RandomVector(ref Vector3 start, ref Vector3 end, float offsetAmount, out Vector3 result)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002EC2 RID: 11970 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002EC2")]
[Address(RVA = "0x417520", Offset = "0x415D20", VA = "0x180417520")]
private void SelectOffsetFromAnimationMode()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002EC3 RID: 11971 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002EC3")]
[Address(RVA = "0x417C20", Offset = "0x416420", VA = "0x180417C20")]
private void UpdateLineRenderer()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002EC4 RID: 11972 RVA: 0x000635CC File Offset: 0x000617CC
[Token(Token = "0x6002EC4")]
[Address(RVA = "0x417740", Offset = "0x415F40", VA = "0x180417740")]
private void Start()
{
Camera main = Camera.main;
int num = 0;
if (!(main != num))
{
}
bool flag = Camera.main.orthographic;
this.orthographic = flag;
LineRenderer component = base.GetComponent<LineRenderer>();
this.lineRenderer = component;
LineRenderer lineRenderer = this.lineRenderer;
int num2 = 0;
lineRenderer.SetVertexCount(num2);
this.UpdateFromMaterialChange();
}
// Token: 0x06002EC5 RID: 11973 RVA: 0x00063634 File Offset: 0x00061834
[Token(Token = "0x6002EC5")]
[Address(RVA = "0x417E40", Offset = "0x416640", VA = "0x180417E40")]
private void Update()
{
Camera main = Camera.main;
int num = 0;
if (!(main != num))
{
}
bool flag = Camera.main.orthographic;
this.orthographic = flag;
if (!this.ManualMode)
{
this.Trigger();
}
LineRenderer lineRenderer = this.lineRenderer;
float duration = this.Duration;
this.timer = duration;
int num2 = 0;
lineRenderer.SetVertexCount(num2);
float num3 = this.timer;
float deltaTime = Time.deltaTime;
this.timer = num3;
}
// Token: 0x06002EC6 RID: 11974 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002EC6")]
[Address(RVA = "0x417820", Offset = "0x416020", VA = "0x180417820")]
public void Trigger()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002EC7 RID: 11975 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002EC7")]
[Address(RVA = "0x417AA0", Offset = "0x4162A0", VA = "0x180417AA0")]
public void UpdateFromMaterialChange()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002EC8 RID: 11976 RVA: 0x000636C4 File Offset: 0x000618C4
[Token(Token = "0x6002EC8")]
[Address(RVA = "0x417F30", Offset = "0x416730", VA = "0x180417F30")]
public LightningBoltScript()
{
System.Random random = new System.Random();
this.RandomGenerator = random;
List<KeyValuePair<Vector3, Vector3>> list = new List();
this.segments = list;
this.animationPingPongDirection = (int)((ulong)1L);
base..ctor();
}
// Token: 0x040037A6 RID: 14246
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x40037A6")]
[Tooltip("The game object where the lightning will emit from. If null, StartPosition is used.")]
public GameObject StartObject;
// Token: 0x040037A7 RID: 14247
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x40037A7")]
[Tooltip("The start position where the lightning will emit from. This is in world space if StartObject is null, otherwise this is offset from StartObject position.")]
public Vector3 StartPosition;
// Token: 0x040037A8 RID: 14248
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x40037A8")]
[Tooltip("The game object where the lightning will end at. If null, EndPosition is used.")]
public GameObject EndObject;
// Token: 0x040037A9 RID: 14249
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x40037A9")]
[Tooltip("The end position where the lightning will end at. This is in world space if EndObject is null, otherwise this is offset from EndObject position.")]
public Vector3 EndPosition;
// Token: 0x040037AA RID: 14250
[FieldOffset(Offset = "0x44")]
[Token(Token = "0x40037AA")]
[Tooltip("How manu generations? Higher numbers create more line segments.")]
[Range(0f, 8f)]
public int Generations = (int)((ulong)6L);
// Token: 0x040037AB RID: 14251
[FieldOffset(Offset = "0x48")]
[Token(Token = "0x40037AB")]
[Range(0.01f, 1f)]
[Tooltip("How long each bolt should last before creating a new bolt. In ManualMode, the bolt will simply disappear after this amount of seconds.")]
public float Duration = 0.05f;
// Token: 0x040037AC RID: 14252
[FieldOffset(Offset = "0x4C")]
[Token(Token = "0x40037AC")]
private float timer;
// Token: 0x040037AD RID: 14253
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x40037AD")]
[Range(0f, 1f)]
[Tooltip("How chaotic should the lightning be? (0-1)")]
public float ChaosFactor = 0.15f;
// Token: 0x040037AE RID: 14254
[FieldOffset(Offset = "0x54")]
[Token(Token = "0x40037AE")]
[Tooltip("In manual mode, the trigger method must be called to create a bolt")]
public bool ManualMode;
// Token: 0x040037AF RID: 14255
[FieldOffset(Offset = "0x58")]
[Token(Token = "0x40037AF")]
[Range(1f, 64f)]
[Tooltip("The number of rows in the texture. Used for animation.")]
public int Rows = (int)((ulong)1L);
// Token: 0x040037B0 RID: 14256
[FieldOffset(Offset = "0x5C")]
[Token(Token = "0x40037B0")]
[Range(1f, 64f)]
[Tooltip("The number of columns in the texture. Used for animation.")]
public int Columns = (int)((ulong)1L);
// Token: 0x040037B1 RID: 14257
[FieldOffset(Offset = "0x60")]
[Token(Token = "0x40037B1")]
[Tooltip("The animation mode for the lightning")]
public LightningBoltAnimationMode AnimationMode = (LightningBoltAnimationMode)((ulong)3L);
// Token: 0x040037B2 RID: 14258
[FieldOffset(Offset = "0x68")]
[Token(Token = "0x40037B2")]
[HideInInspector]
[NonSerialized]
public System.Random RandomGenerator;
// Token: 0x040037B3 RID: 14259
[FieldOffset(Offset = "0x70")]
[Token(Token = "0x40037B3")]
private LineRenderer lineRenderer;
// Token: 0x040037B4 RID: 14260
[FieldOffset(Offset = "0x78")]
[Token(Token = "0x40037B4")]
private List<KeyValuePair<Vector3, Vector3>> segments;
// Token: 0x040037B5 RID: 14261
[FieldOffset(Offset = "0x80")]
[Token(Token = "0x40037B5")]
private int startIndex;
// Token: 0x040037B6 RID: 14262
[FieldOffset(Offset = "0x84")]
[Token(Token = "0x40037B6")]
private Vector2 size;
// Token: 0x040037B7 RID: 14263
[FieldOffset(Offset = "0x90")]
[Token(Token = "0x40037B7")]
private Vector2[] offsets;
// Token: 0x040037B8 RID: 14264
[FieldOffset(Offset = "0x98")]
[Token(Token = "0x40037B8")]
private int animationOffsetIndex;
// Token: 0x040037B9 RID: 14265
[FieldOffset(Offset = "0x9C")]
[Token(Token = "0x40037B9")]
private int animationPingPongDirection;
// Token: 0x040037BA RID: 14266
[FieldOffset(Offset = "0xA0")]
[Token(Token = "0x40037BA")]
private bool orthographic;
}
}