Ejemplo n.º 1
0
        ///// <summary>
        ///// 对象池根节点
        ///// </summary>
        //public static Transform poolRoot;
        ///// <summary>
        ///// 对象
        ///// </summary>
        //public static Stack<GameObject> itemObjs;

        public static bool Load(UnityModManager.ModEntry modEntry)
        {
            warehouse      = WarehouseUI.GetWarehouseUI();
            warehouse.open = false;
            //itemObjs = new Stack<GameObject>();
            settings           = Settings.Load <Settings>(modEntry);
            Logger             = modEntry.Logger;
            modEntry.OnToggle  = OnToggle;
            modEntry.OnGUI     = OnGUI;
            modEntry.OnSaveGUI = OnSaveGUI;

            HarmonyInstance harmony = HarmonyInstance.Create(modEntry.Info.Id);

            harmony.PatchAll(Assembly.GetExecutingAssembly());

            GameObject pool = new GameObject();

            MonoBehaviour.DontDestroyOnLoad(pool);

            return(true);
        }
Ejemplo n.º 2
0
 public void init()
 {
     ui      = new WarehouseUI();
     ui.ctrl = this;
     ui.init();
 }