Esempio n. 1
0
        void Awake()
        {
            logger = Logger;

            ProtoIndex.InitIndex();
            LDBTool.Init();

            ShowProto             = Config.Bind("config", "ShowProto", false, "是否开启数据显示");
            ShowProtoHotKey       = Config.Bind("config", "ShowProtoHotKey", KeyCode.F5, "呼出界面的快捷键");
            ShowItemProtoHotKey   = Config.Bind("config", "ShowItemProtoHotKey", KeyCode.I, "显示物品的Proto");
            ShowRecipeProtoHotKey = Config.Bind("config", "ShowRecipeProtoHotKey", KeyCode.R, "显示配方的Proto");

            Harmony harmony = new Harmony(MODGUID);

            harmony.PatchAll(Assembly.GetExecutingAssembly());

            logger.LogInfo("LDBTool is loaded successfully!");
        }
Esempio n. 2
0
 void Update()
 {
     if (LDBTool.ShowProto.Value)
     {
         if (Input.GetKeyDown(LDBTool.ShowProtoHotKey.Value))
         {
             ProtoDataUI.Show = !ProtoDataUI.Show;
         }
         if (SupportsHelper.SupportsRuntimeUnityEditor)
         {
             if (Input.GetKeyDown(LDBTool.ShowItemProtoHotKey.Value))
             {
                 LDBTool.TryShowItemProto();
             }
             if (Input.GetKeyDown(LDBTool.ShowRecipeProtoHotKey.Value))
             {
                 LDBTool.TryShowRecipeProto();
             }
         }
     }
 }