不同设备上的动画速度 [英] Animation speed on different devices

查看:105
本文介绍了不同设备上的动画速度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发的Android游戏中有一个简单的翻译动画。当我在多种设备上进行测试时,它在10英寸平板电脑,7英寸平板电脑和智能手机上的运行速度非常不同。

I have a simple translation animation in an Android game I am developing. When I test it on several devices, it runs at very different speeds on 10-inch tablets, 7-inch tablets and smartphones.

什么是最先进的技术

谢谢,

推荐答案

我最终决定使用display.metrics来获取设备的像素密度。然后,我通过除以密度值来调整平移运动速度。

I finally decided to use display.metrics to get the pixel density of the devices. Then I adjust the translation motion speed by dividing by the density value.

仍然想知道这是否是控制各种设备上动画速度的最先进方法? ??

Still wondering if this is the "state of the art" way of controlling animation speed on various devices???

这篇关于不同设备上的动画速度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆