Last change
on this file since 12386 was
12380,
checked in by rueegseb, 5 years ago
|
laser appears after five pointsphere are eaten
|
File size:
1.2 KB
|
Line | |
---|
1 | #include "PacmanLaser.h" |
---|
2 | |
---|
3 | #include "core/CoreIncludes.h" |
---|
4 | #include "BulletDynamics/Dynamics/btRigidBody.h" |
---|
5 | |
---|
6 | namespace orxonox |
---|
7 | { |
---|
8 | RegisterClass(PacmanLaser); |
---|
9 | |
---|
10 | /** |
---|
11 | @brief |
---|
12 | Constructor. Registers the object and initializes some default values. |
---|
13 | @param creator |
---|
14 | The creator of this object. |
---|
15 | */ |
---|
16 | PacmanLaser::PacmanLaser(Context* context) : ControllableEntity(context) |
---|
17 | { |
---|
18 | RegisterObject(PacmanLaser); |
---|
19 | this->setCollisionType(CollisionType::None); |
---|
20 | } |
---|
21 | |
---|
22 | /** |
---|
23 | @brief |
---|
24 | Destructor. Destroys controller, if present. |
---|
25 | */ |
---|
26 | PacmanLaser::~PacmanLaser() |
---|
27 | { |
---|
28 | // Deletes the controller if the object was initialized and the pointer to the controller is not NULL. |
---|
29 | } |
---|
30 | |
---|
31 | /** |
---|
32 | @brief |
---|
33 | Method for creating a AutonomousDrone through XML. |
---|
34 | */ |
---|
35 | void PacmanLaser::XMLPort(Element& xmlelement, XMLPort::Mode mode) |
---|
36 | { |
---|
37 | SUPER(PacmanLaser, XMLPort, xmlelement, mode); |
---|
38 | } |
---|
39 | |
---|
40 | |
---|
41 | void PacmanLaser::tick(float dt) |
---|
42 | { |
---|
43 | SUPER(PacmanLaser, tick, dt); |
---|
44 | } |
---|
45 | |
---|
46 | void PacmanLaser::resetPacmanLaser(){ |
---|
47 | resetposition = this->getPosition(); |
---|
48 | resetposition.y = -50; |
---|
49 | this->setPosition(resetposition); |
---|
50 | } |
---|
51 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.