修改OpenGl渲染底层之前
This commit is contained in:
@@ -36,6 +36,14 @@ void Chr_Animation::CreateSkinmationBySlot(std::string actionName, std::string s
|
||||
Ani->SetRenderZOrder(Variation.Layer);
|
||||
this->AddChild(Ani);
|
||||
ActionAnis[actionName].push_back(Ani);
|
||||
|
||||
// 构造一下阴影对象
|
||||
RefPtr<Animation> ShadowAni = new Animation(path, FormatImgPath, Data);
|
||||
ShadowAni->SetVisible(false);
|
||||
// 皮肤统一设置阴影
|
||||
ShadowAni->SetShadow();
|
||||
chr_parent->_Shadow->AddChild(ShadowAni);
|
||||
chr_parent->_Shadow->ActionAnis[actionName].push_back(ShadowAni);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -106,11 +114,7 @@ void Chr_Animation::SetAction(std::string actionName)
|
||||
Ani->SetVisible(true);
|
||||
}
|
||||
CurrentActionTag = actionName;
|
||||
}
|
||||
|
||||
void Chr_Animation::Update(float deltaTime)
|
||||
{
|
||||
RenderBase::Update(deltaTime);
|
||||
// SDL_Log("Position %d %d", this->GetTransform().position.x, this->GetTransform().position.y);
|
||||
// SDL_Log("IterPosition %d %d", this->GetIterationTransform().position.x, this->GetIterationTransform().position.y);
|
||||
// 设置阴影的动作
|
||||
chr_parent->_Shadow->SetAction(actionName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user