Despite the valid comments of previous speakers, check the operation of this:
But this is the so-called "partisan".
In subsequent tests, reduce the value of 2 in the red line to 1 and then to 0. Passing the code run in step mode (F8), observe in the Watches window the contents of the FloorCollection.
Earlier I prepared another code for you to explain something. Remove my first suggestion and insert:
Learn to observe variables and objects in the Watches window and use the step-by-step mode of code execution. This makes it very easy to understand what is happening to variables or objects at any given time.
Artik
Bookmarks