333GameStudio

Drop

Jul 19th, 2015
1,097
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. var drop : GameObject;
  4. var Gun : GameObject;
  5.  
  6. function Update () {
  7. if(Input.GetKeyDown("r")){
  8.  
  9. Instantiate(drop,transform.position,transform.rotation);
  10.  
  11. Drop();
  12.  
  13. }
  14. }
  15. function Drop () {
  16.  
  17. Gun.SetActive(false);
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment