@@ -12,12 +12,14 @@
#ifndef SCRIPT_INSTANCE_HPP
#define SCRIPT_INSTANCE_HPP
#include <squirrel.h>
#include "script_suspend.hpp"
#include "../command_type.h"
/** Runtime information about a script like a pointer to the squirrel vm and the current state. */
class ScriptInstance {
public:
friend class ScriptObject;
friend class ScriptController;
@@ -152,12 +154,17 @@ protected:
/**
* Tell the script it died.
*/
virtual void Died();
* Get the callback handling DoCommands in case of networking.
virtual CommandCallback *GetDoCommandCallback() = 0;
private:
class ScriptController *controller; ///< The script main class.
class ScriptStorage *storage; ///< Some global information for each running script.
SQObject *instance; ///< Squirrel-pointer to the script main class.
bool is_started; ///< Is the scripts constructor executed?