bluecore/engine/ScriptSystem.h

41 linhas
891 B
C++

#ifndef BLUECORE_SCRIPT_SYSTEM_H
#define BLUECORE_SCRIPT_SYSTEM_H
// system includes
#include <vector>
#include <string>
// library includes
#include "squirrel.h"
// project includes
#include "Utilities/Referenced.h"
namespace BlueCore{
class ScriptSystem : public Referenced
{
HSQUIRRELVM _VM;
std::vector<std::string> _LoadedScripts;
public:
ScriptSystem();
~ScriptSystem();
HSQUIRRELVM getVM();
bool executeScript(const std::string &filename);
bool loadScript(const std::string &filename);
void callFunction(const std::string &name);
void callFunction(const std::string &name, double value);
void callFunction(const std::string &name, double value1, double value2);
void callFunction(const std::string &name, double value1, double value2, double value3);
};
} // namespace BlueCore
#endif