Question: c++, how would I update the objects in this? void Scene::insertGameObject(std::unique_ptr& object) { _gameObjects.push_back(std::move(object)); } void Scene::Update(double deltaTime) { // TODO: update objects in the

c++, how would I update the objects in this?

void Scene::insertGameObject(std::unique_ptr& object)

{

_gameObjects.push_back(std::move(object));

}

void Scene::Update(double deltaTime)

{

// TODO: update objects in the scene

}

void Scene::Draw(ID2D1HwndRenderTarget & target)

{

for (auto& object : _gameObjects)

{

const auto& renderer = object->getRenderer();

renderer.Render(target, object->getLocation());

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!