Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class GuiTextButton : MonoBehaviour {
- public Texture2D normal;
- public Texture2D over;
- public GameObject machine;
- void OnMouseEnter(){
- guiTexture.texture = over;
- if(Input.GetMouseButtonUp(0)){
- Unit.SendMessage("SetMachine", machine);
- }
- }
- void OnMouseExit(){
- guiTexture.texture = normal;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment