Finally add some trees by adding data to the lvlTrees struct. I’m using an asset that has got over a hundred different trees, so just try some different numbers for .no until you find some that are suitable. .pos is the location, and here too you can use the toScreenCoords() function if you want to use sprite coordinates for the trees.
Let’s add two trees to our little level:
100B4BF9-B7CF-43B3-9F06-8A3FB9E6D238.jpeg
6AE4AE5B-036A-43B2-AF6F-2EC612E5A344.jpeg
And there we have it. Our little test level is complete and ready to be played. Just repeat the steps to add in even more levels.
When the level is finished, please friend share it with me. My friend code is SW-2920-4811-2229.