Guest User

Untitled

a guest
Nov 18th, 2020
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. void Update()
  2. {
  3. if (lastFloor.x < transform.position.x + 11)
  4. {
  5. NextFloor();
  6. }
  7. foreach (var transf in floors)
  8. {
  9. if (transf.transform.position.x < transform.position.x - 20)
  10. {
  11. floors.Remove(transf.gameObject);
  12. Destroy(transf);
  13. }
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment