blob: e06301555ec4daae9f1c44bcd86be20b21afd5ec (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#pragma once
#include "SquirrelBindings.h"
#include "../cPlugin_Squirrel.h"
#include "../cPluginManager.h"
#include "cRoot.h"
//The baseclass for squirrel plugins
class cSquirrelBaseClass
{
public:
cSquirrelBaseClass()
: m_Instance(0)
{
}
void setInstance(cPlugin_Squirrel *a_Instance)
{
m_Instance = a_Instance;
}
void AddHook(short a_Hook)
{
if(m_Instance)
cRoot::Get()->GetPluginManager()->AddHook(m_Instance, (cPluginManager::PluginHook) a_Hook);
}
protected:
cPlugin_Squirrel *m_Instance;
};
|