SHARE
TWEET

Untitled

a guest Jun 20th, 2019 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using System;
  5. [Serializable]
  6. public class inventorySlot
  7. {
  8.     public produce produceOfSlot;
  9.     public bool filledSlot;
  10.  
  11.     public void wipeSlot()
  12.     {
  13.         produceOfSlot = new produce();
  14.         filledSlot = false;
  15.     }
  16. }
  17.  
  18. public class playerInventory : MonoBehaviour {
  19.     public inventorySlot[] allProduceHeld;
  20.     public inventorySlot currentProduceHeld;
  21.     public int currentProduceHeld_Index;
  22.     // Use this for initialization
  23.     void Awake () {
  24.         allProduceHeld = new inventorySlot[9];
  25.         //for(int i = 0; i < allProduceHeld.Length; i++)
  26.         //{
  27.             //allProduceHeld[i].wipeSlot();
  28.         //}
  29.     }
  30.    
  31.     // Update is called once per frame
  32.     void Update () {
  33.         currentProduceHeld = allProduceHeld[currentProduceHeld_Index];
  34.     }
  35. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top