Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- [RequireComponent (typeof(SpriteRenderer))]
- //[RequireComponent (typeof(Collider2D))]
- public class Lootable : MonoBehaviour
- {
- // Use this for initialization
- void Start ()
- {
- print ("Im start: " + name);
- }
- void OnMouseDown ()
- {
- print ("Clickety");
- }
- void OnHover (bool isOver)
- {
- if (isOver) {
- print ("NGUI FTW");
- renderer.material.color = Color.red;
- } else {
- renderer.material.color = Color.white;
- }
- }
- void OnPress (bool isDown)
- {
- if (isDown) {
- print ("NGUI CLICK!");
- } else {
- print ("MouseUp");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement