Exemple #1
0
        private static void SetOnOfKey()
        {
            var configValue = OnOffKey.Value;

            if (Enum.TryParse(configValue, out KeyCode key))
            {
                m_onOffKey = key;
            }
            else
            {
                m_onOffKey = KeyCode.End;
            }
            ZInput.Initialize();
            var buttons = typeof(ZInput).GetField("m_buttons", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ZInput.instance) as Dictionary <string, ZInput.ButtonDef>;

            if (buttons.ContainsKey("RR_DTDogdeOnOff"))
            {
                buttons.Remove("RR_DTDogdeOnOff");
            }
            ZInput.instance.AddButton("RR_DTDogdeOnOff", m_onOffKey);
        }
Exemple #2
0
 // Token: 0x06000AB0 RID: 2736 RVA: 0x0004D23C File Offset: 0x0004B43C
 private void Awake()
 {
     Game.m_instance = this;
     ZInput.Initialize();
     if (!global::Console.instance)
     {
         UnityEngine.Object.Instantiate <GameObject>(this.m_consolePrefab);
     }
     if (string.IsNullOrEmpty(Game.m_profileFilename))
     {
         this.m_playerProfile = new PlayerProfile("Developer");
         this.m_playerProfile.SetName("Odev");
         this.m_playerProfile.Load();
     }
     else
     {
         ZLog.Log("Loading player profile " + Game.m_profileFilename);
         this.m_playerProfile = new PlayerProfile(Game.m_profileFilename);
         this.m_playerProfile.Load();
     }
     base.InvokeRepeating("CollectResources", 600f, 600f);
     Gogan.LogEvent("Screen", "Enter", "InGame", 0L);
     Gogan.LogEvent("Game", "InputMode", ZInput.IsGamepadActive() ? "Gamepad" : "MK", 0L);
 }