Last change
on this file since 10012 was
10009,
checked in by mkronig, 11 years ago
|
edited comments in levelTry.oxw file and scriptableController_00.cc
|
File size:
1.1 KB
|
Line | |
---|
1 | /* |
---|
2 | First try of a scriptController. Target: An event occurs in the levelTry.oxw file, which is "heard" by an object of the type of this class. It then SHOULD (because it is not working) execute the party function. |
---|
3 | */ |
---|
4 | |
---|
5 | #include "ScriptController_00.h" |
---|
6 | #include "core/CoreIncludes.h" |
---|
7 | |
---|
8 | namespace orxonox |
---|
9 | { |
---|
10 | RegisterClass(ScriptController_00); |
---|
11 | |
---|
12 | ScriptController_00::ScriptController_00(Context* context) : ArtificialController(context) |
---|
13 | { |
---|
14 | //Working |
---|
15 | RegisterObject(ScriptController_00); |
---|
16 | orxout()<<"hello universe constructor"<< endl; |
---|
17 | } |
---|
18 | |
---|
19 | bool ScriptController_00::party(bool bTriggered, BaseObject* trigger) |
---|
20 | { |
---|
21 | //XMLPortEventSink seems not to execute the party function |
---|
22 | orxout()<<"hello universe party"<< endl; |
---|
23 | return true; |
---|
24 | } |
---|
25 | |
---|
26 | |
---|
27 | void ScriptController_00::XMLPort(Element& xmlelement, XMLPort::Mode mode) |
---|
28 | { |
---|
29 | SUPER(ScriptController_00, XMLPort, xmlelement, mode); |
---|
30 | |
---|
31 | //WORKING |
---|
32 | XMLPortEventSink(ScriptController_00, BaseObject, "party", party, xmlelement, mode); |
---|
33 | orxout()<<"hello universe xmlport"<< endl; |
---|
34 | } |
---|
35 | |
---|
36 | |
---|
37 | |
---|
38 | |
---|
39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.