mirror of https://github.com/axmolengine/axmol.git
fixed armature update
This commit is contained in:
parent
c096743325
commit
7027587542
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue