blob: a66ca7dddf64348b7127fcf7faa10c536830bd6e (
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;
};
|