782 lines
27 KiB
C#
782 lines
27 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 BFUtilsWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(BF.Utils);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
null, null, null);
|
|
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 26, 0, 0);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetFreeChar", _m_GetFreeChar_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetConfigChar", _m_GetConfigChar_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "IsNull", _m_IsNull_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetTransformPath", _m_GetTransformPath_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetAssetPathByFullPath", _m_GetAssetPathByFullPath_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "RectTransformScreenPointToLocalPointInRectangle", _m_RectTransformScreenPointToLocalPointInRectangle_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "RectangleContainsScreenPoint", _m_RectangleContainsScreenPoint_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "KillDOTween", _m_KillDOTween_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "SetDOTweenTimeScale", _m_SetDOTweenTimeScale_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "NameToLayer", _m_NameToLayer_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "SetLayoutAlignment", _m_SetLayoutAlignment_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "TransformPoint2World", _m_TransformPoint2World_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "TransformWorld2Point", _m_TransformWorld2Point_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetIP", _m_GetIP_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetStringConfigPathList", _m_GetStringConfigPathList_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "RayCast", _m_RayCast_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "BKDRHash", _m_BKDRHash_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "ParseHtmlString", _m_ParseHtmlString_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetCurrentAnimationHash", _m_GetCurrentAnimationHash_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetEnvironmentTickCount", _m_GetEnvironmentTickCount_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetDataSecretKey", _m_GetDataSecretKey_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetRewardNumber", _m_GetRewardNumber_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "DOBFSliderValue", _m_DOBFSliderValue_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetAndroidSignKeyHash", _m_GetAndroidSignKeyHash_xlua_st_);
|
|
|
|
|
|
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "FORWARD_SLASH", BF.Utils.FORWARD_SLASH);
|
|
|
|
|
|
|
|
|
|
Utils.EndClassRegister(type, L, translator);
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int __CreateInstance(RealStatePtr L)
|
|
{
|
|
return LuaAPI.luaL_error(L, "BF.Utils does not have a constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetFreeChar_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = BF.Utils.GetFreeChar( );
|
|
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_GetConfigChar_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = BF.Utils.GetConfigChar( );
|
|
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_IsNull_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.Object _o = (UnityEngine.Object)translator.GetObject(L, 1, typeof(UnityEngine.Object));
|
|
|
|
var gen_ret = BF.Utils.IsNull( _o );
|
|
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_GetTransformPath_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.Transform _trans = (UnityEngine.Transform)translator.GetObject(L, 1, typeof(UnityEngine.Transform));
|
|
UnityEngine.Transform _parentTrans = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));
|
|
string _path = LuaAPI.lua_tostring(L, 3);
|
|
|
|
BF.Utils.GetTransformPath( _trans, _parentTrans, ref _path );
|
|
LuaAPI.lua_pushstring(L, _path);
|
|
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetAssetPathByFullPath_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
|
|
|
|
|
|
{
|
|
string _fullPath = LuaAPI.lua_tostring(L, 1);
|
|
|
|
var gen_ret = BF.Utils.GetAssetPathByFullPath( _fullPath );
|
|
LuaAPI.lua_pushstring(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_RectTransformScreenPointToLocalPointInRectangle_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.RectTransform _rt = (UnityEngine.RectTransform)translator.GetObject(L, 1, typeof(UnityEngine.RectTransform));
|
|
float _x = (float)LuaAPI.lua_tonumber(L, 2);
|
|
float _y = (float)LuaAPI.lua_tonumber(L, 3);
|
|
UnityEngine.Camera _cam = (UnityEngine.Camera)translator.GetObject(L, 4, typeof(UnityEngine.Camera));
|
|
|
|
var gen_ret = BF.Utils.RectTransformScreenPointToLocalPointInRectangle( _rt, _x, _y, _cam );
|
|
translator.PushUnityEngineVector2(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_RectangleContainsScreenPoint_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.RectTransform _rt = (UnityEngine.RectTransform)translator.GetObject(L, 1, typeof(UnityEngine.RectTransform));
|
|
float _x = (float)LuaAPI.lua_tonumber(L, 2);
|
|
float _y = (float)LuaAPI.lua_tonumber(L, 3);
|
|
UnityEngine.Camera _cam = (UnityEngine.Camera)translator.GetObject(L, 4, typeof(UnityEngine.Camera));
|
|
|
|
var gen_ret = BF.Utils.RectangleContainsScreenPoint( _rt, _x, _y, _cam );
|
|
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_KillDOTween_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2))
|
|
{
|
|
int _id = LuaAPI.xlua_tointeger(L, 1);
|
|
bool _complete = LuaAPI.lua_toboolean(L, 2);
|
|
|
|
var gen_ret = BF.Utils.KillDOTween( _id, _complete );
|
|
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
if(gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1))
|
|
{
|
|
int _id = LuaAPI.xlua_tointeger(L, 1);
|
|
|
|
var gen_ret = BF.Utils.KillDOTween( _id );
|
|
LuaAPI.xlua_pushinteger(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.Utils.KillDOTween!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetDOTweenTimeScale_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
|
|
|
|
|
|
{
|
|
int _id = LuaAPI.xlua_tointeger(L, 1);
|
|
float _timeScale = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
BF.Utils.SetDOTweenTimeScale( _id, _timeScale );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_NameToLayer_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
|
|
|
|
|
|
{
|
|
string _name = LuaAPI.lua_tostring(L, 1);
|
|
|
|
var gen_ret = BF.Utils.NameToLayer( _name );
|
|
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_SetLayoutAlignment_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.UI.LayoutGroup _layout = (UnityEngine.UI.LayoutGroup)translator.GetObject(L, 1, typeof(UnityEngine.UI.LayoutGroup));
|
|
int _enum_type = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
BF.Utils.SetLayoutAlignment( _layout, _enum_type );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_TransformPoint2World_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.Transform _transform = (UnityEngine.Transform)translator.GetObject(L, 1, typeof(UnityEngine.Transform));
|
|
UnityEngine.Vector3 _point;translator.Get(L, 2, out _point);
|
|
|
|
var gen_ret = BF.Utils.TransformPoint2World( _transform, _point );
|
|
translator.PushUnityEngineVector3(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_TransformWorld2Point_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.Transform _transform = (UnityEngine.Transform)translator.GetObject(L, 1, typeof(UnityEngine.Transform));
|
|
UnityEngine.Vector3 _point;translator.Get(L, 2, out _point);
|
|
|
|
var gen_ret = BF.Utils.TransformWorld2Point( _transform, _point );
|
|
translator.PushUnityEngineVector3(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_GetIP_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = BF.Utils.GetIP( );
|
|
LuaAPI.lua_pushstring(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_GetStringConfigPathList_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = BF.Utils.GetStringConfigPathList( );
|
|
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_RayCast_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.Ray _ray;translator.Get(L, 1, out _ray);
|
|
float _distance = (float)LuaAPI.lua_tonumber(L, 2);
|
|
int _layer = LuaAPI.xlua_tointeger(L, 3);
|
|
UnityEngine.RaycastHit _raycastHit;
|
|
|
|
var gen_ret = BF.Utils.RayCast( _ray, _distance, _layer, out _raycastHit );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
translator.Push(L, _raycastHit);
|
|
|
|
|
|
|
|
|
|
return 2;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_BKDRHash_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
|
|
|
|
|
|
{
|
|
string _name = LuaAPI.lua_tostring(L, 1);
|
|
|
|
var gen_ret = BF.Utils.BKDRHash( _name );
|
|
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_ParseHtmlString_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
string _htmlString = LuaAPI.lua_tostring(L, 1);
|
|
|
|
var gen_ret = BF.Utils.ParseHtmlString( _htmlString );
|
|
translator.PushUnityEngineColor(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_GetCurrentAnimationHash_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 2&& translator.Assignable<UnityEngine.Animator>(L, 1)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
|
|
{
|
|
UnityEngine.Animator _animator = (UnityEngine.Animator)translator.GetObject(L, 1, typeof(UnityEngine.Animator));
|
|
int _layer = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
var gen_ret = BF.Utils.GetCurrentAnimationHash( _animator, _layer );
|
|
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
if(gen_param_count == 1&& translator.Assignable<UnityEngine.Animator>(L, 1))
|
|
{
|
|
UnityEngine.Animator _animator = (UnityEngine.Animator)translator.GetObject(L, 1, typeof(UnityEngine.Animator));
|
|
|
|
var gen_ret = BF.Utils.GetCurrentAnimationHash( _animator );
|
|
LuaAPI.xlua_pushinteger(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.Utils.GetCurrentAnimationHash!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetEnvironmentTickCount_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = BF.Utils.GetEnvironmentTickCount( );
|
|
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_GetDataSecretKey_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = BF.Utils.GetDataSecretKey( );
|
|
LuaAPI.lua_pushstring(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_GetRewardNumber_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
|
|
|
|
|
|
{
|
|
string _str = LuaAPI.lua_tostring(L, 1);
|
|
|
|
var gen_ret = BF.Utils.GetRewardNumber( _str );
|
|
LuaAPI.lua_pushint64(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_DOBFSliderValue_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 4&& translator.Assignable<BF.BFSlider>(L, 1)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4))
|
|
{
|
|
BF.BFSlider _target = (BF.BFSlider)translator.GetObject(L, 1, typeof(BF.BFSlider));
|
|
float _endValue = (float)LuaAPI.lua_tonumber(L, 2);
|
|
float _duration = (float)LuaAPI.lua_tonumber(L, 3);
|
|
bool _snapping = LuaAPI.lua_toboolean(L, 4);
|
|
|
|
var gen_ret = BF.Utils.DOBFSliderValue( _target, _endValue, _duration, _snapping );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
if(gen_param_count == 3&& translator.Assignable<BF.BFSlider>(L, 1)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
|
|
{
|
|
BF.BFSlider _target = (BF.BFSlider)translator.GetObject(L, 1, typeof(BF.BFSlider));
|
|
float _endValue = (float)LuaAPI.lua_tonumber(L, 2);
|
|
float _duration = (float)LuaAPI.lua_tonumber(L, 3);
|
|
|
|
var gen_ret = BF.Utils.DOBFSliderValue( _target, _endValue, _duration );
|
|
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.Utils.DOBFSliderValue!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetAndroidSignKeyHash_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = BF.Utils.GetAndroidSignKeyHash( );
|
|
LuaAPI.lua_pushstring(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|