Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 30, 2017, 3:35:25 PM (6 years ago)
Author:
kuchlert
Message:

funktioniert bis dialogmanager getInstance, angefangen und noch zu tun: luafunktionen von dialogmanager, lua und layout

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Dialog_HS17/src/modules/dialog/DialogManager.cc

    r11611 r11612  
    22#include "core/CoreIncludes.h"
    33#include "core/singleton/ScopedSingletonIncludes.h"
     4#include <string>
    45
    5 namespace orxonox
    6 {
    7     ManageScopedSingleton(DialogManager, ScopeID::ROOT, false);
     6namespace orxonox {
     7        ManageScopedSingleton(DialogManager, ScopeID::ROOT, false);
     8       
    89
    9     RegisterAbstractClass(DialogManager).inheritsFrom<Listable>();
     10       
     11        DialogManager::DialogManager()
     12        {
     13                this->currentTalk_ = nullptr;
     14        }
    1015
    11     DialogManager::DialogManager()
    12     {
    13         RegisterObject(DialogManager);
    14 
    15         this->currentTalk_ = NULL;
    16     }
    17 
    18     void DialogManager::setDialog(Dialog* dialog)
     16        void DialogManager::setDialog(Dialog* dialog)
    1917        {
    2018                this->currentTalk_ = dialog;   
    2119        }
    2220
    23         const Dialog* DialogManager::getCurrentDialog()
    24         {
    25                 return this->currentTalk_;
    26         }
    27        
    28         bool DialogManager::empty()
    29         {
    30                 if(this->currentTalk_ == NULL)
    31                 {
    32                         return true;
    33                 }
    34                 else
    35                 {
    36                         return false;
    37                 }
    38         }
     21        //from here onward funcionality for lua axports
     22
     23    std::string DialogManager::getQuestion()
     24    {
     25        return this->currentTalk_->getQuestionString();
     26    }
     27
     28    /*
     29    std::vector<std::string> DialogManager::getAnswers()
     30    {
     31        // lua hat komisch arrays (eigentlich tables), wie implementiert man answers so das man nacher den key der gegeben antwort a
     32        // hat um ihn fuer update zu benutzen?
     33    }
     34        */
    3935}
Note: See TracChangeset for help on using the changeset viewer.