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

◆ ProcessDPad()

void InControl.InputDevice.ProcessDPad ( ulong updateTick,
float deltaTime )
inlineprivateinherited

Definition at line 1218 of file InputDevice.cs.

1219 {
1220 InputControl control;
1221 if (this.cachedDPadLeft == null)
1222 {
1223 control = this.GetControl(InputControlType.DPadLeft);
1224 this.cachedDPadLeft = control;
1225 }
1226 if (control.enabled && control.ownerEnabled)
1227 {
1228 float rawValue = control.nextState.RawValue;
1229 }
1230 InputControl control2;
1231 if (this.cachedDPadRight == null)
1232 {
1233 control2 = this.GetControl(InputControlType.DPadRight);
1235 }
1236 bool ownerEnabled;
1237 if (control2.enabled)
1238 {
1239 ownerEnabled = control2.ownerEnabled;
1240 if (ownerEnabled)
1241 {
1242 float rawValue2 = control2.nextState.RawValue;
1243 }
1244 }
1245 if (!ownerEnabled)
1246 {
1247 }
1248 InputControl control3;
1249 if (this.cachedDPadDown == null)
1250 {
1251 control3 = this.GetControl(InputControlType.DPadDown);
1253 }
1254 if (control3.enabled && control3.ownerEnabled)
1255 {
1256 float rawValue3 = control3.nextState.RawValue;
1257 }
1258 InputControl control4;
1259 if (this.cachedDPadUp == null)
1260 {
1261 control4 = this.GetControl(InputControlType.DPadUp);
1263 }
1264 bool ownerEnabled2;
1265 if (control4.enabled)
1266 {
1267 ownerEnabled2 = control4.ownerEnabled;
1268 if (ownerEnabled2)
1269 {
1270 float rawValue4 = control4.nextState.RawValue;
1271 }
1272 }
1273 if (!ownerEnabled2)
1274 {
1275 }
1276 if (!true)
1277 {
1278 }
1279 if (!this.<RawSticks>k__BackingField)
1280 {
1281 InputControl control5;
1282 if (this.cachedDPadLeft == null)
1283 {
1284 control5 = this.GetControl(InputControlType.DPadLeft);
1286 }
1287 if (!control5.Raw)
1288 {
1289 InputControl control6;
1290 if (this.cachedDPadRight == null)
1291 {
1292 control6 = this.GetControl(InputControlType.DPadRight);
1294 }
1295 if (!control6.Raw)
1296 {
1297 InputControl control7;
1298 if (this.cachedDPadUp == null)
1299 {
1300 control7 = this.GetControl(InputControlType.DPadUp);
1302 }
1303 if (!control7.Raw)
1304 {
1305 InputControl control8;
1306 if (this.cachedDPadDown == null)
1307 {
1308 control8 = this.GetControl(InputControlType.DPadDown);
1310 }
1311 if (!control8.Raw)
1312 {
1313 InputControl control9;
1314 if (this.cachedDPadLeft == null)
1315 {
1316 control9 = this.GetControl(InputControlType.DPadLeft);
1318 }
1319 InputControl inputControl = this.cachedDPadRight;
1320 float lowerDeadZone = control9.lowerDeadZone;
1321 InputControl control10;
1322 if (inputControl == null)
1323 {
1324 control10 = this.GetControl(InputControlType.DPadRight);
1326 }
1327 InputControl inputControl2 = this.cachedDPadUp;
1328 float lowerDeadZone2 = control10.lowerDeadZone;
1329 InputControl control11;
1330 if (inputControl2 == null)
1331 {
1332 control11 = this.GetControl(InputControlType.DPadUp);
1334 }
1335 InputControl inputControl3 = this.cachedDPadDown;
1336 float lowerDeadZone3 = control11.lowerDeadZone;
1337 InputControl control12;
1338 if (inputControl3 == null)
1339 {
1340 control12 = this.GetControl(InputControlType.DPadDown);
1342 }
1343 float lowerDeadZone4 = control12.lowerDeadZone;
1344 if (control11 == null)
1345 {
1346 }
1347 InputControl control13;
1348 if (this.cachedDPadLeft == null)
1349 {
1350 control13 = this.GetControl(InputControlType.DPadLeft);
1352 }
1353 InputControl inputControl4 = this.cachedDPadRight;
1354 float upperDeadZone = control13.upperDeadZone;
1355 InputControl control14;
1356 if (inputControl4 == null)
1357 {
1358 control14 = this.GetControl(InputControlType.DPadRight);
1360 }
1361 InputControl inputControl5 = this.cachedDPadUp;
1362 float upperDeadZone2 = control14.upperDeadZone;
1363 InputControl control15;
1364 if (inputControl5 == null)
1365 {
1366 control15 = this.GetControl(InputControlType.DPadUp);
1368 }
1369 InputControl inputControl6 = this.cachedDPadDown;
1370 float upperDeadZone3 = control15.upperDeadZone;
1371 InputControl control16;
1372 if (inputControl6 == null)
1373 {
1374 control16 = this.GetControl(InputControlType.DPadDown);
1376 }
1377 float upperDeadZone4 = control16.upperDeadZone;
1378 DeadZoneFunc deadZoneFunc = this.<DPad>k__BackingField.DeadZoneFunc;
1379 IntPtr invoke_impl = deadZoneFunc.invoke_impl;
1380 IntPtr method_code = deadZoneFunc.method_code;
1381 IntPtr method = deadZoneFunc.method;
1382 }
1383 }
1384 }
1385 }
1386 }
1387 TwoAxisInputControl twoAxisInputControl = this.<DPad>k__BackingField;
1389 float num;
1390 float num2;
1391 float num3;
1392 twoAxisInputControl.UpdateWithAxes(num, num2, updateTick, num3);
1393 InputControl inputControl7 = this.cachedDPadX;
1394 if (inputControl7 != null)
1395 {
1396 inputControl7.Raw = true;
1397 return;
1398 }
1399 InputControl control17 = this.GetControl(InputControlType.DPadX);
1401 control17.Raw = true;
1402 InputControl control18;
1403 if (control17 == null)
1404 {
1405 control18 = this.GetControl(InputControlType.DPadX);
1407 }
1408 bool flag = control18.UpdateWithValue(num, updateTick, num2);
1409 control18.Commit();
1410 InputControl inputControl8 = this.cachedDPadY;
1411 if (inputControl8 != null)
1412 {
1413 inputControl8.Raw = true;
1414 return;
1415 }
1416 InputControl control19 = this.GetControl(InputControlType.DPadY);
1418 control19.Raw = true;
1419 InputControl control20;
1420 if (control19 == null)
1421 {
1422 control20 = this.GetControl(InputControlType.DPadY);
1424 }
1425 bool flag2 = control20.UpdateWithValue(num2, updateTick, num2);
1426 control20.Commit();
1427 InputControl control21;
1428 if (this.cachedDPadLeft == null)
1429 {
1430 control21 = this.GetControl(InputControlType.DPadLeft);
1432 }
1433 OneAxisInputControl <Left>k__BackingField = this.<DPad>k__BackingField.<Left>k__BackingField;
1434 if (<Left>k__BackingField.enabled && <Left>k__BackingField.ownerEnabled)
1435 {
1436 float value = <Left>k__BackingField.thisState.Value;
1437 }
1438 control21.SetValue(num2, updateTick);
1439 InputControl control22;
1440 if (this.cachedDPadRight == null)
1441 {
1442 control22 = this.GetControl(InputControlType.DPadRight);
1444 }
1445 OneAxisInputControl <Right>k__BackingField = this.<DPad>k__BackingField.<Right>k__BackingField;
1446 if (<Right>k__BackingField.enabled && <Right>k__BackingField.ownerEnabled)
1447 {
1448 float value2 = <Right>k__BackingField.thisState.Value;
1449 }
1450 control22.SetValue(num2, updateTick);
1451 InputControl control23;
1452 if (this.cachedDPadUp == null)
1453 {
1454 control23 = this.GetControl(InputControlType.DPadUp);
1456 }
1457 OneAxisInputControl <Up>k__BackingField = this.<DPad>k__BackingField.<Up>k__BackingField;
1458 if (<Up>k__BackingField.enabled && <Up>k__BackingField.ownerEnabled)
1459 {
1460 float value3 = <Up>k__BackingField.thisState.Value;
1461 }
1462 control23.SetValue(num2, updateTick);
1463 InputControl control24;
1464 if (this.cachedDPadDown == null)
1465 {
1466 control24 = this.GetControl(InputControlType.DPadDown);
1468 }
1469 OneAxisInputControl <Down>k__BackingField = this.<DPad>k__BackingField.<Down>k__BackingField;
1470 if (<Down>k__BackingField.enabled && <Down>k__BackingField.ownerEnabled)
1471 {
1472 float value4 = <Down>k__BackingField.thisState.Value;
1473 }
1474 control24.SetValue(num2, updateTick);
1475 }
class f__AnonymousType0<< Count > j__TPar
TwoAxisInputControl DPad
InputControl cachedDPadUp
InputControl cachedDPadY
string< Name > k__BackingField
InputControl GetControl(InputControlType controlType)
InputControl cachedDPadX
InputControl cachedDPadDown
InputControl cachedDPadRight
InputControl cachedDPadLeft

References InControl.InputDevice.cachedDPadDown, InControl.InputDevice.cachedDPadLeft, InControl.InputDevice.cachedDPadRight, InControl.InputDevice.cachedDPadUp, InControl.InputDevice.cachedDPadX, InControl.InputDevice.cachedDPadY, Down, InControl.InputDevice.DPad, InControl.OneAxisInputControl.enabled, InControl.InputDevice.GetControl(), j__TPar, InControl.InputDevice.k__BackingField, Left, InControl.OneAxisInputControl.lowerDeadZone, InControl.OneAxisInputControl.nextState, InControl.OneAxisInputControl.ownerEnabled, InControl.InputDevice.RawSticks, InControl.InputControlState.RawValue, Right, Up, InControl.OneAxisInputControl.upperDeadZone, and System.value.

Referenced by InControl.InputDevice.Commit().