333GameStudio

Build

Jan 12th, 2017
548
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var  spawner : GameObject;
  2. var num : float = 0;
  3.  
  4.  
  5. function Update () {
  6. if(num == 1){
  7.  
  8. spawner.SetActive(true);
  9.  
  10. }
  11. else{
  12.  
  13. spawner.SetActive(false);
  14.  
  15. }
  16. }
  17. function OnMouseEnter(){
  18.  
  19.  
  20.  
  21. num = 1;
  22.  
  23.  
  24.  
  25.  
  26.  
  27. }
  28. function OnMouseExit(){
  29.  
  30. num = 0;
  31.  
  32.  
  33. }
Add Comment
Please, Sign In to add comment