c1_unity/Assets/XLua/Gen/BF_TimeLineItemWrap.cs
2023-04-03 11:04:31 +08:00

540 lines
16 KiB
C#

#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
#endif
using XLua;
using System.Collections.Generic;
namespace XLua.CSObjectWrap
{
using Utils = XLua.Utils;
public class BFTimeLineItemWrap
{
public static void __Register(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(BF.TimeLineItem);
Utils.BeginObjectRegister(type, L, translator, 0, 13, 2, 1);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "FrameMove", _m_FrameMove);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RegisterEvent", _m_RegisterEvent);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Play", _m_Play);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Pause", _m_Pause);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Resume", _m_Resume);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Stop", _m_Stop);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Reset", _m_Reset);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ResetAndPlay", _m_ResetAndPlay);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetBindingObject", _m_GetBindingObject);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Binding", _m_Binding);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnBinding", _m_UnBinding);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ClearAllBinding", _m_ClearAllBinding);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Clear", _m_Clear);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Duration", _g_get_Duration);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "onComplete", _g_get_onComplete);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "onComplete", _s_set_onComplete);
Utils.EndObjectRegister(type, L, translator, null, null,
null, null, null);
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
Utils.EndClassRegister(type, L, translator);
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int __CreateInstance(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
if(LuaAPI.lua_gettop(L) == 1)
{
var gen_ret = new BF.TimeLineItem();
translator.Push(L, gen_ret);
return 1;
}
if(LuaAPI.lua_gettop(L) == 2 && translator.Assignable<UnityEngine.Playables.PlayableDirector>(L, 2))
{
UnityEngine.Playables.PlayableDirector _pd = (UnityEngine.Playables.PlayableDirector)translator.GetObject(L, 2, typeof(UnityEngine.Playables.PlayableDirector));
var gen_ret = new BF.TimeLineItem(_pd);
translator.Push(L, gen_ret);
return 1;
}
}
catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return LuaAPI.luaL_error(L, "invalid arguments to BF.TimeLineItem constructor!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_FrameMove(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.TimeLineItem gen_to_be_invoked = (BF.TimeLineItem)translator.FastGetCSObj(L, 1);
{
double _delta = LuaAPI.lua_tonumber(L, 2);
gen_to_be_invoked.FrameMove( _delta );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_RegisterEvent(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.TimeLineItem gen_to_be_invoked = (BF.TimeLineItem)translator.FastGetCSObj(L, 1);
{
double _time = LuaAPI.lua_tonumber(L, 2);
System.Action _e = translator.GetDelegate<System.Action>(L, 3);
gen_to_be_invoked.RegisterEvent( _time, _e );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_Play(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.TimeLineItem gen_to_be_invoked = (BF.TimeLineItem)translator.FastGetCSObj(L, 1);
{
gen_to_be_invoked.Play( );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_Pause(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.TimeLineItem gen_to_be_invoked = (BF.TimeLineItem)translator.FastGetCSObj(L, 1);
{
gen_to_be_invoked.Pause( );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_Resume(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.TimeLineItem gen_to_be_invoked = (BF.TimeLineItem)translator.FastGetCSObj(L, 1);
{
gen_to_be_invoked.Resume( );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_Stop(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.TimeLineItem gen_to_be_invoked = (BF.TimeLineItem)translator.FastGetCSObj(L, 1);
{
gen_to_be_invoked.Stop( );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_Reset(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.TimeLineItem gen_to_be_invoked = (BF.TimeLineItem)translator.FastGetCSObj(L, 1);
int gen_param_count = LuaAPI.lua_gettop(L);
if(gen_param_count == 1)
{
gen_to_be_invoked.Reset( );
return 0;
}
if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
{
double _timePoint = LuaAPI.lua_tonumber(L, 2);
gen_to_be_invoked.Reset( _timePoint );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return LuaAPI.luaL_error(L, "invalid arguments to BF.TimeLineItem.Reset!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_ResetAndPlay(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.TimeLineItem gen_to_be_invoked = (BF.TimeLineItem)translator.FastGetCSObj(L, 1);
int gen_param_count = LuaAPI.lua_gettop(L);
if(gen_param_count == 1)
{
gen_to_be_invoked.ResetAndPlay( );
return 0;
}
if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
{
double _timePoint = LuaAPI.lua_tonumber(L, 2);
gen_to_be_invoked.ResetAndPlay( _timePoint );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return LuaAPI.luaL_error(L, "invalid arguments to BF.TimeLineItem.ResetAndPlay!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_GetBindingObject(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.TimeLineItem gen_to_be_invoked = (BF.TimeLineItem)translator.FastGetCSObj(L, 1);
{
string _trackName = LuaAPI.lua_tostring(L, 2);
var gen_ret = gen_to_be_invoked.GetBindingObject( _trackName );
translator.Push(L, gen_ret);
return 1;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_Binding(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.TimeLineItem gen_to_be_invoked = (BF.TimeLineItem)translator.FastGetCSObj(L, 1);
{
string _trackName = LuaAPI.lua_tostring(L, 2);
UnityEngine.Object _obj = (UnityEngine.Object)translator.GetObject(L, 3, typeof(UnityEngine.Object));
gen_to_be_invoked.Binding( _trackName, _obj );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_UnBinding(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.TimeLineItem gen_to_be_invoked = (BF.TimeLineItem)translator.FastGetCSObj(L, 1);
{
string _trackName = LuaAPI.lua_tostring(L, 2);
gen_to_be_invoked.UnBinding( _trackName );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_ClearAllBinding(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.TimeLineItem gen_to_be_invoked = (BF.TimeLineItem)translator.FastGetCSObj(L, 1);
{
gen_to_be_invoked.ClearAllBinding( );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_Clear(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.TimeLineItem gen_to_be_invoked = (BF.TimeLineItem)translator.FastGetCSObj(L, 1);
{
gen_to_be_invoked.Clear( );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_Duration(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.TimeLineItem gen_to_be_invoked = (BF.TimeLineItem)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.Duration);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_onComplete(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.TimeLineItem gen_to_be_invoked = (BF.TimeLineItem)translator.FastGetCSObj(L, 1);
translator.Push(L, gen_to_be_invoked.onComplete);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_onComplete(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.TimeLineItem gen_to_be_invoked = (BF.TimeLineItem)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.onComplete = translator.GetDelegate<System.Action>(L, 2);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
}
}