Advertisement
gandalfbialy

Untitled

May 24th, 2025
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1. private void FixedUpdate()
  2. {
  3.     floorTiles1.transform.position -= new Vector3(GameManager.instance.worldScrollingSpeed, 0f, 0f);
  4.     floorTiles2.transform.position -= new Vector3(GameManager.instance.worldScrollingSpeed, 0f, 0f);
  5.  
  6.     if (floorTiles2.transform.position.x < 0f)
  7.     {
  8.         floorTiles1.transform.position += new Vector3(36f, 0f, 0f);
  9.  
  10.         var temp = floorTiles1;
  11.         floorTiles1 = floorTiles2;
  12.         floorTiles2 = temp;
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement