Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //****** Donations are greatly appreciated. ******
- //****** You can donate directly to Jesse through paypal at https://www.paypal.me/JEtzler ******
- var hit : RaycastHit;
- var shopOpen : boolean = false;
- function OnGUI () {
- if(shopOpen == true) {
- if (GUI.Button(Rect(10,70,50,30),"Item 1"))
- Debug.Log("You bought an item");
- }
- }
- function Update () {
- if(Input.GetMouseButtonDown(0) &&
- collider.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), hit,Mathf.Infinity)) {
- shopOpen = true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement