#ifndef CARSOURCE_H_
#define CARSOURCE_H_

#include "../config.h"
#include "../iface/Animated.h"
#include "SimulationObject.h"
#include "Sector.h"

class CarSource: public SimulationObject, public Animated {
public:
	CarSource(Sector* sector, CarType carType, const Vector3r &pos, const dReal dir, unsigned limit, unsigned wait);
	virtual ~CarSource();
	
	virtual void initialize();
	virtual void computeStep();
	virtual void performStep();
	
	virtual std::string toString() const;
	
private:
	Sector* _sector;
	CarType _carType;
	Vector3r _pos;
	dReal _dir;
	unsigned _limit;
	unsigned _wait;
	unsigned _timer;
};

#endif /*CARSOURCE_H_*/
