913 lines
31 KiB
C#
913 lines
31 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 BFCharacterSpineHelperWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(BF.CharacterSpineHelper);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 24, 5, 2);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Reload", _m_Reload);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "PlayAnimation", _m_PlayAnimation);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetAnimationSpeed", _m_SetAnimationSpeed);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetLoop", _m_SetLoop);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSpineObject", _m_GetSpineObject);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSkeletonGraphic", _m_GetSkeletonGraphic);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetListCount", _m_GetListCount);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetGameObjectByIndex", _m_GetGameObjectByIndex);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetHashNameByIndex", _m_GetHashNameByIndex);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetInstanceID", _m_GetInstanceID);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CacheLocalPosition", _m_CacheLocalPosition);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetLocalPosition", _m_SetLocalPosition);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CachePosition", _m_CachePosition);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CacheBonePosition", _m_CacheBonePosition);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetPosition", _m_SetPosition);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetLocalEulerAngles", _m_SetLocalEulerAngles);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "setEulerAngles", _m_setEulerAngles);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetLocalScale", _m_SetLocalScale);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetLocalScaleX", _m_SetLocalScaleX);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetMainSpineLocalPosition", _m_SetMainSpineLocalPosition);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetAnimationDuration", _m_GetAnimationDuration);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetAnimationKeyFrameTime", _m_GetAnimationKeyFrameTime);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetDefaultMix", _m_SetDefaultMix);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "PlayAnimationAndPause", _m_PlayAnimationAndPause);
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "PositionX", _g_get_PositionX);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "PositionY", _g_get_PositionY);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "PositionZ", _g_get_PositionZ);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "SpineObject", _g_get_SpineObject);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ObjectList", _g_get_ObjectList);
|
|
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "SpineObject", _s_set_SpineObject);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "ObjectList", _s_set_ObjectList);
|
|
|
|
|
|
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.CharacterSpineHelper();
|
|
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.CharacterSpineHelper constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Reload(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.Reload( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_PlayAnimation(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _animName = LuaAPI.lua_tostring(L, 2);
|
|
bool _loop = LuaAPI.lua_toboolean(L, 3);
|
|
bool _forceRefresh = LuaAPI.lua_toboolean(L, 4);
|
|
|
|
gen_to_be_invoked.PlayAnimation( _animName, _loop, _forceRefresh );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetAnimationSpeed(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
float _timeScale = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
gen_to_be_invoked.SetAnimationSpeed( _timeScale );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetLoop(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
bool _isLoop = LuaAPI.lua_toboolean(L, 2);
|
|
|
|
gen_to_be_invoked.SetLoop( _isLoop );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetSpineObject(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.GetSpineObject( );
|
|
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_GetSkeletonGraphic(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.GetSkeletonGraphic( );
|
|
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_GetListCount(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.GetListCount( );
|
|
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_GetGameObjectByIndex(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.GetGameObjectByIndex( _index );
|
|
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_GetHashNameByIndex(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.GetHashNameByIndex( _index );
|
|
LuaAPI.xlua_pushuint(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_GetInstanceID(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.GetInstanceID( _index );
|
|
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_CacheLocalPosition(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
gen_to_be_invoked.CacheLocalPosition( _index );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetLocalPosition(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
float _x = (float)LuaAPI.lua_tonumber(L, 3);
|
|
float _y = (float)LuaAPI.lua_tonumber(L, 4);
|
|
float _z = (float)LuaAPI.lua_tonumber(L, 5);
|
|
|
|
gen_to_be_invoked.SetLocalPosition( _index, _x, _y, _z );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_CachePosition(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
gen_to_be_invoked.CachePosition( _index );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_CacheBonePosition(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _name = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.CacheBonePosition( _name );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetPosition(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
float _x = (float)LuaAPI.lua_tonumber(L, 3);
|
|
float _y = (float)LuaAPI.lua_tonumber(L, 4);
|
|
float _z = (float)LuaAPI.lua_tonumber(L, 5);
|
|
|
|
gen_to_be_invoked.SetPosition( _index, _x, _y, _z );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetLocalEulerAngles(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
float _x = (float)LuaAPI.lua_tonumber(L, 3);
|
|
float _y = (float)LuaAPI.lua_tonumber(L, 4);
|
|
float _z = (float)LuaAPI.lua_tonumber(L, 5);
|
|
|
|
gen_to_be_invoked.SetLocalEulerAngles( _index, _x, _y, _z );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_setEulerAngles(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
float _x = (float)LuaAPI.lua_tonumber(L, 3);
|
|
float _y = (float)LuaAPI.lua_tonumber(L, 4);
|
|
float _z = (float)LuaAPI.lua_tonumber(L, 5);
|
|
|
|
gen_to_be_invoked.setEulerAngles( _index, _x, _y, _z );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetLocalScale(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
float _x = (float)LuaAPI.lua_tonumber(L, 3);
|
|
float _y = (float)LuaAPI.lua_tonumber(L, 4);
|
|
float _z = (float)LuaAPI.lua_tonumber(L, 5);
|
|
|
|
gen_to_be_invoked.SetLocalScale( _index, _x, _y, _z );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetLocalScaleX(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
float _x = (float)LuaAPI.lua_tonumber(L, 3);
|
|
|
|
gen_to_be_invoked.SetLocalScaleX( _index, _x );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetMainSpineLocalPosition(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
float _x = (float)LuaAPI.lua_tonumber(L, 2);
|
|
float _y = (float)LuaAPI.lua_tonumber(L, 3);
|
|
float _z = (float)LuaAPI.lua_tonumber(L, 4);
|
|
|
|
gen_to_be_invoked.SetMainSpineLocalPosition( _x, _y, _z );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetAnimationDuration(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _name = LuaAPI.lua_tostring(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.GetAnimationDuration( _name );
|
|
LuaAPI.lua_pushnumber(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_GetAnimationKeyFrameTime(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _name = LuaAPI.lua_tostring(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.GetAnimationKeyFrameTime( _name );
|
|
LuaAPI.lua_pushnumber(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_SetDefaultMix(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
float _mixDuration = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
gen_to_be_invoked.SetDefaultMix( _mixDuration );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_PlayAnimationAndPause(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _animName = LuaAPI.lua_tostring(L, 2);
|
|
float _percent = (float)LuaAPI.lua_tonumber(L, 3);
|
|
|
|
gen_to_be_invoked.PlayAnimationAndPause( _animName, _percent );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_PositionX(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.PositionX);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_PositionY(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.PositionY);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_PositionZ(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.PositionZ);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_SpineObject(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.SpineObject);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_ObjectList(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.ObjectList);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_SpineObject(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.SpineObject = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_ObjectList(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CharacterSpineHelper gen_to_be_invoked = (BF.CharacterSpineHelper)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.ObjectList = (System.Collections.Generic.List<BF.CharacterSpineObjectInfo>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<BF.CharacterSpineObjectInfo>));
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|