Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 8, 2014, 10:16:23 AM (11 years ago)
Author:
smerkli
Message:

Controller switching works now, however lua script
execution is blocking, which means we can only schedule
stuff in them, not leave them running in realtime

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ScriptableController/src/orxonox/controllers/ScriptController.h

    r10046 r10047  
    3838{  // tolua_export
    3939    class _OrxonoxExport ScriptController // tolua_export
    40        : public ArtificialController
     40       : public ArtificialController, public Tickable
    4141    {  // tolua_export
    4242        public:
     
    4848            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    4949           
     50            void takeControl(int ctrlid);
     51            void setPlayer(PlayerInfo* player) { this->player_ = player; }
    5052           
    51             void set_luasrc(std::string);
    52             void set_controlled(ControllableEntity*);
     53            //void set_luasrc(std::string);
     54            //void set_controlled(ControllableEntity*);
    5355
     56            virtual void tick(float dt);
    5457
    5558            // LUA interface
     
    5962           
    6063            static ScriptController* getScriptController();
     64
     65            int getID() { return ctrlid_; }
    6166           
    62               /* virtual void tick(float dt);*/
    6367
    6468            // tolua_end
     
    6670
    6771        private:
    68                 std::string luasrc;             // name of the LUA-sourcefile that shall be executed->see XMLPort-function
    69 
    70             ControllableEntity* controlled; //entity controlled by this SC
     72            // name of the LUA-sourcefile that shall be executed->see XMLPort-function
     73            std::string luasrc;         
     74            PlayerInfo* player_;
     75            ControllableEntity* entity_;
     76            int ctrlid_;
    7177
    7278
Note: See TracChangeset for help on using the changeset viewer.