1 | |
---|
2 | #include "DDDialogue.h" |
---|
3 | #include "core/XMLPort.h" |
---|
4 | |
---|
5 | |
---|
6 | namespace orxonox |
---|
7 | { |
---|
8 | |
---|
9 | RegisterClass(DDDialogue); |
---|
10 | |
---|
11 | |
---|
12 | /** |
---|
13 | @brief |
---|
14 | Constructor. Registers and initializes the object. |
---|
15 | */ |
---|
16 | DDDialogue::DDDialogue(Context* context) : BaseObject(context) |
---|
17 | { |
---|
18 | RegisterObject(DDDialogue); |
---|
19 | } |
---|
20 | |
---|
21 | //getResponses |
---|
22 | |
---|
23 | bool DDDialogue::execute(bool bTriggered, BaseObject* trigger) |
---|
24 | { |
---|
25 | if(!bTriggered) return false; |
---|
26 | |
---|
27 | |
---|
28 | |
---|
29 | orxout() << "bTriggered is " << bTriggered; |
---|
30 | orxout() << " 1 " << mystring << endl; |
---|
31 | return false; |
---|
32 | } |
---|
33 | |
---|
34 | /** |
---|
35 | @brief |
---|
36 | Method for creating a Pickup object through XML. |
---|
37 | */ |
---|
38 | void DDDialogue::XMLPort(Element& xmlelement, XMLPort::Mode mode) |
---|
39 | { |
---|
40 | SUPER(DDDialogue, XMLPort, xmlelement, mode); |
---|
41 | |
---|
42 | XMLPortParam(DDDialogue, "string", setString, getString, xmlelement, mode); |
---|
43 | } |
---|
44 | |
---|
45 | void DDDialogue::XMLEventPort(Element& xmlelement, XMLPort::Mode mode) |
---|
46 | { |
---|
47 | SUPER(DDDialogue, XMLEventPort, xmlelement, mode); |
---|
48 | |
---|
49 | XMLPortEventSink(DDDialogue, BaseObject, "execute", execute, xmlelement, mode); |
---|
50 | } |
---|
51 | |
---|
52 | |
---|
53 | } |
---|