Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class NoteTrigger : MonoBehaviour {
  5.  
  6. public Texture2D img;
  7. // Use this for initialization
  8. void Start () {
  9.  
  10.  
  11. }
  12.  
  13. // Update is called once per frame
  14. void Update () {
  15.  
  16.  
  17. }
  18.  
  19. public Texture2D noteImage
  20. {
  21. get { return img; }
  22. }
  23.  
  24. void OnGUI()
  25. {
  26. if (Input.GetMouseButton(0))
  27. {
  28. float width = 600;
  29. float height = 600;
  30. GUI.DrawTexture(new Rect((Screen.width / 2) - (width / 2), (Screen.height / 2) - (height / 2), width, height), img);
  31.  
  32.  
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement