Пример #1
0
    void FixedUpdate()
    {
        if (Config.isPause)
        {
            return;
        }
        if (PlayerCollision.isDie)
        {
            return;
        }

        if (placeOnSurface)
        {
            if (rb != null)
            {
                attractor.PlaceOnSurface(rb);
            }
        }
        else
        {
            if (rb != null)
            {
                attractor.Attract(rb);
            }
        }
    }
Пример #2
0
 void FixedUpdate()
 {
     if (placeOnSurface)
     {
         attractor.PlaceOnSurface(rb);
     }
     else
     {
         attractor.Attract(rb);
     }
 }
Пример #3
0
 void FixedUpdate()
 //give Component Rigidbody to Attractor
 {
     if (placeOnSurface)
     {
         attractor.PlaceOnSurface(rb);
     }
     else
     {
         attractor.Attract(rb);
     }
 }
Пример #4
0
 /// <summary>
 /// This function is called every fixed framerate frame, if the MonoBehaviour is enabled.
 /// </summary>
 void FixedUpdate()
 {
     // place the player on surface
     if (placeOnSurface)
     {
         fauxGravityAttractor.PlaceOnSurface(rb);
     }
     else
     {
         fauxGravityAttractor.Attract(rb);
     }
 }