Map Icons and Draw Scene

the process of clearing and mapping both the instructions and icons is relatively simple. we first create a variable that contains all the instances of either the icon or the instruction using a query selector. in the clear function, we use a while statement of check if there is an element within the space we are looking at, to accomplish this we use “.firstElementChild” if there is one the next step is to clear either the icon or instruction using removeChild in which we pass the first child of the element as a reference. For the mapping function we take in the level as a parameter we then access that scenes icons using the level. we then append the icons to the iconspace and build it as well.

Leave a comment

Your email address will not be published. Required fields are marked *

css.php