#include "box2d/b2_world.h"
#include "nodes/scene.h"
#include "nodes/node.h"
#include "nodes/player.h"

Scene::Scene() {

}

Scene::~Scene() {

}

void Scene::update() {
    //b_world.Step(60.0f, velocityIterations, positionIterations);
    for (Node* node : nodeTree)
    {
        node->update();
    }
}

void Scene::pollInputs() {
    for (Node* node : nodeTree)
    {
        node->pollInputs();
    }
}

void Scene::freeSceneData() {
    for (Node* node : nodeTree)
    {
        node->free();
    }
}

void Scene::appendNode(Node *node) {
    nodeTree.push_back(node);
    node->scene = this;
}

