MeshComponentManager::CreateComponent返回值统一改为Component
This commit is contained in:
parent
090f4576e0
commit
5ee42c2ae2
@ -50,7 +50,7 @@ public:
|
||||
|
||||
Component *CreateComponent(ComponentDataPtr cdp) override;
|
||||
|
||||
MeshComponent *CreateComponent(Mesh *);
|
||||
Component *CreateComponent(Mesh *);
|
||||
};//class MeshComponentManager
|
||||
|
||||
class MeshComponent:public RenderComponent
|
||||
|
@ -214,7 +214,7 @@ public: //Component 相关
|
||||
return(nullptr);
|
||||
}
|
||||
|
||||
return manager->CreateComponent(args...); //创建组件
|
||||
return (C *)(manager->CreateComponent(args...)); //创建组件
|
||||
}
|
||||
|
||||
template<typename C,typename ...ARGS>
|
||||
|
@ -30,11 +30,11 @@ Component *MeshComponentManager::CreateComponent(ComponentDataPtr cdp)
|
||||
return(new MeshComponent(cdp,this));
|
||||
}
|
||||
|
||||
MeshComponent *MeshComponentManager::CreateComponent(Mesh *m)
|
||||
Component *MeshComponentManager::CreateComponent(Mesh *m)
|
||||
{
|
||||
ComponentDataPtr cdp=new MeshComponentData(m);
|
||||
|
||||
return dynamic_cast<MeshComponent *>(CreateComponent(cdp));
|
||||
return CreateComponent(cdp);
|
||||
}
|
||||
|
||||
COMPONENT_NAMESPACE_END
|
||||
|
Loading…
x
Reference in New Issue
Block a user