Advertisement
dantepw

Untitled

Sep 5th, 2014
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.31 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class LevelSelector : MonoBehaviour {
  5.     public int x = 0;
  6.  
  7.     void OnGUI ()
  8.     {
  9.         print ("valor X: " +x);
  10.         if(GUI.Button(new Rect(100, 500, 50, 50), "<"))
  11.         {
  12.             x--;
  13.         }
  14.  
  15.  
  16.         if(GUI.Button(new Rect(300, 500, 50, 50), ">"))
  17.         {
  18.             x++;
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement