Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

dialogue classes added

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    /**
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}
Note: See TracBrowser for help on using the repository browser.