#include "Coin.h"
#include "WorldManager.h"
#include "Event.h"

Coin::Coin(){
	//this->setSprite(new Sprite(1));
	Event* e=&Event();
	e->setType("coin_create");
	WorldManager::getInstance().onEvent(e);
}
Coin::~Coin(){}
void Coin::move(int dx,int dy){
	this->setPos(Position(this->getPos().getX()+dx,this->getPos().getY()+dy));
}
void Coin::step(){}
int Coin::eventHandler(Event *e){
	if (e->getType() == "step") {
		//step();
		draw();
		return 1;
	}
	return 0;
}
