Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/HUD_HS16/src/modules/pickup/DDDialogue.cc @ 11663

Last change on this file since 11663 was 11499, checked in by patricwi, 7 years ago

reset back in time

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