CSpirogrip.h 802 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
/*
 * CSpirogrip.h
 *
 *  Created on: 29 Dez 2012
 *      Author: Gerstrong
 *
 *  This handles the Spirogrips in Galaxy
 */
 
#ifndef CSPIROGRIP_H_
#define CSPIROGRIP_H_

#include <vector>
#include "engine/galaxy/common/ai/CStunnable.h"

namespace galaxy {


class CSpirogrip : public CStunnable
{
public:
	CSpirogrip(CMap *pmap, const Uint16 foeID, const Uint32 x, const Uint32 y);

	/**
	 * Action functions
	 */
Gerhard Stein's avatar
Gerhard Stein committed
27 28 29 30
	void processBackup();	
	void processPause();	
	void processSpin();
	void processMove();
31 32 33 34 35 36 37 38 39 40 41 42
	
	bool isNearby(CSpriteObject &theObject);

	void process();

	/**
	 * What happens if the slug gets touched by another object
	 */
	void getTouchedBy(CSpriteObject &theObject);
	
private:
	int mTimer;
Gerhard Stein's avatar
Gerhard Stein committed
43 44
	direction_t mKeenAlignmentX;
	direction_t mKeenAlignmentY;
45 46 47 48 49
};

}

#endif /* CSPIROGRIP_H_ */