示例#1
0
 void Start()
 {
     recipes        = Resources.LoadAll <Recipe>("ScriptableObjects/Recipes");
     craftingPanel  = GetComponent <CraftingPanel>();
     inventoryItems = new List <Item>();
     craftableItems = new List <Item>();
 }
示例#2
0
 public static void Postfix(CraftingPanel __instance)
 {
     using (TextWriter tw = File.CreateText(@"harmony_works.log"))
     {
         tw.WriteLine("HarmonyPlugin and Patches initialized!");
         tw.Flush();
     }
 }
示例#3
0
    private void Awake()
    {
        sharedInstance = this;
        int i = 0;

        foreach (Transform child in transform)
        {
            slots[i] = (child.gameObject.GetComponent <InventorySlot>());
            i++;
        }
    }
示例#4
0
 private void Awake()
 {
     Instance = this;
 }
示例#5
0
 protected override void Awake()
 {
     base.Awake();
     craftingPanel = FindObjectOfType <CraftingPanel>();
 }