Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class LevelSelector : MonoBehaviour {
- public int x = 0;
- void OnGUI ()
- {
- print ("valor X: " +x);
- if(GUI.Button(new Rect(100, 500, 50, 50), "<"))
- {
- x--;
- }
- if(GUI.Button(new Rect(300, 500, 50, 50), ">"))
- {
- x++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement