fixed armature update

This commit is contained in:
yinkaile 2013-12-26 15:49:20 +08:00
parent c096743325
commit 7027587542
2 changed files with 15 additions and 3 deletions

View File

@ -181,9 +181,6 @@ bool Armature::init(const std::string& name)
setShaderProgram(ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR));
unscheduleUpdate();
scheduleUpdate();
setCascadeOpacityEnabled(true);
setCascadeColorEnabled(true);
@ -432,6 +429,18 @@ void Armature::draw()
}
}
void Armature::onEnter()
{
Node::onEnter();
scheduleUpdate();
}
void Armature::onExit()
{
Node::onExit();
unscheduleUpdate();
}
void Armature::visit()
{

View File

@ -161,6 +161,9 @@ public:
virtual void update(float dt) override;
virtual void draw() override;
virtual void onEnter() override;
virtual void onExit() override;
virtual const kmMat4& getNodeToParentTransform() const override;
/**
* @js NA