mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-16 16:34:41 +01:00
23 lines
483 B
C#
23 lines
483 B
C#
using System;
|
|
|
|
namespace LuaInterface
|
|
{
|
|
internal class DelegateGenerator
|
|
{
|
|
private ObjectTranslator translator;
|
|
|
|
private Type delegateType;
|
|
|
|
public DelegateGenerator(ObjectTranslator translator, Type delegateType)
|
|
{
|
|
this.translator = translator;
|
|
this.delegateType = delegateType;
|
|
}
|
|
|
|
public object extractGenerated(IntPtr luaState, int stackPos)
|
|
{
|
|
return CodeGeneration.Instance.GetDelegate(delegateType, translator.getFunction(luaState, stackPos));
|
|
}
|
|
}
|
|
}
|