Changeset 11071 for code/trunk/src/modules/objects/Script.h
- Timestamp:
- Jan 17, 2016, 10:29:21 PM (9 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/modules/objects/Script.h
r9667 r11071 51 51 @brief The mode a specific @ref orxonox::Script "Script" is in. 52 52 */ 53 namespaceScriptMode53 enum class ScriptMode 54 54 { 55 enum Value 56 { 57 normal, //!< The @ref orxonox::Script "Scripts'" code is executed through the @ref orxonox::CommandExecutor "CommandExecutor". 58 lua //!< The @ref orxonox::Script "Scripts'" code is executed through lua. 59 }; 60 } 55 normal, //!< The @ref orxonox::Script "Scripts'" code is executed through the @ref orxonox::CommandExecutor "CommandExecutor". 56 lua //!< The @ref orxonox::Script "Scripts'" code is executed through lua. 57 }; 61 58 62 59 /** … … 98 95 virtual ~Script(); 99 96 100 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) ; //!< Method for creating a Script object through XML.101 virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) ; //!< Creates a port that can be used to channel events and react to them.97 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a Script object through XML. 98 virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Creates a port that can be used to channel events and react to them. 102 99 103 100 bool trigger(bool triggered, BaseObject* trigger); //!< Is called when an event comes in trough the event port. … … 168 165 { return this->forAll_; } 169 166 170 virtual void clientConnected(unsigned int clientId) ; //!< Callback that is called when a new client has connected.171 virtual void clientDisconnected(unsigned int clientid) {}167 virtual void clientConnected(unsigned int clientId) override; //!< Callback that is called when a new client has connected. 168 virtual void clientDisconnected(unsigned int clientid) override {} 172 169 173 170 private: … … 178 175 179 176 std::string code_; //!< The code that is executed by this Script. 180 ScriptMode ::Valuemode_; //!< The mode the Script is in. Determines whether the code is executed the normal way or in lua.177 ScriptMode mode_; //!< The mode the Script is in. Determines whether the code is executed the normal way or in lua. 181 178 std::string modeStr_; //!< The mode the Script is in, as a string. Is used for networking purposes. 182 179 bool onLoad_; //!< Whether the Scripts code is executed upon loading (creation) of this Script. … … 193 190 @param mode The mode of the Script. 194 191 */ 195 inline void setMode(ScriptMode ::Valuemode)192 inline void setMode(ScriptMode mode) 196 193 { this->mode_ = mode; } 197 194 };
Note: See TracChangeset
for help on using the changeset viewer.