254 lines
11 KiB
C#
254 lines
11 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
using RecRoom.Core;
|
|
using UnityEngine;
|
|
|
|
namespace RecRoom.Activities.Bowling
|
|
{
|
|
// Token: 0x02002762 RID: 10082
|
|
[Token(Token = "0x2002762")]
|
|
[StructLayout(3)]
|
|
public class BowlingBall : Ball
|
|
{
|
|
// Token: 0x0601199D RID: 72093 RVA: 0x00431DF0 File Offset: 0x0042FFF0
|
|
[Token(Token = "0x601199D")]
|
|
[Address(RVA = "0x10F76E0", Offset = "0x10F60E0", VA = "0x1810F76E0", Slot = "13")]
|
|
protected override void Awake()
|
|
{
|
|
base.Awake();
|
|
SphereCollider componentInChildren = base.GetComponentInChildren<SphereCollider>();
|
|
this.GLPOLGOBLAA = componentInChildren;
|
|
float dynamicFriction = componentInChildren.material.dynamicFriction;
|
|
Tool <MBFGOCOFHHM>k__BackingField = this.<MBFGOCOFHHM>k__BackingField;
|
|
this.MGOCCEJMMNF = dynamicFriction;
|
|
RigidbodyEx rigidbodyEx = <MBFGOCOFHHM>k__BackingField.rigidbodyEx;
|
|
Vector3 vector;
|
|
float z = vector.z;
|
|
Vector3 vector2;
|
|
float z2 = vector2.z;
|
|
Rigidbody unityRigidbody = this.<MBFGOCOFHHM>k__BackingField.rigidbodyEx.unityRigidbody;
|
|
float maxDepenetrationVelocity = this.MaxDepenetrationVelocity;
|
|
unityRigidbody.maxDepenetrationVelocity = maxDepenetrationVelocity;
|
|
Tool <MBFGOCOFHHM>k__BackingField2 = this.<MBFGOCOFHHM>k__BackingField;
|
|
Tool.OGLAJAFKBMN oglajafkbmn = new Tool.OGLAJAFKBMN(this.LPLIIBBAAOI);
|
|
<MBFGOCOFHHM>k__BackingField2.AddCustomPickupCondition(oglajafkbmn);
|
|
Tool <MBFGOCOFHHM>k__BackingField3 = this.<MBFGOCOFHHM>k__BackingField;
|
|
ActionEvent<Tool, Vector3, Quaternion, Vector3, bool> postResetEvent = <MBFGOCOFHHM>k__BackingField3.PostResetEvent;
|
|
Action<Tool, Vector3, Quaternion, Vector3, bool> action = new Action(this.APBEFBBOMDJ);
|
|
ActionEvent<Tool, Vector3, Quaternion, Vector3, bool> actionEvent = postResetEvent + action;
|
|
<MBFGOCOFHHM>k__BackingField3.PostResetEvent = actionEvent;
|
|
BGLEMLAJOAN bglemlajoan = new BGLEMLAJOAN(this.<MBFGOCOFHHM>k__BackingField);
|
|
this.PMCDIJOGEIM = bglemlajoan;
|
|
}
|
|
|
|
// Token: 0x0601199E RID: 72094 RVA: 0x00431ED4 File Offset: 0x004300D4
|
|
[Token(Token = "0x601199E")]
|
|
[Address(RVA = "0x10F76B0", Offset = "0x10F60B0", VA = "0x1810F76B0")]
|
|
private void APBEFBBOMDJ(Tool NBHJPDBHDHB, Vector3 BNMOCBJEEPN, Quaternion LPHCCEOHNIN, Vector3 GMMJHABHDHE, bool ACPOOMGHPKJ)
|
|
{
|
|
NBHJPDBHDHB.rigidbodyEx.WakeUp();
|
|
}
|
|
|
|
// Token: 0x0601199F RID: 72095 RVA: 0x00431EF4 File Offset: 0x004300F4
|
|
[Token(Token = "0x601199F")]
|
|
[Address(RVA = "0x10F7A10", Offset = "0x10F6410", VA = "0x1810F7A10")]
|
|
private bool LPLIIBBAAOI(Tool NBHJPDBHDHB, Player NHCEBNBEEBE, Vector3 JEDLNAEEMEN, bool GEJJBENPHJG)
|
|
{
|
|
Player owner = NBHJPDBHDHB.BHNPNHMILIF;
|
|
if (NHCEBNBEEBE == owner)
|
|
{
|
|
return true;
|
|
}
|
|
BGLEMLAJOAN pmcdijogeim = this.PMCDIJOGEIM;
|
|
if (pmcdijogeim == 0)
|
|
{
|
|
}
|
|
return !pmcdijogeim.LFGCFEBCOEP;
|
|
}
|
|
|
|
// Token: 0x060119A0 RID: 72096 RVA: 0x00431F30 File Offset: 0x00430130
|
|
[Token(Token = "0x60119A0")]
|
|
[Address(RVA = "0x10F7F10", Offset = "0x10F6910", VA = "0x1810F7F10")]
|
|
public void Start()
|
|
{
|
|
Tool <MBFGOCOFHHM>k__BackingField = this.<MBFGOCOFHHM>k__BackingField;
|
|
int num = 0;
|
|
if (<MBFGOCOFHHM>k__BackingField != num)
|
|
{
|
|
Tool <MBFGOCOFHHM>k__BackingField2 = this.<MBFGOCOFHHM>k__BackingField;
|
|
ActionEvent<Tool> postReleaseEvent = <MBFGOCOFHHM>k__BackingField2.PostReleaseEvent;
|
|
Action<Tool> action = new Action(this.OGHAJAIGNJC);
|
|
ActionEvent<Tool> actionEvent = postReleaseEvent + action;
|
|
<MBFGOCOFHHM>k__BackingField2.PostReleaseEvent = actionEvent;
|
|
}
|
|
RecRoomAudioClip recRoomAudioClip = this.rumble;
|
|
Transform transform = base.transform;
|
|
int num2 = 0;
|
|
int num3 = 0;
|
|
SFXAudioSource sfxaudioSource = AudioManager.StartLooping3DSFX(recRoomAudioClip, transform, num3, num2);
|
|
this.HIIIDBLPEAL = sfxaudioSource;
|
|
AudioSource audioSource = sfxaudioSource._audioSource;
|
|
int num4 = 0;
|
|
audioSource.volume = (float)num4;
|
|
Action<float> action2 = new Action(this.GAJIJLPDHNI);
|
|
IDisposable disposable = ScheduledUpdateMonoBehaviourExtensions.Update10hz(this, action2);
|
|
}
|
|
|
|
// Token: 0x060119A1 RID: 72097 RVA: 0x00431FE0 File Offset: 0x004301E0
|
|
[Token(Token = "0x60119A1")]
|
|
[Address(RVA = "0x10F7AE0", Offset = "0x10F64E0", VA = "0x1810F7AE0")]
|
|
private void OGHAJAIGNJC(Tool NBHJPDBHDHB)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060119A1)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void RecRoom.Activities.Bowling.BowlingBall::OGHAJAIGNJC(Tool)
|
|
|
|
---> System.ArgumentOutOfRangeException: length ('-1') must be a non-negative value. (Parameter 'length')
|
|
Actual value was -1.
|
|
at System.ArgumentOutOfRangeException.ThrowNegative[T](T value, String paramName)
|
|
at System.Array.CopyImpl(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
|
|
at System.Array.Copy(Array sourceArray, Array destinationArray, Int32 length)
|
|
at ICSharpCode.Decompiler.ILAst.ILAstBuilder.StackAnalysis(MethodDef methodDef) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstBuilder.cs:line 327
|
|
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 117
|
|
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 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x060119A2 RID: 72098 RVA: 0x00432058 File Offset: 0x00430258
|
|
[Token(Token = "0x60119A2")]
|
|
[Address(RVA = "0x10F7920", Offset = "0x10F6320", VA = "0x1810F7920")]
|
|
private void GAJIJLPDHNI(float POGAEJIEPIM)
|
|
{
|
|
SFXAudioSource hiiidblpeal = this.HIIIDBLPEAL;
|
|
if (!this.NMKBFJBJFAP)
|
|
{
|
|
AudioSource audioSource = hiiidblpeal._audioSource;
|
|
int num = 0;
|
|
audioSource.volume = (float)num;
|
|
return;
|
|
}
|
|
AudioSource audioSource2 = hiiidblpeal._audioSource;
|
|
Tool <MBFGOCOFHHM>k__BackingField = this.<MBFGOCOFHHM>k__BackingField;
|
|
AnimationCurve animationCurve = this.rumbleVolumeBySpeedSquared;
|
|
RigidbodyEx rigidbodyEx = <MBFGOCOFHHM>k__BackingField.rigidbodyEx;
|
|
Vector3 vector;
|
|
float z = vector.z;
|
|
float num2 = animationCurve.Evaluate(POGAEJIEPIM);
|
|
audioSource2.volume = POGAEJIEPIM;
|
|
this.NMKBFJBJFAP = false;
|
|
}
|
|
|
|
// Token: 0x060119A3 RID: 72099 RVA: 0x004320D4 File Offset: 0x004302D4
|
|
[Token(Token = "0x60119A3")]
|
|
[Address(RVA = "0x10F7CA0", Offset = "0x10F66A0", VA = "0x1810F7CA0")]
|
|
private void OnCollisionStay(Collision GBJHLKOJGPB)
|
|
{
|
|
SphereCollider glpolgoblaa = this.GLPOLGOBLAA;
|
|
this.NMKBFJBJFAP = true;
|
|
PhysicMaterial material = glpolgoblaa.material;
|
|
float dynamicFriction = this.GLPOLGOBLAA.material.dynamicFriction;
|
|
float num = this.MGOCCEJMMNF;
|
|
float num2 = Time.deltaTime;
|
|
float lerpFrictionSpeed = this.LerpFrictionSpeed;
|
|
num2 = dynamicFriction;
|
|
num = Mathf.Lerp(num2, num, lerpFrictionSpeed);
|
|
material.dynamicFriction = num;
|
|
}
|
|
|
|
// Token: 0x060119A4 RID: 72100 RVA: 0x0043213C File Offset: 0x0043033C
|
|
[Token(Token = "0x60119A4")]
|
|
[Address(RVA = "0x10F7DB0", Offset = "0x10F67B0", VA = "0x1810F7DB0", Slot = "14")]
|
|
protected override void OnDestroy()
|
|
{
|
|
base.OnDestroy();
|
|
if (this.HIIIDBLPEAL)
|
|
{
|
|
AudioManager.StopLoopingSFX(this.HIIIDBLPEAL);
|
|
}
|
|
Tool <MBFGOCOFHHM>k__BackingField = this.<MBFGOCOFHHM>k__BackingField;
|
|
Tool.OGLAJAFKBMN oglajafkbmn = new Tool.OGLAJAFKBMN(this.LPLIIBBAAOI);
|
|
<MBFGOCOFHHM>k__BackingField.RemoveCustomPickupCondition(oglajafkbmn);
|
|
Tool <MBFGOCOFHHM>k__BackingField2 = this.<MBFGOCOFHHM>k__BackingField;
|
|
ActionEvent<Tool, Vector3, Quaternion, Vector3, bool> postResetEvent = <MBFGOCOFHHM>k__BackingField2.PostResetEvent;
|
|
Action<Tool, Vector3, Quaternion, Vector3, bool> action = new Action(this.APBEFBBOMDJ);
|
|
ActionEvent<Tool, Vector3, Quaternion, Vector3, bool> actionEvent = postResetEvent - action;
|
|
<MBFGOCOFHHM>k__BackingField2.PostResetEvent = actionEvent;
|
|
this.PMCDIJOGEIM.Dispose();
|
|
}
|
|
|
|
// Token: 0x060119A5 RID: 72101 RVA: 0x004321C4 File Offset: 0x004303C4
|
|
[Token(Token = "0x60119A5")]
|
|
[Address(RVA = "0x10F8080", Offset = "0x10F6A80", VA = "0x1810F8080")]
|
|
public BowlingBall()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0400BC87 RID: 48263
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x400BC87")]
|
|
public float AngularVelocityThrowMultiplier;
|
|
|
|
// Token: 0x0400BC88 RID: 48264
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x4C")]
|
|
[Token(Token = "0x400BC88")]
|
|
public float LerpFrictionSpeed;
|
|
|
|
// Token: 0x0400BC89 RID: 48265
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x400BC89")]
|
|
public float InertiaMultiplier = 1.5f;
|
|
|
|
// Token: 0x0400BC8A RID: 48266
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x54")]
|
|
[Token(Token = "0x400BC8A")]
|
|
public float YUpVelocityScalar = 0.5f;
|
|
|
|
// Token: 0x0400BC8B RID: 48267
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
|
|
[Token(Token = "0x400BC8B")]
|
|
public float MaxDepenetrationVelocity = 1f;
|
|
|
|
// Token: 0x0400BC8C RID: 48268
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
|
[Token(Token = "0x400BC8C")]
|
|
[SerializeField]
|
|
private AnimationCurve rumbleVolumeBySpeedSquared;
|
|
|
|
// Token: 0x0400BC8D RID: 48269
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x68")]
|
|
[Token(Token = "0x400BC8D")]
|
|
[SerializeField]
|
|
private RecRoomAudioClip rumble;
|
|
|
|
// Token: 0x0400BC8E RID: 48270
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
|
[Token(Token = "0x400BC8E")]
|
|
private SFXAudioSource HIIIDBLPEAL;
|
|
|
|
// Token: 0x0400BC8F RID: 48271
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x78")]
|
|
[Token(Token = "0x400BC8F")]
|
|
private float MGOCCEJMMNF;
|
|
|
|
// Token: 0x0400BC90 RID: 48272
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x7C")]
|
|
[Token(Token = "0x400BC90")]
|
|
private bool NMKBFJBJFAP;
|
|
|
|
// Token: 0x0400BC91 RID: 48273
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
|
|
[Token(Token = "0x400BC91")]
|
|
private SphereCollider GLPOLGOBLAA;
|
|
|
|
// Token: 0x0400BC92 RID: 48274
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x88")]
|
|
[Token(Token = "0x400BC92")]
|
|
private BGLEMLAJOAN PMCDIJOGEIM;
|
|
}
|
|
}
|