| 34 | */ |
| 35 | template <typename Func> |
| 36 | void DefSQMethod(Squirrel &engine, Func function_proc, std::string_view function_name, std::string_view params = {}) |
| 37 | { |
| 38 | using namespace SQConvert; |
| 39 | engine.AddMethod(function_name, DefSQNonStaticCallback<CL, Func, ST>, params, &function_proc, sizeof(function_proc)); |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * This defines a method inside a class for Squirrel, which has access to the 'engine' (experts only!). |