Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 26, 2017, 3:40:04 PM (7 years ago)
Author:
rrogge
Message:

Code aufgeraeumt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc

    r11432 r11435  
    1818       
    1919
    20         //DialogueManager* DialogueManager::singletonPtr_s =nullptr;
    21 
    22         DialogueManager::DialogueManager(){
    23                 orxout() << "Dialog Konstruktor" << endl;
    24                 //RegisterObject(DialogueManager);
    25                
    26         }
     20       
     21        DialogueManager::DialogueManager(){}
    2722       
    2823
    29         /**
    30      * @brief set the config values in the orxonox.ini file
    31      */
     24       
    3225   
    3326
     
    3528                if(allQuestions.size()==0) {
    3629                        orxout(internal_info) << "At least one NextQuestion has to be set." << endl;
    37                 } else  {
    38                         currentQuestion = allQuestions[0];
    39                 }
     30                }
    4031                allQuestions.push_back(nq);
    4132                        orxout(internal_info) << "qsize " << allQuestions.size();
     
    5344
    5445        std::string DialogueManager::getquestion(void){
    55                 orxout() << question << endl;
    5646                return question;
    5747        }
     48
    5849        void DialogueManager::setanswers1(std::string a1){
    59                 orxout() << "setanswers1" << endl;
    6050                this->a1=a1;
    61                 orxout() << "A1 is " << a1;
    6251                                }
    6352
     
    6958
    7059        std::string DialogueManager::getanswers1(void){
    71                 orxout() << "getanswers1" << endl;
    7260                return a1;
    7361        }
     
    7664                return a2;
    7765        }
     66
    7867        void DialogueManager::a1clicked(void){
    79                
    8068               
    8169                currentQuestion = currentQuestion->possibleQuestions[0];
     
    8573        }
    8674        void DialogueManager::a2clicked(void){
    87                 orxout() << "a2 clicked" << endl;
    88 
     75               
    8976                currentQuestion = currentQuestion->possibleQuestions[1];
    9077                update(currentQuestion);
     78        }
    9179
    92                
    93         }
    9480         void DialogueManager::update(NextQuestion* nq){
    9581                this->setquestion(nq->getquestion());
    9682                this->setanswers1(nq->getanswers1());
    9783                this->setanswers2(nq->getanswers2());
    98                 depth=depth+1;
    99                
    100                
    10184         }
    102         void DialogueManager::clean(){
    103                 orxout() <<" depth " << depth << endl;
    104                 //allQuestions.at(2*depth+1);
    105         }
     85
    10686        bool DialogueManager::theEnd(){
    10787        if((currentQuestion->possibleQuestions).empty()) {
    108                 orxout() << "endtrue" << endl;
    10988                return true;}
    11089        else return false;
    11190        }
    11291
    113        
    114 
    115         /*
    116        
    117        
    118        
    119 
    120        
    121         vector<std::string> DialogueManager::getanswers(void){
    122                 return options;
    123         }
    124 
    125         int DialogueManager::getnumOptions(){
    126                 return options.size();
    127         }
    128 
    129         */
    13092}
Note: See TracChangeset for help on using the changeset viewer.