Advertisement
Sylvir

example code

May 22nd, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.29 KB | None | 0 0
  1.     public GameObject inventory;
  2.    
  3.     //this is posted under each of my states so that you can call the inventory and close it wherever you are in the adventure.
  4.         if(Input.GetKeyDown(KeyCode.I))         {inventory.SetActive(true);}
  5.         if(Input.GetKeyDown(KeyCode.Escape))        {inventory.SetActive (false);}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement