摘要: AndEngine引擎提供了一个截图的类ScreenCapture 这个类的用法:ScreenCapture cap= new ScreenCapture();无参构造函数 然后添加到场景中,如果不添加到场景中就截不到任何数据 她有两个主要方法 capture(final int pCaptureWidth, final int pCaptureHeight, final String pFil... 阅读全文
posted @ 2015-01-06 17:41 LinuxCC 阅读(182) 评论(0) 推荐(0) 编辑
摘要: AndEngine给Entity实体注册更新handler和实体修改器,registerUpdateHandler和registerEntityModifier方法 这个方法内部实现都是将要注册的IUpdateHandler,IEntityModifier添加到UpdateHandlerList,EntityModifierList中, 而UpdateHandlerList,EntityModif... 阅读全文
posted @ 2015-01-06 15:32 LinuxCC 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 线程安全就是说多线程访问同一代码,不会产生不确定的结果。编写线程安全的代码是低依靠线程同步。 那么Java中哪些类已经是线程安全的,即不需要另外使用同步锁。 HashTable是线程安全的,HashMap不是线程安全的 ConcurrentLinkedQueue是线程安全的,是基于链表实现的,所以他的size方法会遍历整个链表,所以不建议使用size方法 ArrayList不是线程安全的, Str... 阅读全文
posted @ 2015-01-06 14:28 LinuxCC 阅读(519) 评论(0) 推荐(0) 编辑