Guest User

Untitled

a guest
Feb 11th, 2014
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class GuiTextButton : MonoBehaviour {
  5.  
  6. public Texture2D normal;
  7. public Texture2D over;
  8.  
  9. public GameObject machine;
  10.  
  11.  
  12. void OnMouseEnter(){
  13.  
  14. guiTexture.texture = over;
  15.  
  16. if(Input.GetMouseButtonUp(0)){
  17.  
  18. Unit.SendMessage("SetMachine", machine);
  19. }
  20. }
  21.  
  22.  
  23.  
  24. void OnMouseExit(){
  25.  
  26. guiTexture.texture = normal;
  27.  
  28.  
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment