|
|
我用3MAX做的门的骨骼动画文件,在3DMAX中动画很好,导出mesh文件,也没问题,可是加载到程序中,开门的动作还有,关门的动作就只有一半,我加了一个CEGUI的按钮,只能触发一次,再安就不行了,哪位高手知道的帮忙解答一下,谢谢!!
我用CELayoutEditor做的按钮,在setupEventHandlers(void)中添加的
wmgr.getWindow((CEGUI::utf8*)"Opendoor")->subscribeEvent(CEGUI: ushButton::EventClicked, CEGUI::Event::Subscriber(&InstancingApplication::handleOpendoor, this));
bool InstancingApplication::handleOpendoor(const CEGUI::EventArgs&e)
{
static_cast<InstancingListener*>(mFrameListener)->requestOpendoor();
return false;
}在listener中定义并初始化requestOpendoor
void InstancingListener::requestOpendoor(void)
{
mdoor=1;
}
if (mdoor==1)
{
mMain->m_glopen = mMain->m_glEnt->getAnimationState("Opendoor");
mMain->m_glopen->setEnabled(true);
mMain->m_glopen->setLoop(false);
mMain->m_glopen->addTime(evt.timeSinceLastFrame);
}为什么按钮只能触发一次?第一次加按钮,高手指点一下啊
[em5] [em5] [em5] |
|