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
TouchSwipeControl.cs
Go to the documentation of this file.
1using System;
2using UnityEngine;
3
4namespace InControl
5{
6 // Token: 0x0200004A RID: 74
8 {
9 // Token: 0x06000392 RID: 914 RVA: 0x0000BE18 File Offset: 0x0000A018
10 public override void CreateControl()
11 {
12 }
13
14 // Token: 0x06000393 RID: 915 RVA: 0x0000BE28 File Offset: 0x0000A028
15 public override void DestroyControl()
16 {
17 if (this.currentTouch != null)
18 {
19 }
20 }
21
22 // Token: 0x06000394 RID: 916 RVA: 0x0000BE40 File Offset: 0x0000A040
23 public override void ConfigureControl()
24 {
25 float xmin = this.activeArea.m_XMin;
26 float ymin = this.activeArea.m_YMin;
27 float width = this.activeArea.m_Width;
28 float height = this.activeArea.m_Height;
32 }
33
34 // Token: 0x06000395 RID: 917 RVA: 0x0000BEA0 File Offset: 0x0000A0A0
35 public override void DrawGizmos()
36 {
37 float xmin = this.worldActiveArea.m_XMin;
38 float ymin = this.worldActiveArea.m_YMin;
39 float width = this.worldActiveArea.m_Width;
40 float height = this.worldActiveArea.m_Height;
41 if (!true)
42 {
43 }
44 }
45
46 // Token: 0x06000396 RID: 918 RVA: 0x0000BEE4 File Offset: 0x0000A0E4
47 private void Update()
48 {
49 if (this.dirty)
50 {
51 }
52 }
53
54 // Token: 0x06000397 RID: 919 RVA: 0x0000BEFC File Offset: 0x0000A0FC
55 public override void SubmitControlState(ulong updateTick, float deltaTime)
56 {
57 float x = this.currentVector.x;
58 float y = this.currentVector.y;
61 bool flag = this.fireButtonTarget;
63 if (flag)
64 {
66 return;
67 }
68 bool flag2 = this.fireButtonTarget;
70 if (flag2)
71 {
73 return;
74 }
75 bool flag3 = this.fireButtonTarget;
77 if (flag3)
78 {
80 return;
81 }
82 bool flag4 = this.fireButtonTarget;
84 if (flag4)
85 {
87 return;
88 }
89 bool flag5 = this.fireButtonTarget;
91 if (flag5)
92 {
94 return;
95 }
96 if (this.fireButtonTarget)
97 {
99 if (buttonTarget11 != TouchControl.ButtonTarget.None)
100 {
101 bool flag6 = this.oneSwipePerTouch;
102 this.dirty = buttonTarget11 != TouchControl.ButtonTarget.None;
104 }
105 }
106 }
107
108 // Token: 0x06000398 RID: 920 RVA: 0x0000BFFC File Offset: 0x0000A1FC
109 public override void CommitControlState(ulong updateTick, float deltaTime)
110 {
112 base.CommitAnalog(analogTarget);
114 base.CommitButton(buttonTarget);
116 base.CommitButton(buttonTarget2);
118 base.CommitButton(buttonTarget3);
120 base.CommitButton(buttonTarget4);
122 base.CommitButton(buttonTarget5);
123 }
124
125 // Token: 0x06000399 RID: 921 RVA: 0x0000C064 File Offset: 0x0000A264
126 public override void TouchBegan(Touch touch)
127 {
128 if (this.currentTouch == null)
129 {
130 float x = touch.position.x;
131 float y = touch.position.y;
134 Vector3 vector = this.beganPosition;
135 float z = this.beganPosition.z;
138 int num = 1;
139 this.fireButtonTarget = num != 0;
140 }
141 }
142
143 // Token: 0x0600039A RID: 922 RVA: 0x0000C0E0 File Offset: 0x0000A2E0
144 public override void TouchMoved(Touch touch)
145 {
147 float x = touch.position.x;
148 float y = touch.position.y;
149 float x2 = this.lastPosition.x;
150 float y2 = this.lastPosition.y;
151 float z = this.lastPosition.z;
152 if (!true)
153 {
154 }
155 float num = this.sensitivity;
156 if (!this.oneSwipePerTouch || !this.currentVectorIsSet)
157 {
158 if (!true)
159 {
160 }
161 return;
162 }
163 if (this.fireButtonTarget)
164 {
165 float x3 = this.currentVector.x;
166 float y3 = this.currentVector.y;
170 }
171 }
172
173 // Token: 0x0600039B RID: 923 RVA: 0x0000C1A4 File Offset: 0x0000A3A4
174 public override void TouchEnded(Touch touch)
175 {
177 float x = touch.position.x;
178 float y = touch.position.y;
179 float x2 = this.beganPosition.x;
180 float y2 = this.beganPosition.y;
181 float z = this.beganPosition.z;
182 float num = this.sensitivity;
185 }
186
187 // Token: 0x0600039C RID: 924 RVA: 0x0000C21C File Offset: 0x0000A41C
189 {
190 return this.upTarget;
191 }
192
193 // Token: 0x17000120 RID: 288
194 // (get) Token: 0x0600039D RID: 925 RVA: 0x0000C248 File Offset: 0x0000A448
195 // (set) Token: 0x0600039E RID: 926 RVA: 0x0000C284 File Offset: 0x0000A484
197 {
198 get
199 {
200 /*
201An exception occurred when decompiling this method (0600039D)
202
203ICSharpCode.Decompiler.DecompilerException: Error decompiling UnityEngine.Rect InControl.TouchSwipeControl::get_ActiveArea()
204
205 ---> System.Exception: Basic block has to end with unconditional control flow.
206{
207 Block_0:
208 stloc:float32(var_0_0B, ldfld:float32(Rect::m_XMin, ldfld:Rect[exp:valuetype [UnityEngine.CoreModule]UnityEngine.Rect&](TouchSwipeControl::activeArea, ldloc:TouchSwipeControl(this))))
209 stloc:float32(var_1_17, ldfld:float32(Rect::m_YMin, ldfld:Rect[exp:valuetype [UnityEngine.CoreModule]UnityEngine.Rect&](TouchSwipeControl::activeArea, ldloc:TouchSwipeControl(this))))
210 stloc:float32(var_2_23, ldfld:float32(Rect::m_Width, ldfld:Rect[exp:valuetype [UnityEngine.CoreModule]UnityEngine.Rect&](TouchSwipeControl::activeArea, ldloc:TouchSwipeControl(this))))
211 stloc:float32(var_3_2F, ldfld:float32(Rect::m_Height, ldfld:Rect[exp:valuetype [UnityEngine.CoreModule]UnityEngine.Rect&](TouchSwipeControl::activeArea, ldloc:TouchSwipeControl(this))))
212}
213
214 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
215 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
216 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
217 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
218 --- End of inner exception stack trace ---
219 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
220 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
221*/;
222 }
223 set
224 {
225 float xmin = this.activeArea.m_XMin;
226 float ymin = this.activeArea.m_YMin;
227 float width = this.activeArea.m_Width;
228 float height = this.activeArea.m_Height;
229 this.dirty = true;
230 }
231 }
232
233 // Token: 0x17000121 RID: 289
234 // (get) Token: 0x0600039F RID: 927 RVA: 0x0000C2CC File Offset: 0x0000A4CC
235 // (set) Token: 0x060003A0 RID: 928 RVA: 0x0000C2E0 File Offset: 0x0000A4E0
237 {
238 get
239 {
240 return this.areaUnitType;
241 }
242 set
243 {
246 this.dirty = true;
247 }
248 }
249
250 // Token: 0x060003A1 RID: 929 RVA: 0x0000C304 File Offset: 0x0000A504
252 {
253 }
254
255 // Token: 0x0400031F RID: 799
256 [Header("Position")]
259
260 // Token: 0x04000320 RID: 800
263
264 // Token: 0x04000321 RID: 801
265 [Header("Options")]
266 [Range(0f, 1f)]
267 public float sensitivity = (float)52429;
268
269 // Token: 0x04000322 RID: 802
270 public bool oneSwipePerTouch;
271
272 // Token: 0x04000323 RID: 803
273 [Header("Analog Target")]
275
276 // Token: 0x04000324 RID: 804
278
279 // Token: 0x04000325 RID: 805
280 [Header("Button Targets")]
282
283 // Token: 0x04000326 RID: 806
285
286 // Token: 0x04000327 RID: 807
288
289 // Token: 0x04000328 RID: 808
291
292 // Token: 0x04000329 RID: 809
294
295 // Token: 0x0400032A RID: 810
297
298 // Token: 0x0400032B RID: 811
300
301 // Token: 0x0400032C RID: 812
302 private bool currentVectorIsSet;
303
304 // Token: 0x0400032D RID: 813
306
307 // Token: 0x0400032E RID: 814
309
310 // Token: 0x0400032F RID: 815
312
313 // Token: 0x04000330 RID: 816
314 private bool fireButtonTarget;
315
316 // Token: 0x04000331 RID: 817
318
319 // Token: 0x04000332 RID: 818
321
322 // Token: 0x04000333 RID: 819
323 private bool dirty;
324 }
325}
class f__AnonymousType0<< Count > j__TPar
void CommitAnalog(TouchControl.AnalogTarget target)
void CommitButton(TouchControl.ButtonTarget target)
override void SubmitControlState(ulong updateTick, float deltaTime)
TouchControl.ButtonTarget tapTarget
TouchControl.ButtonTarget nextButtonTarget
override void TouchEnded(Touch touch)
TouchControl.ButtonTarget leftTarget
override void CommitControlState(ulong updateTick, float deltaTime)
TouchControl.ButtonTarget upTarget
TouchControl.ButtonTarget lastButtonTarget
override void TouchBegan(Touch touch)
override void TouchMoved(Touch touch)
TouchControl.SnapAngles snapAngles
TouchControl.ButtonTarget GetButtonTargetForVector(Vector2 vector)
TouchControl.ButtonTarget rightTarget
TouchControl.AnalogTarget target
TouchControl.ButtonTarget downTarget
Vector2 position
Definition Touch.cs:175
float m_XMin
Definition Rect.cs:522
float m_Height
Definition Rect.cs:534
float m_YMin
Definition Rect.cs:526
float m_Width
Definition Rect.cs:530