上一页 1 ··· 6 7 8 9 10 11 12 下一页

2015年10月14日

摘要: sprite:getTexture():setTexParameters(gl.LINEAR,gl.LINEAR,gl.REPEAT,gl.REPEAT)在安卓设备上,设置了纹理自定义寻址模式,纹理图片的宽高大小可以任意设置,但在ios或者mac设备上,纹理图片的大小一定要是2的n次方,不然渲染出来... 阅读全文
posted @ 2015-10-14 12:37 HemJohn 阅读(391) 评论(0) 推荐(0) 编辑

2015年10月13日

摘要: 今天我研究了一下加密spine动画的加密的方法,图片肯定要加密的,所以我只选择加密图片,另外的一个altas文件和json文件就不做加密打算。我的思路是通过TexturePacker打包成加密的文件,然后用spriteframecache读取后,遍历所有spriteframe,然后将spritefr... 阅读全文
posted @ 2015-10-13 22:25 HemJohn 阅读(1092) 评论(1) 推荐(0) 编辑
摘要: 图片加密的方法有很多种,在cocos2dx中,经常会使用TexturePacker来加密图片,方法如下:打开TexturePacker,点击Add Sprite添加图片,在output栏下的Texture format选择pvr.gz格式,点击Content protection加密按钮,创建加密密... 阅读全文
posted @ 2015-10-13 22:04 HemJohn 阅读(484) 评论(0) 推荐(0) 编辑

2015年10月12日

摘要: cocos2dx的utils类中包含截图功能,使用方法如下:cc.utils:captureScreen(function(successed,outputFile)--第一个参数是截图成功或者失败的回调函数 if successed then--如果成功,返回true,否则返回nil ... 阅读全文
posted @ 2015-10-12 23:41 HemJohn 阅读(539) 评论(0) 推荐(0) 编辑
摘要: 在cocos2dx中,我们想通过移动摄像机来做一些特殊处理,比如将摄像机聚焦在某个物体上,或者摄像机颤抖,摄像机原理观察sprite回收状况等等,都需要通过相机移动来使用。cocos2dx中的摄像机分两种,一种是正交摄像机,一种是投影摄像机。正交摄像机是cocos2dx默认的摄像机,无论你摄像机离s... 阅读全文
posted @ 2015-10-12 13:23 HemJohn 阅读(1283) 评论(0) 推荐(0) 编辑
摘要: 将c++ 封装成lua调用时,显示一下错误:PYTHON_BIN not defined, use current python.generating userconf.ini...Generating bindings for cocos2dx_TextLoader...Traceback (mo... 阅读全文
posted @ 2015-10-12 00:10 HemJohn 阅读(1679) 评论(0) 推荐(0) 编辑

2015年10月11日

摘要: 安装homebrew失败提示如下ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"Failed to locate Homebrew!解决办法:只要把/usr/loca... 阅读全文
posted @ 2015-10-11 18:51 HemJohn 阅读(396) 评论(0) 推荐(0) 编辑

2015年10月10日

摘要: unity3d的api中没有负责监听键值的方法,不过unity的input类是通过c#类获取各类监听事件,所以我们可以通过c#类监听,方法如下: void OnGUI() { Event e = Event.current; if (e.isKey) ... 阅读全文
posted @ 2015-10-10 21:16 HemJohn 阅读(751) 评论(0) 推荐(0) 编辑

2015年10月1日

摘要: (Upgrade.h)#include #include "cocos2d.h"#include "framework/utils/Utils.h"#include "framework/json/JSONObject.h"USING_NS_CC;#include "ide-support/Simp... 阅读全文
posted @ 2015-10-01 11:14 HemJohn 阅读(2338) 评论(0) 推荐(0) 编辑
摘要: 首先,我们要从unity的安装路径中复制mono.data.sqlite.dll和sqlite3.dll两个动态链接库到untiy的plugins目录下,如下图所示:使用navicat for sqlite创建一个sqlite数据库文件,放到Resources文件夹目录中,如下图所示:新建一个D... 阅读全文
posted @ 2015-10-01 10:32 HemJohn 阅读(6001) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 下一页

导航