Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Update()
- {
- if (lastFloor.x < transform.position.x + 11)
- {
- NextFloor();
- }
- foreach (var transf in floors)
- {
- if (transf.transform.position.x < transform.position.x - 20)
- {
- floors.Remove(transf.gameObject);
- Destroy(transf);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment