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
Player.cs
Go to the documentation of this file.
1using System;
3using UnityEngine;
4
6{
7 // Token: 0x02000005 RID: 5
8 public class Player : MonoBehaviour
9 {
10 // Token: 0x17000001 RID: 1
11 // (get) Token: 0x06000012 RID: 18 RVA: 0x00002568 File Offset: 0x00000768
12 // (set) Token: 0x06000013 RID: 19 RVA: 0x0000257C File Offset: 0x0000077C
14 {
16 get
17 {
18 return this.<Actions>k__BackingField;
19 }
21 set
22 {
24 }
25 }
26
27 // Token: 0x06000014 RID: 20 RVA: 0x00002590 File Offset: 0x00000790
28 private void OnDisable()
29 {
30 PlayerActions playerActions = this.<Actions>k__BackingField;
31 if (playerActions != null)
32 {
33 playerActions.Destroy();
34 return;
35 }
36 }
37
38 // Token: 0x06000015 RID: 21 RVA: 0x000025B0 File Offset: 0x000007B0
39 private void Start()
40 {
41 Renderer component = base.GetComponent<Renderer>();
42 this.cachedRenderer = component;
43 }
44
45 // Token: 0x06000016 RID: 22 RVA: 0x000025CC File Offset: 0x000007CC
46 private void Update()
47 {
48 PlayerActions playerActions = this.<Actions>k__BackingField;
49 Material material = this.cachedRenderer.material;
50 if (playerActions != null)
51 {
54 float deltaTime = Time.deltaTime;
55 float <X>k__BackingField = this.<Actions>k__BackingField.Rotate.<X>k__BackingField;
58 float <Y>k__BackingField = this.<Actions>k__BackingField.Rotate.<Y>k__BackingField;
59 return;
60 }
61 }
62
63 // Token: 0x06000017 RID: 23 RVA: 0x00002640 File Offset: 0x00000840
65 {
66 /*
67An exception occurred when decompiling this method (06000017)
68
69ICSharpCode.Decompiler.DecompilerException: Error decompiling UnityEngine.Color MultiplayerWithBindingsExample.Player::GetColorFromInput()
70
71 ---> System.Exception: Basic block has to end with unconditional control flow.
72{
73 Block_0:
74 stloc:bool(var_0_10, call:bool(OneAxisInputControl::op_Implicit, ldfld:PlayerAction[exp:OneAxisInputControl](PlayerActions::Green, ldfld:PlayerActions(Player::<Actions>k__BackingField, ldloc:Player(this)))))
75 stloc:bool(var_1_21, call:bool(OneAxisInputControl::op_Implicit, ldfld:PlayerAction[exp:OneAxisInputControl](PlayerActions::Red, ldfld:PlayerActions(Player::<Actions>k__BackingField, ldloc:Player(this)))))
76 stloc:bool(var_2_32, call:bool(OneAxisInputControl::op_Implicit, ldfld:PlayerAction[exp:OneAxisInputControl](PlayerActions::Blue, ldfld:PlayerActions(Player::<Actions>k__BackingField, ldloc:Player(this)))))
77 stloc:bool(var_3_43, call:bool(OneAxisInputControl::op_Implicit, ldfld:PlayerAction[exp:OneAxisInputControl](PlayerActions::Yellow, ldfld:PlayerActions(Player::<Actions>k__BackingField, ldloc:Player(this)))))
78}
79
80 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
81 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
82 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
83 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
84 --- End of inner exception stack trace ---
85 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
86 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
87*/;
88 }
89
90 // Token: 0x06000018 RID: 24 RVA: 0x00002690 File Offset: 0x00000890
91 public Player()
92 {
93 }
94
95 // Token: 0x0400000B RID: 11
97 private PlayerActions <Actions>k__BackingField;
98
99 // Token: 0x0400000C RID: 12
101 }
102}
class f__AnonymousType0<< Count > j__TPar
PlayerActions< Actions > k__BackingField
Definition Player.cs:97
Component GetComponent(Type type)
Definition Component.cs:41
static float deltaTime
Definition Time.cs:14