예제 #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);
     }
 }