Advertisement
kasru

Basic Inventory System

Jan 14th, 2013
7,372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //****** Donations are greatly appreciated.  ******
  2. //****** You can donate directly to Jesse through paypal at  https://www.paypal.me/JEtzler   ******
  3.  
  4. //inventory
  5. static var inventoryArray : int[] = [1,2,0,0,0];
  6. var inventoryText : GameObject;
  7.  
  8. function Update () {
  9.  
  10.     inventoryText.guiText.text = "Health Potion " + "[" + inventoryArray[0] + "]" + "\n" + "Mana Potion " + "[" + inventoryArray[1] + "]";
  11.     inventoryArray[0]++;
  12.     inventoryArray[1] += 2;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement