Copy link to clipboard
Copied
I have a game where enemies are spawned from a library at random. Their size and speed are set to work on specific dimensions. However, these specific standards won't work well on phones with small screens. Is there a way to change speed, size depending on a phone's dimensions?
Copy link to clipboard
Copied
sure. you can assign those parameters based on the capabilities class screenResolutionX etc.
Copy link to clipboard
Copied
Could you please explain more about these capabilities?
Copy link to clipboard
Copied
there's nothing to explain. again, you can use:
if(Capabilities.screenResolutionX<whatever && Capabilitites.screenResolutionY<whateverelse){
// do whatever to deal with this screen size
} else if( etc ){
} etc
Find more inspiration, events, and resources on the new Adobe Community
Explore Now