terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
PlayerManager.cs
Go to the documentation of this file.
1using System;
4using InControl;
5using UnityEngine;
6
8{
9 // Token: 0x02000009 RID: 9
11 {
12 // Token: 0x0600002F RID: 47 RVA: 0x00002AFC File Offset: 0x00000CFC
13 private void Start()
14 {
15 if (!true)
16 {
17 }
18 }
19
20 // Token: 0x06000030 RID: 48 RVA: 0x00002B0C File Offset: 0x00000D0C
21 private void Update()
22 {
23 if (!true)
24 {
25 }
27 bool flag = this.ThereIsNoPlayerUsingDevice(activeDevice);
28 Player player = this.CreatePlayer(activeDevice);
29 }
30
31 // Token: 0x06000031 RID: 49 RVA: 0x00002B38 File Offset: 0x00000D38
32 private bool JoinButtonWasPressedOnDevice(InputDevice inputDevice)
33 {
34 bool wasPressed = inputDevice.Action1.WasPressed;
35 bool wasPressed2 = inputDevice.Action2.WasPressed;
36 bool wasPressed3 = inputDevice.Action3.WasPressed;
37 return true;
38 }
39
40 // Token: 0x06000032 RID: 50 RVA: 0x00002B78 File Offset: 0x00000D78
42 {
43 /*
44An exception occurred when decompiling this method (06000032)
45
46ICSharpCode.Decompiler.DecompilerException: Error decompiling MultiplayerBasicExample.Player MultiplayerBasicExample.PlayerManager::FindPlayerUsingDevice(InControl.InputDevice)
47
48 ---> System.Exception: Basic block has to end with unconditional control flow.
49{
50 Block_0:
51 stloc:class [mscorlib]System.Collections.Generic.List`1<class MultiplayerBasicExample.Player>(var_0_06, ldfld:class [mscorlib]System.Collections.Generic.List`1<class MultiplayerBasicExample.Player>(PlayerManager::players, ldloc:PlayerManager(this)))
52 stloc:int32(var_1_0D, ldfld:int32(List`1::_size, ldloc:class [mscorlib]System.Collections.Generic.List`1<class MultiplayerBasicExample.Player>[exp:List`1](var_0_06)))
53 stloc:int32(var_2_14, ldfld:int32(List`1::_size, ldloc:class [mscorlib]System.Collections.Generic.List`1<class MultiplayerBasicExample.Player>[exp:List`1](var_0_06)))
54 stloc:int32(var_4_22, ldfld:int32(List`1::_size, ldfld:class [mscorlib]System.Collections.Generic.List`1<class MultiplayerBasicExample.Player>[exp:List`1](PlayerManager::players, ldloc:PlayerManager(this))))
55}
56
57 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
58 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 355
59 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
60 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
61 --- End of inner exception stack trace ---
62 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
63 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 1683
64*/;
65 }
66
67 // Token: 0x06000033 RID: 51 RVA: 0x00002BAC File Offset: 0x00000DAC
68 private bool ThereIsNoPlayerUsingDevice(InputDevice inputDevice)
69 {
70 Player player = this.FindPlayerUsingDevice(inputDevice);
71 bool flag;
72 return flag;
73 }
74
75 // Token: 0x06000034 RID: 52 RVA: 0x00002BC4 File Offset: 0x00000DC4
76 private void OnDeviceDetached(InputDevice inputDevice)
77 {
78 Player player = this.FindPlayerUsingDevice(inputDevice);
79 this.RemovePlayer(player);
80 }
81
82 // Token: 0x06000035 RID: 53 RVA: 0x00002295 File Offset: 0x00000495
83 private Player CreatePlayer(InputDevice inputDevice)
84 {
85 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
86 }
87
88 // Token: 0x06000036 RID: 54 RVA: 0x00002BE4 File Offset: 0x00000DE4
89 private void RemovePlayer(Player player)
90 {
92 Vector3 position = player.transform.position;
94 global::UnityEngine.Object.Destroy(player.gameObject);
95 }
96
97 // Token: 0x06000037 RID: 55 RVA: 0x00002C18 File Offset: 0x00000E18
98 private void OnGUI()
99 {
100 int size = this.players._size;
101 string text2;
102 string text3;
103 string text = "Active players: " + text2 + "/" + text3;
104 if (16896 == 0)
105 {
106 }
107 int size2 = this.players._size;
108 if (16896 == 0)
109 {
110 }
111 }
112
113 // Token: 0x06000038 RID: 56 RVA: 0x00002C60 File Offset: 0x00000E60
115 {
116 }
117
118 // Token: 0x0400001E RID: 30
120
121 // Token: 0x0400001F RID: 31
122 private const int maxPlayers = 4;
123
124 // Token: 0x04000020 RID: 32
126
127 // Token: 0x04000021 RID: 33
129 }
130}
class f__AnonymousType0<< Count > j__TPar
static InputDevice ActiveDevice
bool JoinButtonWasPressedOnDevice(InputDevice inputDevice)
void OnDeviceDetached(InputDevice inputDevice)
bool ThereIsNoPlayerUsingDevice(InputDevice inputDevice)
Player FindPlayerUsingDevice(InputDevice inputDevice)
Player CreatePlayer(InputDevice inputDevice)
GameObject gameObject
Definition Component.cs:31