Move script name to type.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -16,11 +16,13 @@ private:
|
||||
asIScriptObject* _obj = nullptr;
|
||||
|
||||
public:
|
||||
AngelScriptScript(const std::string& name, AngelScriptTypeInfo* type, asIScriptObject* obj, ContextPool* ctxPool)
|
||||
: PkmnLib::Battling::PkmnScript(name), _type(type), _ctxPool(ctxPool), _obj(obj) {}
|
||||
AngelScriptScript(AngelScriptTypeInfo* type, asIScriptObject* obj, ContextPool* ctxPool)
|
||||
: _type(type), _ctxPool(ctxPool), _obj(obj) {}
|
||||
|
||||
~AngelScriptScript() override { _obj->Release(); }
|
||||
|
||||
[[nodiscard]] const std::string& GetName() const override { return _type->GetName(); }
|
||||
|
||||
asIScriptFunction* PrepareMethod(const char* name, asIScriptContext* ctx) {
|
||||
auto func = _type->GetFunction(name);
|
||||
ctx->Prepare(func);
|
||||
|
||||
Reference in New Issue
Block a user