PGE Engine
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
lvl_dtc_inarea.h
1 #ifndef PLAYERINAREADETECTOR_H
2 #define PLAYERINAREADETECTOR_H
3 
4 #include "lvl_base_detector.h"
5 #include <common_features/rectf.h>
6 #include <QHash>
7 
9 {
10 public:
11  enum Filters
12  {
13  F_BLOCK= 1,
14  F_BGO= 2,
15  F_NPC= 4,
16  F_PLAYER= 8
17  };
18  InAreaDetector(LVL_Npc * parent, PGE_RectF range, int filters);
19  InAreaDetector(const InAreaDetector &dtc);
20  ~InAreaDetector();
21  void processDetector();
22  bool detected();
23  bool detected(long type, long ID);
24  int contacts();
25 
26 private:
27  QHash<int, int > detectedPLR;
28  QHash<int, int > detectedBLK;
29  QHash<int, int > detectedBGO;
30  QHash<int, int > detectedNPC;
31  int _filters;
32  int _contacts;
33  PGE_RectF _srcTrapZone;
34  PGE_RectF _trapZone;
35 };
36 
37 #endif // PLAYERINAREADETECTOR_H
Definition: lvl_dtc_inarea.h:8
Definition: lvl_base_detector.h:23
Definition: rectf.h:26
Definition: lvl_npc.h:21