And the game is up on the play store!!
https://play.google.com/store/apps/deta ... ritterbits
Moderator: marauder2k9
if($deviceType $= "tablet") { //do something different for tablets }this value can also check if device is phone. If you are working a cross device game you can now set your camera to scale appropriately and all artwork providing they are 1:1 at multiples of 4 should rescale properly to a different camera size. For example on my app i have the phone to be a camera size of 90,160 (reverse due to portrait) but for tablets i have it set to 180,320. This way all artwork ends up looking about the right size for the screen.
S32 _iOSGetPortraitTouchoffset() { // NOTE: This needs to be changed to acount for different retina sizes, but I am not sure what is going on with it yet S32 offset = 0; S32 deviceType = Con::getIntVariable("$pref::iOS::DeviceType"); bool retinaEnabled = Con::getBoolVariable("$pref::iOS::RetinaEnabled"); if (deviceType == 2) offset = 500; else if (deviceType == 1) offset = retinaEnabled ? 500 : 250; else offset = retinaEnabled ? 320 : 160; return offset; }due to ios apps now only being released to iOS 7+ devices this offset is irrelevant but you cannot remove it completely or it will break touches after a few. so just comment everything out apart from S32 offset = 0; and the touches should then be accurate