Changeset 11377 for code/branches
- Timestamp:
- Mar 23, 2017, 3:51:57 PM (8 years ago)
- Location:
- code/branches/Dialogue_FS17
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Dialogue_FS17/data/levels/emptyLevel.oxw
r11371 r11377 23 23 </templates> 24 24 <?lua include("includes/notifications.oxi") ?> 25 25 26 26 27 <Scene … … 28 29 skybox = "Orxonox/Starbox" 29 30 > 30 <DialogueManager question="Wazzup ?" option1="Nothing" option2="Dunno" option3="Do you like fish?">31 <DialogueManager question="Wazzup"> 31 32 </DialogueManager> 32 33 <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/> -
code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc
r11371 r11377 11 11 RegisterClass(DialogueManager); 12 12 13 DialogueManager::DialogueManager() {13 DialogueManager::DialogueManager(): OrxonoxOverlay(context){ 14 14 RegisterObject(DialogueManager); 15 16 } 17 ~DialogueManager(){} 18 19 std::string setnpc(std::string npc){ 20 return npc; 15 21 } 16 22 17 std::string[]setquestion(std::string question){18 returnquestion;23 void setquestion(std::string question){ 24 this->question=question; 19 25 } 20 26 21 std::string[] setanswers(std::string option1, std::string option2, std::string option3){ 27 std::string getquestion(void){ 28 return this->question; 29 } 30 31 void setanswers(std::string option1, std::string option2, std::string option3){ 22 32 option[0]=option1; 23 33 option[1]=option2; 24 34 option[2]=option3; 25 return options;26 35 } 36 37 std::string[] getanswers(void){ 38 return option[]; 39 } 40 41 int getnumOptions(options){ 42 return options.length(); 43 } 44 45 void DialogueManager::XMLPort(Element& xmlelement, XMLPort::Mode mode) 46 { 47 SUPER(DialogueManager, XMLPort, xmlelement, mode); 48 49 XMLPortParam(DialogueManager, "question", setquestion, getquestion, xmlelement, mode); 50 } 27 51 } -
code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.h
r11371 r11377 11 11 DialogueManager::DialogueManager(); 12 12 ~DialogueManager(); 13 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 14 13 15 public: 14 std::string[] setquestion(std::string question); 15 std::string[] setanswers(std::string option1, std::string option2, std::string option3); 16 void setquestion(std::string question); 17 std::string getquestion(void); 18 std::string setnpc(std::string npc); 19 void setanswers(std::string option1, std::string option2, std::string option3); 20 std::string[] getanswers(void); 21 int getnumOptions(options); 22 23 16 24 std::string question; 25 std::string npc; 17 26 std::string[] options; 27 18 28 19 29
Note: See TracChangeset
for help on using the changeset viewer.