Emergency 20 Dokumentation  4.2.0
RandomMovementComponent.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
13 #include "em5/Export.h"
14 
16 
17 
18 //[-------------------------------------------------------]
19 //[ Namespace ]
20 //[-------------------------------------------------------]
21 namespace em5
22 {
23 
24 
25  //[-------------------------------------------------------]
26  //[ Classes ]
27  //[-------------------------------------------------------]
33  {
34 
35 
36  //[-------------------------------------------------------]
37  //[ Public definitions ]
38  //[-------------------------------------------------------]
39  public:
40  static const uint32 COMPONENT_ID;
41 
42 
43  //[-------------------------------------------------------]
44  //[ Public methods ]
45  //[-------------------------------------------------------]
46  public:
47  explicit RandomMovementComponent(qsf::Prototype* prototype);
48  virtual ~RandomMovementComponent();
49 
50 
51  //[-----------------------------------------------------------]
52  //[ Public virtual qsf::game::RandomMovementComponent methods ]
53  //[-----------------------------------------------------------]
54  public:
55  virtual bool onUpdateSimulation() override;
56 
57 
58  //[-------------------------------------------------------]
59  //[ Protected virtual qsf::game::RandomMovementComponent methods ]
60  //[-------------------------------------------------------]
61  protected:
62  virtual void pushMoveAction(qsf::ActionComponent& actionComponent, qsf::logic::TargetPoint& moveTargetPoint) override;
63 
64 
65  //[-------------------------------------------------------]
66  //[ CAMP reflection system ]
67  //[-------------------------------------------------------]
68  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
69 
70 
71  };
72 
73 
74 //[-------------------------------------------------------]
75 //[ Namespace ]
76 //[-------------------------------------------------------]
77 } // em5
78 
79 
80 //[-------------------------------------------------------]
81 //[ CAMP reflection system ]
82 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
A target point is a spatial configuration that allows an interaction between two entities. Since a target point is relative to the interacting as well as the interacted on entity it can be dynamic and is often invalidated as soon as one of the entities moves. Simple class that is copyable via the default mechanisms and public members because it is only a tiny data collection.
Definition: TargetPoint.h:39
unsigned int uint32
Definition: PlatformTypes.h:181
A component to trigger a random movement every time the entity is idle. A movement towards a static r...
Definition: RandomMovementComponent.h:55
#define EM5_API_EXPORT
Definition: Export.h:28
#define QSF_CAMP_RTTI()
Only adds the virtual method "campClassId()", nothing more.
Definition: CampClass.h:75
static const uint32 COMPONENT_ID
"em5::RandomMovementComponent" unique component ID
Definition: RandomMovementComponent.h:40
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
Action component.
Definition: ActionComponent.h:47
EMERGENCY 5 random movement component class.
Definition: RandomMovementComponent.h:32
Prototype class.
Definition: Prototype.h:100