コード例 #1
0
 internal void Update()
 {
     if (CustomKeybindings.GetKeyDown(MenuKey))
     {
         ModGUI.ShowMenu = !ModGUI.ShowMenu;
     }
 }
コード例 #2
0
        internal void Awake()
        {
            Instance = this;

            var obj = new GameObject("CombatDummyGUI");

            DontDestroyOnLoad(obj);
            obj.AddComponent <ModGUI>();

            var harmony = new Harmony("com.sinai.combatdummy");

            harmony.PatchAll();

            CustomKeybindings.AddAction(MenuKey, CustomKeybindings.KeybindingsCategory.Menus, CustomKeybindings.ControlType.Both, 5, CustomKeybindings.InputActionType.Button);
        }