Example #1
0
 public static void MovePlayerTo(Vector2 position)
 {
     playerFollower.DisableSmoothing();
     pc.DisableTrails();
     pc.transform.position = position;
     pc.EnableTrails();
     playerFollower.SnapToPlayer();
     playerFollower.EnableSmoothing();
 }
 public static void MovePlayerTo(string objectName, bool smoothing = false)
 {
     if (!smoothing)
     {
         playerFollower.DisableSmoothing();
     }
     pc.transform.position = GameObject.Find(objectName).transform.position;
     if (!smoothing)
     {
         playerFollower.EnableSmoothing();
     }
 }