1069 lines
38 KiB
C#
1069 lines
38 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 UnityEngineInputWrap
|
|||
|
{
|
|||
|
public static void __Register(RealStatePtr L)
|
|||
|
{
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
System.Type type = typeof(UnityEngine.Input);
|
|||
|
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
|||
|
null, null, null);
|
|||
|
|
|||
|
Utils.BeginClassRegister(type, L, __CreateInstance, 20, 27, 6);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetAxis", _m_GetAxis_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetAxisRaw", _m_GetAxisRaw_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetButton", _m_GetButton_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetButtonDown", _m_GetButtonDown_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetButtonUp", _m_GetButtonUp_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetMouseButton", _m_GetMouseButton_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetMouseButtonDown", _m_GetMouseButtonDown_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetMouseButtonUp", _m_GetMouseButtonUp_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "ResetInputAxes", _m_ResetInputAxes_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetJoystickNames", _m_GetJoystickNames_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetTouch", _m_GetTouch_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetPenEvent", _m_GetPenEvent_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetLastPenContactEvent", _m_GetLastPenContactEvent_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "ResetPenEvents", _m_ResetPenEvents_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "ClearLastPenContactEvent", _m_ClearLastPenContactEvent_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetAccelerationEvent", _m_GetAccelerationEvent_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetKey", _m_GetKey_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetKeyUp", _m_GetKeyUp_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetKeyDown", _m_GetKeyDown_xlua_st_);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "simulateMouseWithTouches", _g_get_simulateMouseWithTouches);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "anyKey", _g_get_anyKey);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "anyKeyDown", _g_get_anyKeyDown);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "inputString", _g_get_inputString);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "mousePosition", _g_get_mousePosition);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "mousePositionDelta", _g_get_mousePositionDelta);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "mouseScrollDelta", _g_get_mouseScrollDelta);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "imeCompositionMode", _g_get_imeCompositionMode);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "compositionString", _g_get_compositionString);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "imeIsSelected", _g_get_imeIsSelected);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "compositionCursorPos", _g_get_compositionCursorPos);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "mousePresent", _g_get_mousePresent);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "touchSupported", _g_get_touchSupported);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "penEventCount", _g_get_penEventCount);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "touchCount", _g_get_touchCount);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "touchPressureSupported", _g_get_touchPressureSupported);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "stylusTouchSupported", _g_get_stylusTouchSupported);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "multiTouchEnabled", _g_get_multiTouchEnabled);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "deviceOrientation", _g_get_deviceOrientation);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "acceleration", _g_get_acceleration);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "compensateSensors", _g_get_compensateSensors);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "accelerationEventCount", _g_get_accelerationEventCount);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "backButtonLeavesApp", _g_get_backButtonLeavesApp);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "compass", _g_get_compass);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "gyro", _g_get_gyro);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "touches", _g_get_touches);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "accelerationEvents", _g_get_accelerationEvents);
|
|||
|
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "simulateMouseWithTouches", _s_set_simulateMouseWithTouches);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "imeCompositionMode", _s_set_imeCompositionMode);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "compositionCursorPos", _s_set_compositionCursorPos);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "multiTouchEnabled", _s_set_multiTouchEnabled);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "compensateSensors", _s_set_compensateSensors);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "backButtonLeavesApp", _s_set_backButtonLeavesApp);
|
|||
|
|
|||
|
|
|||
|
Utils.EndClassRegister(type, L, translator);
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int __CreateInstance(RealStatePtr L)
|
|||
|
{
|
|||
|
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
if(LuaAPI.lua_gettop(L) == 1)
|
|||
|
{
|
|||
|
|
|||
|
UnityEngine.Input gen_ret = new UnityEngine.Input();
|
|||
|
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 UnityEngine.Input constructor!");
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_GetAxis_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
string _axisName = LuaAPI.lua_tostring(L, 1);
|
|||
|
|
|||
|
float gen_ret = UnityEngine.Input.GetAxis( _axisName );
|
|||
|
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_GetAxisRaw_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
string _axisName = LuaAPI.lua_tostring(L, 1);
|
|||
|
|
|||
|
float gen_ret = UnityEngine.Input.GetAxisRaw( _axisName );
|
|||
|
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_GetButton_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
string _buttonName = LuaAPI.lua_tostring(L, 1);
|
|||
|
|
|||
|
bool gen_ret = UnityEngine.Input.GetButton( _buttonName );
|
|||
|
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_GetButtonDown_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
string _buttonName = LuaAPI.lua_tostring(L, 1);
|
|||
|
|
|||
|
bool gen_ret = UnityEngine.Input.GetButtonDown( _buttonName );
|
|||
|
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_GetButtonUp_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
string _buttonName = LuaAPI.lua_tostring(L, 1);
|
|||
|
|
|||
|
bool gen_ret = UnityEngine.Input.GetButtonUp( _buttonName );
|
|||
|
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_GetMouseButton_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
int _button = LuaAPI.xlua_tointeger(L, 1);
|
|||
|
|
|||
|
bool gen_ret = UnityEngine.Input.GetMouseButton( _button );
|
|||
|
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_GetMouseButtonDown_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
int _button = LuaAPI.xlua_tointeger(L, 1);
|
|||
|
|
|||
|
bool gen_ret = UnityEngine.Input.GetMouseButtonDown( _button );
|
|||
|
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_GetMouseButtonUp_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
int _button = LuaAPI.xlua_tointeger(L, 1);
|
|||
|
|
|||
|
bool gen_ret = UnityEngine.Input.GetMouseButtonUp( _button );
|
|||
|
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_ResetInputAxes_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
|
|||
|
UnityEngine.Input.ResetInputAxes( );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_GetJoystickNames_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
|
|||
|
string[] gen_ret = UnityEngine.Input.GetJoystickNames( );
|
|||
|
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_GetTouch_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
int _index = LuaAPI.xlua_tointeger(L, 1);
|
|||
|
|
|||
|
UnityEngine.Touch gen_ret = UnityEngine.Input.GetTouch( _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_GetPenEvent_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
int _index = LuaAPI.xlua_tointeger(L, 1);
|
|||
|
|
|||
|
UnityEngine.PenData gen_ret = UnityEngine.Input.GetPenEvent( _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_GetLastPenContactEvent_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
|
|||
|
UnityEngine.PenData gen_ret = UnityEngine.Input.GetLastPenContactEvent( );
|
|||
|
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_ResetPenEvents_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
|
|||
|
UnityEngine.Input.ResetPenEvents( );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_ClearLastPenContactEvent_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
|
|||
|
UnityEngine.Input.ClearLastPenContactEvent( );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_GetAccelerationEvent_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
int _index = LuaAPI.xlua_tointeger(L, 1);
|
|||
|
|
|||
|
UnityEngine.AccelerationEvent gen_ret = UnityEngine.Input.GetAccelerationEvent( _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_GetKey_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|||
|
|
|||
|
if(gen_param_count == 1&& (translator.Assignable<UnityEngine.KeyCode>(L, 1)||LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)))
|
|||
|
{
|
|||
|
UnityEngine.KeyCode _key;if (LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TNUMBER)_key = (UnityEngine.KeyCode)LuaAPI.lua_tonumber(L, 1);else translator.Get(L, 1, out _key);
|
|||
|
|
|||
|
bool gen_ret = UnityEngine.Input.GetKey( _key );
|
|||
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 1;
|
|||
|
}
|
|||
|
if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING))
|
|||
|
{
|
|||
|
string _name = LuaAPI.lua_tostring(L, 1);
|
|||
|
|
|||
|
bool gen_ret = UnityEngine.Input.GetKey( _name );
|
|||
|
LuaAPI.lua_pushboolean(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 UnityEngine.Input.GetKey!");
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_GetKeyUp_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|||
|
|
|||
|
if(gen_param_count == 1&& (translator.Assignable<UnityEngine.KeyCode>(L, 1)||LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)))
|
|||
|
{
|
|||
|
UnityEngine.KeyCode _key;if (LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TNUMBER)_key = (UnityEngine.KeyCode)LuaAPI.lua_tonumber(L, 1);else translator.Get(L, 1, out _key);
|
|||
|
|
|||
|
bool gen_ret = UnityEngine.Input.GetKeyUp( _key );
|
|||
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 1;
|
|||
|
}
|
|||
|
if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING))
|
|||
|
{
|
|||
|
string _name = LuaAPI.lua_tostring(L, 1);
|
|||
|
|
|||
|
bool gen_ret = UnityEngine.Input.GetKeyUp( _name );
|
|||
|
LuaAPI.lua_pushboolean(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 UnityEngine.Input.GetKeyUp!");
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_GetKeyDown_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|||
|
|
|||
|
if(gen_param_count == 1&& (translator.Assignable<UnityEngine.KeyCode>(L, 1)||LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)))
|
|||
|
{
|
|||
|
UnityEngine.KeyCode _key;if (LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TNUMBER)_key = (UnityEngine.KeyCode)LuaAPI.lua_tonumber(L, 1);else translator.Get(L, 1, out _key);
|
|||
|
|
|||
|
bool gen_ret = UnityEngine.Input.GetKeyDown( _key );
|
|||
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 1;
|
|||
|
}
|
|||
|
if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING))
|
|||
|
{
|
|||
|
string _name = LuaAPI.lua_tostring(L, 1);
|
|||
|
|
|||
|
bool gen_ret = UnityEngine.Input.GetKeyDown( _name );
|
|||
|
LuaAPI.lua_pushboolean(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 UnityEngine.Input.GetKeyDown!");
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_simulateMouseWithTouches(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
LuaAPI.lua_pushboolean(L, UnityEngine.Input.simulateMouseWithTouches);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_anyKey(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
LuaAPI.lua_pushboolean(L, UnityEngine.Input.anyKey);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_anyKeyDown(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
LuaAPI.lua_pushboolean(L, UnityEngine.Input.anyKeyDown);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_inputString(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
LuaAPI.lua_pushstring(L, UnityEngine.Input.inputString);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_mousePosition(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
translator.PushUnityEngineVector3(L, UnityEngine.Input.mousePosition);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_mousePositionDelta(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
translator.PushUnityEngineVector3(L, UnityEngine.Input.mousePositionDelta);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_mouseScrollDelta(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
translator.PushUnityEngineVector2(L, UnityEngine.Input.mouseScrollDelta);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_imeCompositionMode(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
translator.Push(L, UnityEngine.Input.imeCompositionMode);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_compositionString(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
LuaAPI.lua_pushstring(L, UnityEngine.Input.compositionString);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_imeIsSelected(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
LuaAPI.lua_pushboolean(L, UnityEngine.Input.imeIsSelected);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_compositionCursorPos(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
translator.PushUnityEngineVector2(L, UnityEngine.Input.compositionCursorPos);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_mousePresent(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
LuaAPI.lua_pushboolean(L, UnityEngine.Input.mousePresent);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_touchSupported(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
LuaAPI.lua_pushboolean(L, UnityEngine.Input.touchSupported);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_penEventCount(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
LuaAPI.xlua_pushinteger(L, UnityEngine.Input.penEventCount);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_touchCount(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
LuaAPI.xlua_pushinteger(L, UnityEngine.Input.touchCount);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_touchPressureSupported(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
LuaAPI.lua_pushboolean(L, UnityEngine.Input.touchPressureSupported);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_stylusTouchSupported(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
LuaAPI.lua_pushboolean(L, UnityEngine.Input.stylusTouchSupported);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_multiTouchEnabled(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
LuaAPI.lua_pushboolean(L, UnityEngine.Input.multiTouchEnabled);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_deviceOrientation(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
translator.Push(L, UnityEngine.Input.deviceOrientation);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_acceleration(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
translator.PushUnityEngineVector3(L, UnityEngine.Input.acceleration);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_compensateSensors(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
LuaAPI.lua_pushboolean(L, UnityEngine.Input.compensateSensors);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_accelerationEventCount(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
LuaAPI.xlua_pushinteger(L, UnityEngine.Input.accelerationEventCount);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_backButtonLeavesApp(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
LuaAPI.lua_pushboolean(L, UnityEngine.Input.backButtonLeavesApp);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_compass(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
translator.Push(L, UnityEngine.Input.compass);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_gyro(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
translator.Push(L, UnityEngine.Input.gyro);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_touches(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
translator.Push(L, UnityEngine.Input.touches);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_accelerationEvents(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
translator.Push(L, UnityEngine.Input.accelerationEvents);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _s_set_simulateMouseWithTouches(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
UnityEngine.Input.simulateMouseWithTouches = LuaAPI.lua_toboolean(L, 1);
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _s_set_imeCompositionMode(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
UnityEngine.IMECompositionMode gen_value;if (LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TNUMBER)gen_value = (UnityEngine.IMECompositionMode)LuaAPI.lua_tonumber(L, 1);else translator.Get(L, 1, out gen_value);
|
|||
|
UnityEngine.Input.imeCompositionMode = gen_value;
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _s_set_compositionCursorPos(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
|
|||
|
UnityEngine.Vector2 gen_value;translator.Get(L, 1, out gen_value);
|
|||
|
UnityEngine.Input.compositionCursorPos = gen_value;
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _s_set_multiTouchEnabled(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
UnityEngine.Input.multiTouchEnabled = LuaAPI.lua_toboolean(L, 1);
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _s_set_compensateSensors(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
UnityEngine.Input.compensateSensors = LuaAPI.lua_toboolean(L, 1);
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _s_set_backButtonLeavesApp(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
UnityEngine.Input.backButtonLeavesApp = LuaAPI.lua_toboolean(L, 1);
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
}
|