Exemplo n.º 1
0
 void OnEnable()
 {
     RuntimeUtils.EnforceLibraryOrder();
     rigidBody = gameObject.GetComponent <Rigidbody>();
     RuntimeManager.HasListener[ListenerNumber] = true;
     RuntimeManager.SetListenerLocation(ListenerNumber, gameObject, rigidBody);
 }
 void SetListenerLocation()
 {
     if (rigidBody)
     {
         RuntimeManager.SetListenerLocation(ListenerNumber, gameObject, rigidBody, attenuationObject);
     }
     else
     {
         RuntimeManager.SetListenerLocation(ListenerNumber, gameObject, rigidBody2D, attenuationObject);
     }
 }
 private void SetListenerLocation()
 {
     if ((bool)rigidBody)
     {
         RuntimeManager.SetListenerLocation(ListenerNumber, base.gameObject, rigidBody);
     }
     else
     {
         RuntimeManager.SetListenerLocation(ListenerNumber, base.gameObject, rigidBody2D);
     }
 }
Exemplo n.º 4
0
 void SetListenerLocation()
 {
     #if UNITY_PHYSICS_EXIST || !UNITY_2019_1_OR_NEWER
     if (rigidBody)
     {
         RuntimeManager.SetListenerLocation(ListenerNumber, gameObject, rigidBody, attenuationObject);
     }
     else
     #endif
     #if UNITY_PHYSICS2D_EXIST || !UNITY_2019_1_OR_NEWER
     if (rigidBody2D)
     {
         RuntimeManager.SetListenerLocation(ListenerNumber, gameObject, rigidBody2D, attenuationObject);
     }
     else
     #endif
     {
         RuntimeManager.SetListenerLocation(ListenerNumber, gameObject, attenuationObject);
     }
 }
Exemplo n.º 5
0
 void Update()
 {
     RuntimeManager.SetListenerLocation(ListenerNumber, gameObject, rigidBody);
 }
Exemplo n.º 6
0
 void Start()
 {
     rigidBody = gameObject.GetComponent <Rigidbody>();
     RuntimeManager.SetListenerLocation(gameObject, rigidBody);
 }