Esempio n. 1
0
        public static IEventTigger Get(GameObject obj)
        {
            IEventTigger tigger = obj.GetComponent <IEventTigger>();

            if (tigger == null)
            {
                tigger = obj.AddComponent <IEventTigger>();
            }
            return(tigger);
        }
Esempio n. 2
0
 void Awake()
 {
     oldScale = transform.localScale;
     tigger   = IEventTigger.Get(this.gameObject);
     tigger.OnClickCallBack       = OnClick;
     tigger.OnPressCallBack       = OnPress;
     tigger.OnPointerDownCallBack = OnPointerDownCallBack;
     tigger.OnPointerUpCallBack   = OnPointeUpCallBack;
     _selfID = gameObject.GetInstanceID();
 }