Ejemplo n.º 1
0
        internal void Awake()
        {
            Instance = this;

            // setup keybinding
            CustomKeybindings.AddAction(TOGGLE_KEY, KeybindingsCategory.Menus, ControlType.Both);

            // setup harmony
            new Harmony(GUID).PatchAll();

            // setup config
            Settings.Init(Config);

            // global scene change event
            SceneManager.activeSceneChanged += SceneManager_activeSceneChanged;

            // Load bundle
            var bundle = AssetBundle.LoadFromFile(ASSETBUNDLE_PATH);

            AlwaysOnTopMaterial = bundle.LoadAsset <Material>("UI_AlwaysOnTop");
            GameObject.DontDestroyOnLoad(AlwaysOnTopMaterial);
            AlwaysOnTopMaterial.hideFlags |= HideFlags.HideAndDontSave;
        }
Ejemplo n.º 2
0
 public void Initialise()
 {
     Patch();
     CustomKeybindings.AddAction(AggroToggleKey, KeybindingsCategory.Actions, ControlType.Both, 5);
 }