25 #ifndef FREESCAPE_SENSOR_H 26 #define FREESCAPE_SENSOR_H 28 #include "freescape/area.h" 29 #include "freescape/objects/object.h" 30 #include "freescape/language/instruction.h" 38 const Math::Vector3d &origin_,
39 const Math::Vector3d &rotation_,
56 virtual ~
Sensor() {
delete _colours; }
57 bool isDrawable()
override {
return true; }
58 bool isPlanar()
override {
return true; }
59 bool isShooting() {
return _isShooting; }
60 void scale(
int factor)
override { _origin = _origin / factor; };
61 Object *duplicate()
override;
63 ObjectType getType()
override {
return kSensorType; };
64 Math::Vector3d getRotation() {
return _rotation; }
65 void shouldShoot(
bool shooting) { _isShooting = shooting; }
69 bool playerDetected(
const Math::Vector3d &position,
Area *area);
77 #endif // FREESCAPE_SENSOR_H