simplified component manager, removed ref type

This commit is contained in:
turanszkij
2018-09-01 16:16:46 +01:00
parent dcfdcc883a
commit 48256ca39e
8 changed files with 80 additions and 183 deletions
+2 -3
View File
@@ -1082,11 +1082,10 @@ void EditorComponent::Update(float dt)
else
{
// Orbital Camera
auto parented = scene.parents.Find(wiRenderer::getCameraID());
ParentComponent* parented = scene.parents.GetComponent(wiRenderer::getCameraID());
TransformComponent* target_transform = scene.transforms.GetComponent(cameraWnd->target);
if (!parented)
if (parented == nullptr)
{
//cam->attachTo(cameraWnd->orbitalCamTarget);
scene.Component_Attach(wiRenderer::getCameraID(), cameraWnd->target);