224 lines
8.7 KiB
C#
224 lines
8.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Cpp2IlInjected;
|
|
using UnityEngine;
|
|
|
|
namespace Obi
|
|
{
|
|
// Token: 0x02000488 RID: 1160
|
|
[Token(Token = "0x2000488")]
|
|
[ExecuteInEditMode]
|
|
[RequireComponent(typeof(ObiActor))]
|
|
public class ObiParticleRenderer : MonoBehaviour
|
|
{
|
|
// Token: 0x170002A5 RID: 677
|
|
// (get) Token: 0x06002918 RID: 10520 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x170002A5")]
|
|
public IEnumerable<Mesh> ParticleMeshes
|
|
{
|
|
[Token(Token = "0x6002918")]
|
|
[Address(RVA = "0x31E3C0", Offset = "0x31D1C0", VA = "0x18031E3C0")]
|
|
get
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
}
|
|
|
|
// Token: 0x170002A6 RID: 678
|
|
// (get) Token: 0x06002919 RID: 10521 RVA: 0x0005A4E8 File Offset: 0x000586E8
|
|
[Token(Token = "0x170002A6")]
|
|
public Material ParticleMaterial
|
|
{
|
|
[Token(Token = "0x6002919")]
|
|
[Address(RVA = "0x31E390", Offset = "0x31D190", VA = "0x18031E390")]
|
|
get
|
|
{
|
|
return this.material;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600291A RID: 10522 RVA: 0x0005A4FC File Offset: 0x000586FC
|
|
[Token(Token = "0x600291A")]
|
|
[Address(RVA = "0xD25580", Offset = "0xD24380", VA = "0x180D25580")]
|
|
public void Awake()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600291A)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void Obi.ObiParticleRenderer::Awake()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{; Block_0:; stloc:ObiActor(var_0_06, call:ObiActor(Component::GetComponent, ldloc:ObiParticleRenderer[exp:Component](this))); stfld:ObiActor(ObiParticleRenderer::actor, ldloc:ObiParticleRenderer(this), ldloc:ObiActor(var_0_06)); };
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 344
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1618
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600291B RID: 10523 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x600291B")]
|
|
[Address(RVA = "0xD25AA0", Offset = "0xD248A0", VA = "0x180D25AA0")]
|
|
public void OnEnable()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x0600291C RID: 10524 RVA: 0x0005A518 File Offset: 0x00058718
|
|
[Token(Token = "0x600291C")]
|
|
[Address(RVA = "0xD25910", Offset = "0xD24710", VA = "0x180D25910")]
|
|
public void OnDisable()
|
|
{
|
|
ObiActor obiActor = this.actor;
|
|
int num = 0;
|
|
if (obiActor != num)
|
|
{
|
|
ObiSolver solver = this.actor.solver;
|
|
int num2 = 0;
|
|
if (solver != num2)
|
|
{
|
|
ObiActor obiActor2 = this.actor;
|
|
ObiSolver solver2 = obiActor2.solver;
|
|
int renderablePositionsClients = solver2.renderablePositionsClients;
|
|
if (renderablePositionsClients > 0)
|
|
{
|
|
int num3 = renderablePositionsClients - 1;
|
|
solver2.renderablePositionsClients = num3;
|
|
ObiActor obiActor3 = this.actor;
|
|
}
|
|
ObiSolver solver3 = obiActor2.solver;
|
|
EventHandler eventHandler = new EventHandler(this.Actor_solver_OnFrameEnd);
|
|
solver3.OnFrameEnd -= eventHandler;
|
|
}
|
|
}
|
|
this.ClearMeshes();
|
|
UnityEngine.Object.DestroyImmediate(this.material);
|
|
}
|
|
|
|
// Token: 0x0600291D RID: 10525 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x600291D")]
|
|
[Address(RVA = "0xD24BD0", Offset = "0xD239D0", VA = "0x180D24BD0")]
|
|
private void Actor_solver_OnFrameEnd(object sender, EventArgs e)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x0600291E RID: 10526 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x600291E")]
|
|
[Address(RVA = "0xD25720", Offset = "0xD24520", VA = "0x180D25720")]
|
|
private void DrawParticles()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x0600291F RID: 10527 RVA: 0x0005A5C0 File Offset: 0x000587C0
|
|
[Token(Token = "0x600291F")]
|
|
[Address(RVA = "0xD25500", Offset = "0xD24300", VA = "0x180D25500")]
|
|
private void Apply(Mesh mesh)
|
|
{
|
|
mesh.Clear();
|
|
List<Vector3> list = this.vertices;
|
|
mesh.SetVertices(list);
|
|
List<Vector3> list2 = this.normals;
|
|
mesh.SetNormals(list2);
|
|
List<Color> list3 = this.colors;
|
|
mesh.SetColors(list3);
|
|
List<int> list4 = this.triangles;
|
|
int num = 0;
|
|
mesh.SetTriangles(list4, num, true);
|
|
}
|
|
|
|
// Token: 0x06002920 RID: 10528 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002920")]
|
|
[Address(RVA = "0xD255D0", Offset = "0xD243D0", VA = "0x180D255D0")]
|
|
private void ClearMeshes()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002921 RID: 10529 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002921")]
|
|
[Address(RVA = "0xD250A0", Offset = "0xD23EA0", VA = "0x180D250A0")]
|
|
private void AddParticle(int i, Vector3 position, Color color, float radius)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002922 RID: 10530 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002922")]
|
|
[Address(RVA = "0xD25CB0", Offset = "0xD24AB0", VA = "0x180D25CB0")]
|
|
public ObiParticleRenderer()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x04003265 RID: 12901
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4003265")]
|
|
public bool render;
|
|
|
|
// Token: 0x04003266 RID: 12902
|
|
[FieldOffset(Offset = "0x1C")]
|
|
[Token(Token = "0x4003266")]
|
|
public Color particleColor;
|
|
|
|
// Token: 0x04003267 RID: 12903
|
|
[FieldOffset(Offset = "0x2C")]
|
|
[Token(Token = "0x4003267")]
|
|
public float radiusScale;
|
|
|
|
// Token: 0x04003268 RID: 12904
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4003268")]
|
|
private ObiActor actor;
|
|
|
|
// Token: 0x04003269 RID: 12905
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x4003269")]
|
|
private List<Mesh> meshes;
|
|
|
|
// Token: 0x0400326A RID: 12906
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x400326A")]
|
|
private Material material;
|
|
|
|
// Token: 0x0400326B RID: 12907
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x400326B")]
|
|
private List<Vector3> vertices;
|
|
|
|
// Token: 0x0400326C RID: 12908
|
|
[FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x400326C")]
|
|
private List<Vector3> normals;
|
|
|
|
// Token: 0x0400326D RID: 12909
|
|
[FieldOffset(Offset = "0x58")]
|
|
[Token(Token = "0x400326D")]
|
|
private List<Color> colors;
|
|
|
|
// Token: 0x0400326E RID: 12910
|
|
[FieldOffset(Offset = "0x60")]
|
|
[Token(Token = "0x400326E")]
|
|
private List<int> triangles;
|
|
|
|
// Token: 0x0400326F RID: 12911
|
|
[FieldOffset(Offset = "0x68")]
|
|
[Token(Token = "0x400326F")]
|
|
private int particlesPerDrawcall;
|
|
|
|
// Token: 0x04003270 RID: 12912
|
|
[FieldOffset(Offset = "0x6C")]
|
|
[Token(Token = "0x4003270")]
|
|
private int drawcallCount;
|
|
|
|
// Token: 0x04003271 RID: 12913
|
|
[FieldOffset(Offset = "0x70")]
|
|
[Token(Token = "0x4003271")]
|
|
private Vector3[] particleOffsets;
|
|
}
|
|
}
|