/*
 * Garbage.h
 *
 *  Created on: 2009-07-11
 *      Author: wasyl
 */

#ifndef GARBAGE_H_
#define GARBAGE_H_

#include <allegro5/allegro.h>
#include <allegro5/kcm_audio.h>
#include "../prep/misc/Vector2D.h"
#include "../prep/ent/Entity.h"
#include "../prep/res/Sheet.h"


class Garbage : public Entity
{
protected:
	Sheet *mSprite;
	ALLEGRO_SAMPLE *mSndCollect;

	double mTime;
	int mFrame;

public:
	Garbage();
	~Garbage();

	int *indices()
	{
		static int ind[] = {ID("entt"), ID("rndr"), ID("dyna"), ID("posi"), ID("loos"), 0};
		return ind;
	}

	int order(int index)
	{
		if (index == ID("rndr"))
			return 40;
		else
			return (int)this;
	}

	void update(double dt);
	void render();

	Entity *clone() { return new Garbage(); };
	const char *code() { return "lg"; };
	std::string edString() { return "loose garbage"; }
};

#endif /* GARGarbageE_H_ */
