CThunderCloud.h 984 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
/*
 * CThunderCloud.h
 *
 *  Created on: 12.07.2012
 *      Author: gerstong
 */

#ifndef CTHUNDERCLOUD_H_
#define CTHUNDERCLOUD_H_

11
#include "engine/galaxy/common/CGalaxySpriteObject.h"
12 13 14 15

namespace galaxy
{

16 17 18 19

class CThunderBolt: public CGalaxySpriteObject
{
public:
Gerhard Stein's avatar
Gerhard Stein committed
20
    CThunderBolt(CMap *pmap, Uint32 x, Uint32 y, const int sprVar);
21 22 23 24 25 26 27 28
	void getTouchedBy(CSpriteObject &theObject);

	void process();

};



29 30 31
class CThunderCloud: public CGalaxySpriteObject
{
public:
Gerhard Stein's avatar
Gerhard Stein committed
32
    CThunderCloud(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y, const int sprVar);
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49

	void process();

	void setActionForce(const size_t ActionNumber);
	bool isNearby(CSpriteObject &theObject);


private:

	void processAsleep();
	void processWaking();
	void processMoving();
	void processStriking();

	void (CThunderCloud::*mpProcessState)();
	std::map< size_t, void (CThunderCloud::*)() > mActionMap;
	int mTimer;
50
	CThunderBolt *mpBolt;
51
	bool mSecondTry;
52 53
};

54

55 56
} /* namespace galaxy */
#endif /* CTHUNDERCLOUD_H_ */