// Use this for initialization void Start() { normalPosition = this.transform.localPosition; PUIEventListener.Get(this.gameObject).onHover += OnHover; PUIEventListener.Get(this.gameObject).onClick += OnClick; // PvrInputMoudle.FindInputModule().onRefreshCursor += RefreshCursor; }
static public PUIEventListener Get(GameObject go) { PUIEventListener listener = go.GetComponent <PUIEventListener>(); if (listener == null) { listener = go.AddComponent <PUIEventListener>(); } return(listener); }
// Use this for initialization void Start() { normalPosition = this.transform.localPosition; PUIEventListener.Get(this.gameObject).onHover += OnHover; PUIEventListener.Get(this.gameObject).onClick += OnClick; }