修改底层渲染为OpenGL
This commit is contained in:
@@ -33,17 +33,17 @@ void Chr_Animation::CreateSkinmationBySlot(std::string actionName, std::string s
|
||||
// 构造好Ani以后 统一设置为不可见 然后放入ActionAnis表
|
||||
RefPtr<Animation> Ani = new Animation(path, FormatImgPath, Data);
|
||||
Ani->SetVisible(false);
|
||||
|
||||
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);
|
||||
// 构造一下阴影对象 //TODO
|
||||
// RefPtr<Animation> ShadowAni = new Animation(path, FormatImgPath, Data);
|
||||
// ShadowAni->SetVisible(false);
|
||||
|
||||
// chr_parent->_Shadow->AddChild(ShadowAni);
|
||||
// chr_parent->_Shadow->ActionAnis[actionName].push_back(ShadowAni);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,7 +82,7 @@ void Chr_Animation::Init(CharacterObject *parent)
|
||||
parent->AddChild(this);
|
||||
chr_parent = parent;
|
||||
GlobalCharacterScript::CharacterConfig Config = Global_Game::GetInstance().CharacterConfigs[parent->Job];
|
||||
|
||||
|
||||
// 遍历所有动作Ani路径
|
||||
for (const auto &pair : Config.animationPath)
|
||||
{
|
||||
@@ -116,5 +116,5 @@ void Chr_Animation::SetAction(std::string actionName)
|
||||
CurrentActionTag = actionName;
|
||||
|
||||
// 设置阴影的动作
|
||||
chr_parent->_Shadow->SetAction(actionName);
|
||||
if(chr_parent->_Shadow)chr_parent->_Shadow->SetAction(actionName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user