Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11432 for code


Ignore:
Timestamp:
May 18, 2017, 5:05:53 PM (8 years ago)
Author:
rrogge
Message:

Reload works now

Location:
code/branches/Dialogue_FS17
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Dialogue_FS17/data/gui/scripts/Dialogue.lua

    r11428 r11432  
    128128
    129129function P.cleanup(destroyDetails)
     130   
    130131    if P.wrapper ~= nil then
    131132        winMgr:destroyWindow(P.wrapper)
     
    141142        end
    142143    end
     144    orxonox.DialogueManager:getInstance():clean()
    143145end
    144146
  • code/branches/Dialogue_FS17/data/levels/events.oxw

    r11417 r11432  
    6363     <possibleQuestions>
    6464        <NextQuestion  question="Are you sure?" a1="yep let me continue" a2="no actually not" />
    65         <NextQuestion  question="Why?" a1="Got a dentist's appointment" a2="this sucks" />
     65        <NextQuestion  question="Why?" a1="Got a dentist's appointment" a2="this sucks" >
     66        <possibleQuestions>
     67          <NextQuestion  question="Are your teeth that bad mate?" a1="yep" a2="leave me alone godammit" />
     68          <NextQuestion  question="You suck" a1="..." a2="Im going now okay" />
     69        </possibleQuestions>
     70      </NextQuestion>
    6671      </possibleQuestions>   
    6772      <events>
  • code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc

    r11428 r11432  
    4747               
    4848        }
     49        void DialogueManager::setCurrentQuestion(NextQuestion* nq){
     50                currentQuestion=nq;
     51               
     52        }
    4953
    5054        std::string DialogueManager::getquestion(void){
     
    9296                this->setanswers1(nq->getanswers1());
    9397                this->setanswers2(nq->getanswers2());
     98                depth=depth+1;
     99               
     100               
    94101         }
    95 
     102        void DialogueManager::clean(){
     103                orxout() <<" depth " << depth << endl;
     104                //allQuestions.at(2*depth+1);
     105        }
    96106        bool DialogueManager::theEnd(){
    97107        if((currentQuestion->possibleQuestions).empty()) {
  • code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.h

    r11428 r11432  
    5050                bool theEnd(); //tolua_export
    5151                void update(NextQuestion* nq);
     52                void clean(); //tolua_export
     53                void setCurrentQuestion(NextQuestion* q);
    5254
    5355private:
     
    5759        std::string a2;
    5860        std::string question;
     61        int depth = 0;
    5962        static DialogueManager* singletonPtr_s;
    6063
  • code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.cc

    r11428 r11432  
    7777               
    7878        m.setquestion(question);
     79        m.setCurrentQuestion(this);
    7980        m.setanswers1(a1);
    8081        m.setanswers2(a2);
  • code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.h

    r11421 r11432  
    4949                std::string a1;
    5050                std::string a2;
    51                
     51       
    5252
    5353
Note: See TracChangeset for help on using the changeset viewer.