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
BindingsExample.cs
Go to the documentation of this file.
1using System;
3using InControl;
4using UnityEngine;
5
7{
8 // Token: 0x0200000D RID: 13
10 {
11 // Token: 0x06000042 RID: 66 RVA: 0x00002E9C File Offset: 0x0000109C
12 private void OnEnable()
13 {
15 this.playerActions = playerActions;
16 this.LoadBindings();
17 }
18
19 // Token: 0x06000043 RID: 67 RVA: 0x00002EBC File Offset: 0x000010BC
20 private void OnDisable()
21 {
22 this.playerActions.Destroy();
23 }
24
25 // Token: 0x06000044 RID: 68 RVA: 0x00002ED4 File Offset: 0x000010D4
26 private void Start()
27 {
28 Renderer component = base.GetComponent<Renderer>();
29 this.cachedRenderer = component;
30 }
31
32 // Token: 0x06000045 RID: 69 RVA: 0x00002EF0 File Offset: 0x000010F0
33 private void Update()
34 {
35 Transform transform = base.transform;
36 float deltaTime = Time.deltaTime;
37 float <X>k__BackingField = this.playerActions.Move.<X>k__BackingField;
40 float <Y>k__BackingField = this.playerActions.Move.<Y>k__BackingField;
41 bool isPressed = this.playerActions.Fire.IsPressed;
42 bool isPressed2 = this.playerActions.Jump.IsPressed;
43 Material material = this.cachedRenderer.material;
44 }
45
46 // Token: 0x06000046 RID: 70 RVA: 0x00002F74 File Offset: 0x00001174
47 private void SaveBindings()
48 {
49 string text = this.playerActions.Save();
51 PlayerPrefs.SetString("Bindings", text);
52 }
53
54 // Token: 0x06000047 RID: 71 RVA: 0x00002FA0 File Offset: 0x000011A0
55 private void LoadBindings()
56 {
57 bool flag = PlayerPrefs.HasKey("Bindings");
58 string @string = PlayerPrefs.GetString("Bindings");
59 PlayerActions playerActions = this.playerActions;
60 this.saveData = @string;
61 playerActions.Load(@string);
62 }
63
64 // Token: 0x06000048 RID: 72 RVA: 0x00002FDC File Offset: 0x000011DC
65 private void OnApplicationQuit()
66 {
68 }
69
70 // Token: 0x06000049 RID: 73 RVA: 0x00002FF0 File Offset: 0x000011F0
71 private void OnGUI()
72 {
73 PlayerActions playerActions = this.playerActions;
75 string text2;
76 string text = "Last Input Type: " + text2;
77 if (playerActions == null)
78 {
79 }
81 string text4;
82 string text3 = "Last Device Class: " + text4;
83 PlayerActions playerActions2 = this.playerActions;
85 string text6;
86 string text5 = "Last Device Style: " + text6;
87 ReadOnlyCollection<PlayerAction> <Actions>k__BackingField = this.playerActions.<Actions>k__BackingField;
88 string text8;
89 string text9;
90 string text7 = text8 + " = " + text9;
91 if (17402 == 0)
92 {
93 }
94 string text10 = text7 + ": " + text7;
95 if (playerActions2 == null)
96 {
97 }
98 }
99
100 // Token: 0x0600004A RID: 74 RVA: 0x000030B0 File Offset: 0x000012B0
102 {
103 }
104
105 // Token: 0x04000029 RID: 41
107
108 // Token: 0x0400002A RID: 42
110
111 // Token: 0x0400002B RID: 43
112 private string saveData;
113 }
114}
class f__AnonymousType0<< Count > j__TPar
static PlayerActions CreateWithDefaultBindings()
BindingSourceType LastInputType
InputDeviceClass LastDeviceClass
InputDeviceStyle LastDeviceStyle
Component GetComponent(Type type)
Definition Component.cs:41
static void SetString(string key, string value)
static bool HasKey(string key)
static string GetString(string key, string defaultValue)
static float deltaTime
Definition Time.cs:14