本文整理汇总了C#中LuaInterface.LuaFunction.GetLuaState方法的典型用法代码示例。如果您正苦于以下问题:C# LuaFunction.GetLuaState方法的具体用法?C# LuaFunction.GetLuaState怎么用?C# LuaFunction.GetLuaState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LuaInterface.LuaFunction
的用法示例。
在下文中一共展示了LuaFunction.GetLuaState方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateDelegate
public static Delegate CreateDelegate(Type t, LuaFunction func, LuaTable self)
{
DelegateValue Create = null;
if (!dict.TryGetValue(t, out Create))
{
throw new LuaException(string.Format("Delegate {0} not register", LuaMisc.GetTypeName(t)));
}
if (func != null)
{
LuaState state = func.GetLuaState();
LuaDelegate target = state.GetLuaDelegate(func, self);
if (target != null)
{
return Delegate.CreateDelegate(t, target, target.method);
}
else
{
Delegate d = Create(func, self, true);
target = d.Target as LuaDelegate;
state.AddLuaDelegate(target, func, self);
return d;
}
}
return Create(func, self, true);
}
示例2: AudioClip_PCMSetPositionCallback
public static Delegate AudioClip_PCMSetPositionCallback(LuaFunction func)
{
AudioClip.PCMSetPositionCallback d = (param0) =>
{
int top = func.BeginPCall();
IntPtr L = func.GetLuaState();
LuaScriptMgr.Push(L, param0);
func.PCall(top, 1);
func.EndPCall(top);
};
return d;
}
示例3: Action_GameObject
public static Delegate Action_GameObject(LuaFunction func)
{
Action<GameObject> d = (param0) =>
{
int top = func.BeginPCall();
IntPtr L = func.GetLuaState();
LuaScriptMgr.Push(L, param0);
func.PCall(top, 1);
func.EndPCall(top);
};
return d;
}
示例4: Application_LogCallback
public static Delegate Application_LogCallback(LuaFunction func)
{
Application.LogCallback d = (param0, param1, param2) =>
{
int top = func.BeginPCall();
IntPtr L = func.GetLuaState();
LuaScriptMgr.Push(L, param0);
LuaScriptMgr.Push(L, param1);
LuaScriptMgr.Push(L, param2);
func.PCall(top, 3);
func.EndPCall(top);
};
return d;
}
示例5: System_Reflection_MemberFilter
public static Delegate System_Reflection_MemberFilter(LuaFunction func)
{
System.Reflection.MemberFilter d = (param0, param1) =>
{
int top = func.BeginPCall();
IntPtr L = func.GetLuaState();
LuaScriptMgr.PushObject(L, param0);
LuaScriptMgr.PushVarObject(L, param1);
func.PCall(top, 2);
object[] objs = func.PopValues(top);
func.EndPCall(top);
return (bool)objs[0];
};
return d;
}
示例6: TestLuaDelegate_VoidDelegate
public static Delegate TestLuaDelegate_VoidDelegate(LuaFunction func)
{
TestLuaDelegate.VoidDelegate d = (param0) =>
{
int top = func.BeginPCall();
IntPtr L = func.GetLuaState();
LuaScriptMgr.Push(L, param0);
func.PCall(top, 1);
func.EndPCall(top);
};
return d;
}
示例7: UIEventListener_KeyCodeDelegate
public static Delegate UIEventListener_KeyCodeDelegate(LuaFunction func)
{
UIEventListener.KeyCodeDelegate d = (param0, param1) =>
{
int top = func.BeginPCall();
IntPtr L = func.GetLuaState();
LuaScriptMgr.Push(L, param0);
LuaScriptMgr.Push(L, param1);
func.PCall(top, 2);
func.EndPCall(top);
};
return d;
}
示例8: UIPanel_OnClippingMoved
public static Delegate UIPanel_OnClippingMoved(LuaFunction func)
{
UIPanel.OnClippingMoved d = (param0) =>
{
int top = func.BeginPCall();
IntPtr L = func.GetLuaState();
LuaScriptMgr.Push(L, param0);
func.PCall(top, 1);
func.EndPCall(top);
};
return d;
}
示例9: UICenterOnChild_OnCenterCallback
public static Delegate UICenterOnChild_OnCenterCallback(LuaFunction func)
{
UICenterOnChild.OnCenterCallback d = (param0) =>
{
int top = func.BeginPCall();
IntPtr L = func.GetLuaState();
LuaScriptMgr.Push(L, param0);
func.PCall(top, 1);
func.EndPCall(top);
};
return d;
}
示例10: Action_float_object
public static Delegate Action_float_object(LuaFunction func)
{
Action<float,object> d = (param0, param1) =>
{
int top = func.BeginPCall();
IntPtr L = func.GetLuaState();
LuaScriptMgr.Push(L, param0);
LuaScriptMgr.PushVarObject(L, param1);
func.PCall(top, 2);
func.EndPCall(top);
};
return d;
}
示例11: Action_CTransport_CRequest
public static Delegate Action_CTransport_CRequest(LuaFunction func)
{
Action<CTransport,CRequest> d = (param0, param1) =>
{
int top = func.BeginPCall();
IntPtr L = func.GetLuaState();
LuaScriptMgr.Push(L, param0);
LuaScriptMgr.PushObject(L, param1);
func.PCall(top, 2);
func.EndPCall(top);
};
return d;
}
示例12: UIWidget_OnPostFillCallback
public static Delegate UIWidget_OnPostFillCallback(LuaFunction func)
{
UIWidget.OnPostFillCallback d = (param0, param1, param2, param3, param4) =>
{
int top = func.BeginPCall();
IntPtr L = func.GetLuaState();
LuaScriptMgr.Push(L, param0);
LuaScriptMgr.Push(L, param1);
LuaScriptMgr.PushObject(L, param2);
LuaScriptMgr.PushObject(L, param3);
LuaScriptMgr.PushObject(L, param4);
func.PCall(top, 5);
func.EndPCall(top);
};
return d;
}
示例13: Localization_LoadFunction
public static Delegate Localization_LoadFunction(LuaFunction func)
{
Localization.LoadFunction d = (param0) =>
{
int top = func.BeginPCall();
IntPtr L = func.GetLuaState();
LuaScriptMgr.Push(L, param0);
func.PCall(top, 1);
object[] objs = func.PopValues(top);
func.EndPCall(top);
return (byte[])objs[0];
};
return d;
}
示例14: UICamera_GetTouchCallback
public static Delegate UICamera_GetTouchCallback(LuaFunction func)
{
UICamera.GetTouchCallback d = (param0) =>
{
int top = func.BeginPCall();
IntPtr L = func.GetLuaState();
LuaScriptMgr.Push(L, param0);
func.PCall(top, 1);
object[] objs = func.PopValues(top);
func.EndPCall(top);
return (UICamera.Touch)objs[0];
};
return d;
}
示例15: UICamera_ObjectDelegate
public static Delegate UICamera_ObjectDelegate(LuaFunction func)
{
UICamera.ObjectDelegate d = (param0, param1) =>
{
int top = func.BeginPCall();
IntPtr L = func.GetLuaState();
LuaScriptMgr.Push(L, param0);
LuaScriptMgr.Push(L, param1);
func.PCall(top, 2);
func.EndPCall(top);
};
return d;
}