blob: 8b0827407e69cd163655c905b34f013fd05179fc (
plain)
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
27
28
|
#ifndef PLAYERSTART_H_
#define PLAYERSTART_H_
#include "LevelObject.h"
#include "Vertex3d.h"
class PlayerStart : public Vertex3d, public LevelObject {
public:
virtual bool hit(const Vertex &v) const {
return (v.distanceSq(Vertex(getX(), getZ())) < 0.09);
}
virtual int getPriority() const {return 10;}
virtual const char* getType() const {
return "PlayerStart";
}
virtual bool canMove() const {return true;}
virtual void move(float x, float y) {
setX(getX()+x);
setZ(getZ()+y);
}
};
#endif /*PLAYERSTART_H_*/
|