添加了帧事件,能触发,能捕获,就是事件名evt无法获取。
void Player::onFrameEvent(Bone *bone, const char *evt, int originFrameIndex, int currentFrameIndex){
//…
}
运行时显示 evt 字符串中的字符无效 或者是 乱码,其他一切正常,能触发,函数体能运行。
添加了帧事件,能触发,能捕获,就是事件名evt无法获取。
void Player::onFrameEvent(Bone *bone, const char *evt, int originFrameIndex, int currentFrameIndex){
//…
}
运行时显示 evt 字符串中的字符无效 或者是 乱码,其他一切正常,能触发,函数体能运行。
检查下编码是否匹配,如果不匹配请转码。
— Begin quote from ____
引用第1楼hanrea于2014-04-20 21:11发表的 :
检查下编码是否匹配,如果不匹配请转码。 http://www.cocoachina.com/bbs/job.php?action=topost&tid=198752&pid=932015
— End quote
请问匹配哪个编码啊?我是vs2012 + cocos2dx 3.0rc0 + cocoStudio 1.3
用EditPlus和UltraEdit都改不了啊,改了会变回默认。
跟行尾的编码设置有关系么?
已解决。
查看了 setFrameEventCallFunc 在 CCArmatureAnimation.cpp 中的定义,原因是在3.0rc中参数的函数原型被改变了。
应该是 void onFrameEvent(Bone *bone, const string &evt, int originFrameIndex, int currentFrameIndex);