Exemplo n.º 1
0
void RDirNode::logic(float dt) {

    //move
    move(dt);
    updateSplinePoint(dt);

    //update node normal
    if(parent != 0) {
        node_normal = normalise(pos - parent->getPos());
    }

    //update files
     for(std::list<RFile*>::iterator it = files.begin(); it!=files.end(); it++) {
         RFile* f = *it;

         f->logic(dt);
     }

    //update child nodes
    for(std::list<RDirNode*>::iterator it = children.begin(); it != children.end(); it++) {
        RDirNode* node = (*it);

        node->logic(dt);
    }

    //update colour
    calcColour();

    //update tickers
    if(visible) since_node_visible += dt;

    since_last_file_change += dt;
    since_last_node_change += dt;
}