예제 #1
0
        static UJTrigger GetTrigger(GameObject gameObject)
        {
            UJTrigger trgr = gameObject.GetComponent <UJTrigger>();

            if (trgr == null)
            {
                trgr = gameObject.AddComponent <UJTrigger>();
            }

            //	trgr.hideFlags = HideFlags.HideInInspector;
            return(trgr);
        }
예제 #2
0
        public static void OnTriggerExit(this Rigidbody rigidbody, Action <Collider> trigger)
        {
            UJTrigger trgr = GetTrigger(rigidbody.gameObject);

            trgr.exit = trigger;
        }
예제 #3
0
        public static void OnTriggerExit(this Collider col, Action <Collider> trigger)
        {
            UJTrigger trgr = GetTrigger(col.gameObject);

            trgr.exit = trigger;
        }