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

#ifndef SPIKES_H_
#define SPIKES_H_

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

class Spikes : public Entity
{
protected:
	Sheet *mSprite;

public:
	Spikes();
	~Spikes();

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

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

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

	Entity *clone() { return new Spikes(); };
	const char *code() { return "sp"; };
	std::string edString() { return "spikes"; }
};

#endif /* SPIKES_H_ */
