Cocos2d-x Lua 获取设备类型

来源:互联网 发布:hp2055网络打印机驱动 编辑:程序博客网 时间:2024/06/07 00:53

local targetPlatform = CCApplication:sharedApplication():getTargetPlatform()--获取当前设备类型
if kTargetIphone == targetPlatform or kTargetIpad == targetPlatform then
print("iPhone OS")
else
print("Android OS")
end

CCApplication:sharedApplication():getCurrentLanguage()--获取当前设备的语言类型


原创粉丝点击