Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 13, 2017, 3:47:48 PM (7 years ago)
Author:
rrogge
Message:

zeigt PickupInventory an

File:
1 edited

Legend:

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

    r11393 r11401  
    11#include <vector>
    22#include <string>
     3#include "core/CoreIncludes.h"
     4#include "core/GUIManager.h"
     5
    36
    47#include "NextQuestion.h"
     
    912        RegisterClass(NextQuestion);
    1013
    11         vector<NextQuestion> nextquestion;
     14        NextQuestion::NextQuestion(Context* context) : BaseObject(context)
     15    {
     16        RegisterObject(NextQuestion);
     17        orxout() << "Klasse aufgerufen" << endl;
    1218
    13         void NextQuestion::setanswers(std::string option1, std::string option2, std::string option3){
     19    }
     20
     21        void NextQuestion::setquestion(std::string question){
     22                question=question;
     23        }
     24
     25        std::string NextQuestion::getquestion(void){
     26                return question;
     27        }
     28
     29       
     30        //
     31
     32       
     33        //XML and Event shit
     34        void NextQuestion::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     35    {
     36        SUPER(NextQuestion, XMLPort, xmlelement, mode);
     37
     38        XMLPortParam(NextQuestion, "question", setquestion, getquestion, xmlelement, mode);
     39    }
     40        bool NextQuestion::execute(bool bTriggered, BaseObject* trigger)
     41    { 
     42        //if(!bTriggered) return false;
     43       
     44       
     45
     46
     47        orxout() << "bTriggered is " << bTriggered << endl;
     48
     49        for (DialogueManager* hud : ObjectList<DialogueManager>())
     50            m = hud;
     51        m->setquestion(question);
     52        //orxout() << " 1 " << mystring << endl;
     53        return false;
     54    }
     55
     56    void NextQuestion::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
     57    {
     58        SUPER(NextQuestion, XMLEventPort, xmlelement, mode);
     59
     60        XMLPortEventSink(NextQuestion, BaseObject, "execute", execute, xmlelement, mode);
     61    }
     62        /*void NextQuestion::setanswers(std::string option1, std::string option2, std::string option3){
    1463                options.at(0)=option1;
    1564                options.at(1)=option2;
     
    2372        int NextQuestion::getnumOptions(){
    2473                return options.size();
    25         }
     74        }*/
    2675
    2776}
Note: See TracChangeset for help on using the changeset viewer.