#include "cWorld.h"

cWorld::cWorld() : 
    staticObjects_(new cStaticTriangleMesh()), 
    particleSystem_(staticObjects_),
    camera_(&ball_) {}
    

cWorld::~cWorld()
{
    delete staticObjects_;
}

void cWorld::update(float dt)
{
    camera_.update(dt);
    particleSystem_.update(dt);
    
    ball_.update(dt , *staticObjects_); 
}

void cWorld::draw()
{
    camera_.look();
    
    staticObjects_->draw();
    
    ball_.draw();
    ball_.drawLaunchArrow();
    
    particleSystem_.draw();
}
