We can use the following steps to implement some stars:
gameclass with the name
CreateStars. It will have a parameter for the amount of starts to be created.
Method CreateStars:Int (scount:Int)
1to the amount of stars to be created.
For Local i:Int = 1 To scount
Now, create a local
star object, which will be a subimage from the texture atlas which we have loaded before. For this, we utilize the
CreateImage method of the fantomEngine. At the same time we position it. We could use
DeviceHeight of Mojo, but fantomEngine can work with virtual canvas sizes so we will use its own canvas size fields.