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

518 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 BFBattleControlHeroWrap
{
public static void __Register(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(BF.BattleControlHero);
Utils.BeginObjectRegister(type, L, translator, 0, 14, 1, 1);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitHero", _m_InitHero);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitHpBar", _m_InitHpBar);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshHpBar", _m_RefreshHpBar);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshShieldBar", _m_RefreshShieldBar);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetCameraStartPosition", _m_SetCameraStartPosition);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "MoveAndAttack", _m_MoveAndAttack);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetNearestLeftRightUnit", _m_GetNearestLeftRightUnit);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetWhetherUseGroundSkill", _m_GetWhetherUseGroundSkill);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "StopMove", _m_StopMove);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "StartMove", _m_StartMove);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnDead", _m_OnDead);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Reborn", _m_Reborn);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Revive", _m_Revive);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Clear", _m_Clear);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsCameraFollowWithHero", _g_get_IsCameraFollowWithHero);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "IsCameraFollowWithHero", _s_set_IsCameraFollowWithHero);
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.BattleControlHero();
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.BattleControlHero constructor!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_InitHero(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
{
int _side = LuaAPI.xlua_tointeger(L, 2);
BF.CharacterSpineHelper _helper = (BF.CharacterSpineHelper)translator.GetObject(L, 3, typeof(BF.CharacterSpineHelper));
gen_to_be_invoked.InitHero( _side, _helper );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_InitHpBar(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
{
gen_to_be_invoked.InitHpBar( );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_RefreshHpBar(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
{
float _percent = (float)LuaAPI.lua_tonumber(L, 2);
gen_to_be_invoked.RefreshHpBar( _percent );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_RefreshShieldBar(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
{
float _percent = (float)LuaAPI.lua_tonumber(L, 2);
bool _visible = LuaAPI.lua_toboolean(L, 3);
gen_to_be_invoked.RefreshShieldBar( _percent, _visible );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_SetCameraStartPosition(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
{
UnityEngine.Vector3 _originPosition;translator.Get(L, 2, out _originPosition);
gen_to_be_invoked.SetCameraStartPosition( _originPosition );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_MoveAndAttack(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
{
int _direction = LuaAPI.xlua_tointeger(L, 2);
var gen_ret = gen_to_be_invoked.MoveAndAttack( _direction );
LuaAPI.lua_pushboolean(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_GetNearestLeftRightUnit(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
{
var gen_ret = gen_to_be_invoked.GetNearestLeftRightUnit( );
LuaAPI.xlua_pushinteger(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_GetWhetherUseGroundSkill(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
{
var gen_ret = gen_to_be_invoked.GetWhetherUseGroundSkill( );
LuaAPI.lua_pushboolean(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_StopMove(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
{
gen_to_be_invoked.StopMove( );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_StartMove(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
{
gen_to_be_invoked.StartMove( );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_OnDead(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
{
gen_to_be_invoked.OnDead( );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_Reborn(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
{
gen_to_be_invoked.Reborn( );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_Revive(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
{
gen_to_be_invoked.Revive( );
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.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)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_IsCameraFollowWithHero(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsCameraFollowWithHero);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_IsCameraFollowWithHero(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BattleControlHero gen_to_be_invoked = (BF.BattleControlHero)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.IsCameraFollowWithHero = LuaAPI.lua_toboolean(L, 2);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
}
}