首页 \ 问答 \ iOS动画性能(iOS Animation Performance)

iOS动画性能(iOS Animation Performance)

我有一个带有许多动画“怪物”的游戏。 动画制作每个怪物约20张图像。 所以我使用UIImageView设置了animationImages: .

问题是有时屏幕上会有很多怪物(总共多达110个,最多10个不同)。 因此,当所有这些都同时出现在屏幕上时 - 我看到了动画问题(非常低的fps)。

拜托,您能给我一些建议 - 我该如何解决这个问题?


I have a game with a number of animated "monsters". The animation is made with ~20 png images for each monster. So I use UIImageView with setted animationImages:.

The problem is that sometimes there can be a lot of monsters on the screen (up to 110 in total and up to 10 different). So when all of them are on the screen at the same time - I see animation problems (very low fps).

Please, can you give me some advice - how can I solve this problem?


原文:https://stackoverflow.com/questions/6800031
更新时间:2024-04-19 06:04

最满意答案

你必须做两件事,

  1. 在logging.properties文件中配置some-logger-name。

    一些记录器-name.handlers = org.restlet.engine.log.AccessLogFileHandler

    一些记录器-name.useParentHandlers =假

  2. 在组件java初始化代码中设置some-logger-name。

    component.getLogService()setLoggerName( “一些记录器名称”)。


You have to do 2 things,

  1. configure some-logger-name in the logging.properties file.

    some-logger-name.handlers=org.restlet.engine.log.AccessLogFileHandler

    some-logger-name.useParentHandlers=false

  2. Set the some-logger-name in your component java initialization code.

    component.getLogService().setLoggerName("some-logger-name");

相关问答

更多
  • 是的,您需要在GWT项目的web.xml中设置您的Restlet Servlet。 然后,以调试模式启动gwt项目(将启动jetty servlet),您将访问http://127.0.0.1:8888/YourServlet/ ...您最终可以在另一台服务器中部署Restlet Servlet。 最后使用RequestBuilder编写客户端服务。 请记住,如果您将Restlet服务部署在另一个主机上,而不是您为其服务的主机(例如,您的重定时器在http:// another_host:another_p ...
  • 你必须做两件事, 在logging.properties文件中配置some-logger-name。 一些记录器-name.handlers = org.restlet.engine.log.AccessLogFileHandler 一些记录器-name.useParentHandlers =假 在组件java初始化代码中设置some-logger-name。 component.getLogService()setLoggerName( “一些记录器名称”)。 You have to do 2 thing ...
  • 看来我还需要以下许可: It seems like I also needed the following permission:
  • 我认为您需要在应用程序的类路径中添加Apache Commons IO库的jar文件。 也就是说,你应该使用Maven来配置和解决你的依赖关系,因为它会为你处理这个问题。 以下是在Restlet中配置上载支持的示例内容:
    我怀疑,我的证书没有正确生成。 我很确定有一种更简单的方法,但这就是我所做的(在另一个答案的帮助下): > openssl genrsa -des3 -passout pass:1 -out qlinks.pass.key 2048 > openssl rsa -passin pass:1 -in qlinks.pass.key -out qlinks.key > openssl req -new -key qlinks.key -out qlinks.csr > openssl x509 -req -da ...
  • 您的问题实际上不是关于Restlet,而是关于设计高可扩展性,高可用性站点。 我们发现Restlet具有正确的系统架构的扩展能力。 一般来说你想要: 运行一组 Web服务器机器,而不仅仅是一台。 确保你的应用程序没有共享 ,即,如果可能的话,没有存储在你的Web服务器中的应用程序状态。 使用负载平衡器将请求传播到最少加载的Web服务器。 确保你的JSON响应是可缓存的 。 在您网站的边界添加一个HTTP 反向代理缓存 (例如Squid)。 随着网站与客户之间的缓存升温,大部分入站流量将由他们处理,而不是您的 ...
  • 好像你不确定你需要什么,所以为什么不尝试使用GWT的RPC,然后使用GWT的RequestBuilder +你的服务器端代码返回JSON,然后转移到Restlet。 RPC和REST是客户端 - 服务器通信的根本不同的方法,并且您想要在没有充分理由的情况下将其中的一个变为另一个。 更新: 迁移到restlet rpc的主要原因是避免使用GWT-RPC可能的跨站点脚本 使用restlet并不能保证xss是不可能的,并且你可以通过在将输入返回给客户端之前转义输入来阻止带有GWT RPC的xss。 以SafeHt ...
  • 我认为您可以尝试直接删除Maven本地存储库中的Hibernate依赖项。 然后使用Maven重新安装依赖项... 有关详细信息,请参阅此问题: 是什么导致java.lang.IncompatibleClassChangeError? After agonizing for 3 over weeks I finally figured it out, it's caused by version incompatibility!!! EAP 6.4 is NOT compatible with JPA 2. ...
  • ClientResource是线程安全的,但它并没有特别设计为由多个并发线程使用,即使它是可能的。 但是,多次重复使用同一个实例是完全有效的。 回到你的问题,我们需要一个更详细的问题堆栈跟踪来帮助,因为“内部服务器错误”导致服务器端而不是客户端的问题。 希望这会有所帮助,杰罗姆 ClientResource is thread safe, but it wasn't especially designed to be used by several concurrent threads, even thou ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)