Пример #1
0
 void OnCollisionExit(Collision collision)
 {
     if (callableObject == null)
     {
         callableObject = calledObject.GetComponent <CollisionCallable>();
     }
     callableObject.OnCollisionExit(collision);
 }
Пример #2
0
 void OnTriggerEnter(Collider collider)
 {
     if (callableObject == null)
     {
         callableObject = calledObject.GetComponent <CollisionCallable>();
     }
     callableObject.OnTriggerEnter(collider);
 }
Пример #3
0
 // Start is called before the first frame update
 void Start()
 {
     callableObject = calledObject.GetComponent <CollisionCallable>();
     if (calledObject == null)
     {
         Destroy(this);
     }
 }