08 2012 档案

摘要:1.use html tag to format the texthttp://www.cnblogs.com/ffvsff/archive/2008/02/17/1071504.html<br> new line<pre> can maintain the space the tab of you text 阅读全文
posted @ 2012-08-25 10:11 Qiengo 阅读(107) 评论(0) 推荐(0) 编辑
摘要:http://www.igniterealtime.org/downloads/index.jsp在官网下载openfire服务器,Spark工具。下载asmack jar包。点击bin目录下的openfired.exe开启服务器。设定登录服务器:http://localhost:9090暂时只实现文字聊天XmppTool.javaimport org.jivesoftware.smack.ConnectionConfiguration;import org.jivesoftware.smack.XMPPConnection;import org.jivesoftware.smack.XMPP 阅读全文
posted @ 2012-08-24 17:44 Qiengo 阅读(761) 评论(0) 推荐(0) 编辑
摘要:1. For Integer,you can consider the following: *2 ≡ <<1 /2≡>>1 %2 ≡ &12.Generate anon-repeating numbers random arrayranging from 1-50 int[] result = new int[50]; ArrayList<Integer> numPool = new ArrayList<Integer>(); for (int i = 0; i < 50; i++) { numPool.add(i); ... 阅读全文
posted @ 2012-08-14 10:45 Qiengo 阅读(126) 评论(0) 推荐(0) 编辑
摘要:libgdx绝对是一个相当不错的游戏引擎,最近一段时间的学习我感觉收获很多。但是我一直对于libgdx加载的图片大小必须是2的次方感到很纠结。如果是一张一般的图片想在libgdx中使用的话就需要自己去用ps什么的把图像拉一下,一两张没关系,但是数量大了还是有点烦。而且拉大的图片还需要TextureRegion来切割一下,实在麻烦。仔细看了一下libgdx的tool包,发现早有解决方案了。具体的类是imagepacker,在com.badlogic.gdx.tools.imagepacker包之中。它可以将多张图片合并在一张之中。同时可以通过原有文件的文件名获得图片资源。这里有几张图片:将它们放 阅读全文
posted @ 2012-08-07 09:30 Qiengo 阅读(669) 评论(0) 推荐(0) 编辑
摘要:关于libgdx和box2d的图形在libgdx的stage或者spriteBatch里画图.图的对称点是左下角.在libgdx的TextureRegion从Texture里取需要的区域时,图的对称点是左上角.在box2d里body,图的对称点是中心(可能符合物理的重心吧).还有在libgdx里面.导入的Texture图片.一定要是2的幂数.即2,4,8....1024.如果想导入不是2的幂数的图片.只能把它放在一个符合2的幂数的Texture里面.再使用TextureRegion从该Texture里提取所需要的区域.创造一个世界:Vector2 gravity = new Vector2(0 阅读全文
posted @ 2012-08-07 09:25 Qiengo 阅读(694) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示