Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 11, 2017, 3:04:50 PM (8 years ago)
Author:
rrogge
Message:

Singletonkram figured out

Location:
code/branches/Dialogue_FS17/src/modules/dialogue
Files:
3 edited

Legend:

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

    r11413 r11415  
    66#include "network/Host.h"
    77#include "network/NetworkFunctionIncludes.h"
    8 #include "DialogueManager.h"
    98#include "DialoguePrereqs.h"
    109#include <vector>
    1110#include <string>
    1211#include "core/XMLPort.h"
     12#include "NextQuestion.h"
    1313
    1414
    1515namespace orxonox {
    16         //ManageScopedSingleton(DialogueManager, ScopeID::ROOT, false);
    17         RegisterAbstractClass(DialogueManager).inheritsFrom<BaseObject>();
     16        ManageScopedSingleton(DialogueManager, ScopeID::ROOT, false);
     17       
    1818
     19        //DialogueManager* DialogueManager::singletonPtr_s =nullptr;
    1920
    20 
    21         DialogueManager* DialogueManager::singletonPtr_s =nullptr;
    22 
    23         DialogueManager::DialogueManager(Context* context): BaseObject(context){
     21        DialogueManager::DialogueManager(){
    2422                orxout() << "Dialog Konstruktor" << endl;
    25                 RegisterObject(DialogueManager);
     23                //RegisterObject(DialogueManager);
    2624               
    2725               
     
    6664        bool DialogueManager::a1clicked(void){
    6765                orxout() << "a1 clicked" << endl;
     66
    6867                return true;
    6968        }
  • code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.h

    r11413 r11415  
    1616
    1717
     18
     19
    1820namespace orxonox //tolua_export
    1921
    2022{//tolua_export
    2123        class _OrxonoxExport DialogueManager //tolua_export
    22         : public Singleton<DialogueManager>, public BaseObject
     24        : public Singleton<DialogueManager>
    2325        {//tolua_export
    2426                friend class Singleton<DialogueManager>;
     
    2729               
    2830
    29                 DialogueManager(Context* context);
     31                DialogueManager();
    3032               
    3133
     
    5658*/
    5759private:
     60        //NextQuestion currentQuestion;
    5861        std::string a1;
    5962        std::string a2;
  • code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.cc

    r11413 r11415  
    1717        RegisterObject(NextQuestion);
    1818        orxout() << "Klasse aufgerufen" << endl;
    19          DialogueManager* d = new DialogueManager(context);
     19       
    2020       
    2121    }
     
    109109        }
    110110
    111         NextQuestion NextQuestion::compare(){
     111
     112        /*NextQuestion NextQuestion::compare(){
    112113                DialogueManager& m = DialogueManager::getInstance();
    113114                if(m.a1clicked()){
     
    118119                        return *possibleQuestions[1];
    119120                }
    120         }
     121        }*/
    121122
    122123
Note: See TracChangeset for help on using the changeset viewer.