333GameStudio

GameManagerUpdate

Jul 3rd, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. var num : int = 0;
  3.  
  4. function Start(){
  5.  
  6. num = PlayerPrefs.GetInt("TheGame");
  7.  
  8. }
  9. function Update(){
  10. if(Input.GetMouseButtonDown(0)){
  11.  
  12.  
  13. PlayerPrefs.SetInt("TheGame", 5);
  14.  
  15.  
  16. }
  17. }
  18. function FixedUpdate(){
  19. if(num == 5){
  20.  
  21.  
  22. Application.LoadLevel("Level1");
  23.  
  24.  
  25.  
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment