【本地化】牛转钱坤

dev_chengFeng
ZhangBiao 2021-03-02 14:45:40 +08:00
parent 54cfbac8fa
commit 3681714bb0
11 changed files with 356 additions and 34 deletions

View File

@ -5192,7 +5192,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &2444147022553286329
Transform:
m_ObjectHideFlags: 0

View File

@ -1361,8 +1361,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -307.8, y: -694.6}
m_SizeDelta: {x: 160, y: 30}
m_AnchoredPosition: {x: -251.58, y: -698.35}
m_SizeDelta: {x: 294.92, y: 148.06}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8003749908686302696
CanvasRenderer:
@ -1402,7 +1402,7 @@ MonoBehaviour:
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: "\u5269\u4F59\u65F6\u95F4: 1\u592908\u65F652\u520636\u79D2"

View File

@ -66,7 +66,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 25898ef34d7afff4ca413a9a13c28647, type: 3}
m_Sprite: {fileID: 21300000, guid: f4576e328c6d21249bcf440f4d156c59, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -178,7 +178,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: fa403f065f78b4e4eaf419a2f5045afc, type: 3}
m_Sprite: {fileID: 21300000, guid: 9b4dec7c3e24c02498d5084da140af26, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -333,7 +333,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: -3, y: -90}
m_SizeDelta: {x: 160, y: 30}
m_SizeDelta: {x: 200, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2277647623175437188
CanvasRenderer:
@ -373,7 +373,7 @@ MonoBehaviour:
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: "\u5996\u6676*888"
@ -1075,7 +1075,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: -3, y: -90}
m_SizeDelta: {x: 160, y: 30}
m_SizeDelta: {x: 200, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8221703747147079125
CanvasRenderer:
@ -1115,7 +1115,7 @@ MonoBehaviour:
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: "\u5996\u6676*888"
@ -1303,7 +1303,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: -3, y: -90}
m_SizeDelta: {x: 160, y: 30}
m_SizeDelta: {x: 200, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4404758101816909685
CanvasRenderer:
@ -1343,7 +1343,7 @@ MonoBehaviour:
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: "\u5996\u6676*888"
@ -1837,7 +1837,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: -3, y: -90}
m_SizeDelta: {x: 160, y: 30}
m_SizeDelta: {x: 200, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1498662311409359392
CanvasRenderer:
@ -1877,7 +1877,7 @@ MonoBehaviour:
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: "\u5996\u6676*888"
@ -2314,7 +2314,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: -3, y: -90}
m_SizeDelta: {x: 160, y: 30}
m_SizeDelta: {x: 200, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3085748816085941518
CanvasRenderer:
@ -2354,7 +2354,7 @@ MonoBehaviour:
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: "\u5996\u6676*888"
@ -2585,7 +2585,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: -3, y: -90}
m_SizeDelta: {x: 160, y: 30}
m_SizeDelta: {x: 200, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5936905916076226222
CanvasRenderer:
@ -2625,7 +2625,7 @@ MonoBehaviour:
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: "\u5996\u6676*888"
@ -2847,7 +2847,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 4d6dabd94e2a6544ab3c2f8f845d99cc, type: 3}
m_Sprite: {fileID: 21300000, guid: dae47f06453be4247b2f5024ed6ab6e4, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -3146,7 +3146,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: f3e0d7c02a85aa0408087d150b1f00fa, type: 3}
m_Sprite: {fileID: 21300000, guid: 6ace89ca82cbce4439a238d5a72af613, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -3390,7 +3390,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 815f7447f65dad940a95126b6bb4d2a5, type: 3}
m_Sprite: {fileID: 21300000, guid: ab33e134c9406434d94ce5956d63a07b, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -3427,7 +3427,7 @@ MonoBehaviour:
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 21300000, guid: be23672ebb731cf43944764d69bc7f91, type: 3}
m_PressedSprite: {fileID: 21300000, guid: fd5715d5ac890cb4bbc822dd90c3d9c2, type: 3}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
@ -3685,7 +3685,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 18a0b32f8d9dddb4fa7a01c6cd809a34, type: 3}
m_Sprite: {fileID: 21300000, guid: 056301cd2ca73b14d8ab30f46c4cfd48, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -4198,7 +4198,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: -3, y: -90}
m_SizeDelta: {x: 160, y: 30}
m_SizeDelta: {x: 200, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3368264030454497516
CanvasRenderer:
@ -4238,7 +4238,7 @@ MonoBehaviour:
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: "\u5996\u6676*888"
@ -4463,7 +4463,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: -3, y: -90}
m_SizeDelta: {x: 160, y: 30}
m_SizeDelta: {x: 200, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1321521337263755633
CanvasRenderer:
@ -4503,7 +4503,7 @@ MonoBehaviour:
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: "\u5996\u6676*888"

View File

@ -1768,7 +1768,11 @@ end
-- 0:中文 1英文
function GetCurLanguage()
return PlayerPrefs.GetInt("language")
if PlayerPrefs.HasKey("language") then
return PlayerPrefs.GetInt("language")
else
return 0
end
end
-- 文字大小比例缩放

View File

@ -17,19 +17,21 @@ local redList = {}
local numList = {}
local costList={
[1] = {iconId=1221,on="n_niuzhuanqiankun_niu",off="n_niuzhuanqiankun_niu02"},
[2] = {iconId=1222,on="n_niuzhuanqiankun_zhuan",off="n_niuzhuanqiankun_zhuan02"},
[3] = {iconId=1223,on="n_niuzhuanqiankun_qian",off="n_niuzhuanqiankun_qian02"},
[4] = {iconId=1224,on="n_niuzhuanqiankun_kun",off="n_niuzhuanqiankun_kun02"},
[1] = {iconId=1221,on="n_niuzhuanqiankun_niu_zh",off="n_niuzhuanqiankun_niu02_zh"},
[2] = {iconId=1222,on="n_niuzhuanqiankun_zhuan_zh",off="n_niuzhuanqiankun_zhuan02_zh"},
[3] = {iconId=1223,on="n_niuzhuanqiankun_qian_zh",off="n_niuzhuanqiankun_qian02_zh"},
[4] = {iconId=1224,on="n_niuzhuanqiankun_kun_zh",off="n_niuzhuanqiankun_kun02_zh"},
}
--初始化组件(用于子类重写)
function NiuZhuanQianKun:InitComponent()
this.backBtn = Util.GetGameObject(self.gameObject,"backBtn")
this.title = Util.GetGameObject(self.gameObject,"bg/title")
this.rollBtn = Util.GetGameObject(self.gameObject,"rollBtn")
this.center = Util.GetGameObject(self.gameObject,"center")
this.tip = Util.GetGameObject(self.gameObject,"tip"):GetComponent("Text")
this.effect = Util.GetGameObject(self.gameObject,"UI_Effect_MianBan_NiuZhuanQianKun")
this.bottomtip = Util.GetGameObject(self.gameObject,"kuang/tip"):GetComponent("Image")
for i = 1, 8 do
rewardList[i] = Util.GetGameObject(self.gameObject,"center/reward"..i)
textList[i] = Util.GetGameObject(rewardList[i],"Text")
@ -86,6 +88,14 @@ end
--界面打开时调用(用于子类重写)
function NiuZhuanQianKun:OnOpen()
this.title:GetComponent("Image").sprite = Util.LoadSprite("n_niuzhuanqiankun_slogan_zh")
this.rollBtn:GetComponent("Image").sprite = Util.LoadSprite("n_niuzhuanqiankun_anniu01_zh")
if GetCurLanguage() ~= 0 then
local state = this.rollBtn:GetComponent("Button").spriteState
state.pressedSprite = Util.LoadSprite("n_niuzhuanqiankun_anniu02_zh")
this.rollBtn:GetComponent("Button").spriteState = state
end
this.bottomtip:GetComponent("Image").sprite = Util.LoadSprite("n_niuzhuanqiankun_zi_zh")
end
-- 打开,重新打开时回调
@ -112,7 +122,7 @@ function NiuZhuanQianKun:SetReward()
local goodLuckConfig = ConfigManager.GetConfigDataByKey(ConfigName.GoodLuck,"ActivityId",activityId)
for i = 1, #goodLuckConfig.Reward do
local reward = goodLuckConfig.Reward[i]
textList[i]:GetComponent("Text").text = itemConfig[reward[1]].Name.."*"..reward[2]
textList[i]:GetComponent("Text").text = GetLanguageStrById(itemConfig[reward[1]].Name) .."*"..reward[2]
imgList[i]:GetComponent("Image").sprite = Util.LoadSprite(artResourcesConfig[itemConfig[reward[1]].ResourceID].Name)
end
end

View File

@ -210,7 +210,8 @@ public static class CustomSettings
_GT(typeof(LayoutElement)),
_GT(typeof(ContentSizeFitter)),
_GT(typeof(AnimationCurve)),
_GT(typeof(AnimationCurveContainer)),
_GT(typeof(AnimationCurveContainer)),
_GT(typeof(SpriteState)),
_GT(typeof(App)),
_GT(typeof(Util)),

View File

@ -71,6 +71,7 @@ public class DelegateFactory
dict.Add(typeof(UnityEngine.Application.AdvertisingIdentifierCallback), factory.UnityEngine_Application_AdvertisingIdentifierCallback);
dict.Add(typeof(UnityEngine.Application.LowMemoryCallback), factory.UnityEngine_Application_LowMemoryCallback);
dict.Add(typeof(UnityEngine.Application.LogCallback), factory.UnityEngine_Application_LogCallback);
dict.Add(typeof(System.Action<bool>), factory.System_Action_bool);
dict.Add(typeof(System.Func<bool>), factory.System_Func_bool);
dict.Add(typeof(UnityEngine.AudioClip.PCMReaderCallback), factory.UnityEngine_AudioClip_PCMReaderCallback);
dict.Add(typeof(UnityEngine.AudioClip.PCMSetPositionCallback), factory.UnityEngine_AudioClip_PCMSetPositionCallback);
@ -153,6 +154,7 @@ public class DelegateFactory
DelegateTraits<UnityEngine.Application.AdvertisingIdentifierCallback>.Init(factory.UnityEngine_Application_AdvertisingIdentifierCallback);
DelegateTraits<UnityEngine.Application.LowMemoryCallback>.Init(factory.UnityEngine_Application_LowMemoryCallback);
DelegateTraits<UnityEngine.Application.LogCallback>.Init(factory.UnityEngine_Application_LogCallback);
DelegateTraits<System.Action<bool>>.Init(factory.System_Action_bool);
DelegateTraits<System.Func<bool>>.Init(factory.System_Func_bool);
DelegateTraits<UnityEngine.AudioClip.PCMReaderCallback>.Init(factory.UnityEngine_AudioClip_PCMReaderCallback);
DelegateTraits<UnityEngine.AudioClip.PCMSetPositionCallback>.Init(factory.UnityEngine_AudioClip_PCMSetPositionCallback);
@ -235,6 +237,7 @@ public class DelegateFactory
TypeTraits<UnityEngine.Application.AdvertisingIdentifierCallback>.Init(factory.Check_UnityEngine_Application_AdvertisingIdentifierCallback);
TypeTraits<UnityEngine.Application.LowMemoryCallback>.Init(factory.Check_UnityEngine_Application_LowMemoryCallback);
TypeTraits<UnityEngine.Application.LogCallback>.Init(factory.Check_UnityEngine_Application_LogCallback);
TypeTraits<System.Action<bool>>.Init(factory.Check_System_Action_bool);
TypeTraits<System.Func<bool>>.Init(factory.Check_System_Func_bool);
TypeTraits<UnityEngine.AudioClip.PCMReaderCallback>.Init(factory.Check_UnityEngine_AudioClip_PCMReaderCallback);
TypeTraits<UnityEngine.AudioClip.PCMSetPositionCallback>.Init(factory.Check_UnityEngine_AudioClip_PCMSetPositionCallback);
@ -317,6 +320,7 @@ public class DelegateFactory
StackTraits<UnityEngine.Application.AdvertisingIdentifierCallback>.Push = factory.Push_UnityEngine_Application_AdvertisingIdentifierCallback;
StackTraits<UnityEngine.Application.LowMemoryCallback>.Push = factory.Push_UnityEngine_Application_LowMemoryCallback;
StackTraits<UnityEngine.Application.LogCallback>.Push = factory.Push_UnityEngine_Application_LogCallback;
StackTraits<System.Action<bool>>.Push = factory.Push_System_Action_bool;
StackTraits<System.Func<bool>>.Push = factory.Push_System_Func_bool;
StackTraits<UnityEngine.AudioClip.PCMReaderCallback>.Push = factory.Push_UnityEngine_AudioClip_PCMReaderCallback;
StackTraits<UnityEngine.AudioClip.PCMSetPositionCallback>.Push = factory.Push_UnityEngine_AudioClip_PCMSetPositionCallback;
@ -3583,6 +3587,63 @@ public class DelegateFactory
ToLua.Push(L, o);
}
class System_Action_bool_Event : LuaDelegate
{
public System_Action_bool_Event(LuaFunction func) : base(func) { }
public System_Action_bool_Event(LuaFunction func, LuaTable self) : base(func, self) { }
public void Call(bool param0)
{
func.BeginPCall();
func.Push(param0);
func.PCall();
func.EndPCall();
}
public void CallWithSelf(bool param0)
{
func.BeginPCall();
func.Push(self);
func.Push(param0);
func.PCall();
func.EndPCall();
}
}
public System.Action<bool> System_Action_bool(LuaFunction func, LuaTable self, bool flag)
{
if (func == null)
{
System.Action<bool> fn = delegate(bool param0) { };
return fn;
}
if(!flag)
{
System_Action_bool_Event target = new System_Action_bool_Event(func);
System.Action<bool> d = target.Call;
target.method = d.Method;
return d;
}
else
{
System_Action_bool_Event target = new System_Action_bool_Event(func, self);
System.Action<bool> d = target.CallWithSelf;
target.method = d.Method;
return d;
}
}
bool Check_System_Action_bool(IntPtr L, int pos)
{
return TypeChecker.CheckDelegateType(typeof(System.Action<bool>), L, pos);
}
void Push_System_Action_bool(IntPtr L, System.Action<bool> o)
{
ToLua.Push(L, o);
}
class System_Func_bool_Event : LuaDelegate
{
public System_Func_bool_Event(LuaFunction func) : base(func) { }

View File

@ -180,6 +180,7 @@ public static class LuaBinder
UnityEngine_UI_VerticalLayoutGroupWrap.Register(L);
UnityEngine_UI_LayoutElementWrap.Register(L);
UnityEngine_UI_ContentSizeFitterWrap.Register(L);
UnityEngine_UI_SpriteStateWrap.Register(L);
UnityEngine_UI_LayoutUtilityWrap.Register(L);
UnityEngine_UI_LayoutRebuilderWrap.Register(L);
UnityEngine_UI_GraphicWrap.Register(L);
@ -386,6 +387,7 @@ public static class LuaBinder
L.RegFunction("Action_int", System_Action_int);
L.RegFunction("Comparison_int", System_Comparison_int);
L.RegFunction("Func_int_int", System_Func_int_int);
L.RegFunction("Action_bool", System_Action_bool);
L.RegFunction("Func_bool", System_Func_bool);
L.RegFunction("Action_UnityEngine_AsyncOperation", System_Action_UnityEngine_AsyncOperation);
L.RegFunction("Action_string", System_Action_string);
@ -2410,6 +2412,33 @@ public static class LuaBinder
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int System_Action_bool(IntPtr L)
{
try
{
int count = LuaDLL.lua_gettop(L);
LuaFunction func = ToLua.CheckLuaFunction(L, 1);
if (count == 1)
{
Delegate arg1 = DelegateTraits<System.Action<bool>>.Create(func);
ToLua.Push(L, arg1);
}
else
{
LuaTable self = ToLua.CheckLuaTable(L, 2);
Delegate arg1 = DelegateTraits<System.Action<bool>>.Create(func, self);
ToLua.Push(L, arg1);
}
return 1;
}
catch(Exception e)
{
return LuaDLL.toluaL_exception(L, e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int System_Func_bool(IntPtr L)
{

View File

@ -54,6 +54,7 @@ public class UnityEngine_ApplicationWrap
L.RegVar("logMessageReceived", get_logMessageReceived, set_logMessageReceived);
L.RegVar("logMessageReceivedThreaded", get_logMessageReceivedThreaded, set_logMessageReceivedThreaded);
L.RegVar("onBeforeRender", get_onBeforeRender, set_onBeforeRender);
L.RegVar("focusChanged", get_focusChanged, set_focusChanged);
L.RegVar("wantsToQuit", get_wantsToQuit, set_wantsToQuit);
L.RegVar("quitting", get_quitting, set_quitting);
L.RegFunction("AdvertisingIdentifierCallback", UnityEngine_Application_AdvertisingIdentifierCallback);
@ -752,6 +753,13 @@ public class UnityEngine_ApplicationWrap
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_focusChanged(IntPtr L)
{
ToLua.Push(L, new EventObject(typeof(System.Action<bool>)));
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_wantsToQuit(IntPtr L)
{
@ -951,6 +959,41 @@ public class UnityEngine_ApplicationWrap
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int set_focusChanged(IntPtr L)
{
try
{
EventObject arg0 = null;
if (LuaDLL.lua_isuserdata(L, 2) != 0)
{
arg0 = (EventObject)ToLua.ToObject(L, 2);
}
else
{
return LuaDLL.luaL_throw(L, "The event 'UnityEngine.Application.focusChanged' can only appear on the left hand side of += or -= when used outside of the type 'UnityEngine.Application'");
}
if (arg0.op == EventOp.Add)
{
System.Action<bool> ev = (System.Action<bool>)arg0.func;
UnityEngine.Application.focusChanged += ev;
}
else if (arg0.op == EventOp.Sub)
{
System.Action<bool> ev = (System.Action<bool>)arg0.func;
UnityEngine.Application.focusChanged -= ev;
}
return 0;
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int set_wantsToQuit(IntPtr L)
{

View File

@ -0,0 +1,163 @@
//this source code was auto-generated by tolua#, do not modify it
using System;
using LuaInterface;
public class UnityEngine_UI_SpriteStateWrap
{
public static void Register(LuaState L)
{
L.BeginClass(typeof(UnityEngine.UI.SpriteState), null);
L.RegFunction("Equals", Equals);
L.RegFunction("New", _CreateUnityEngine_UI_SpriteState);
L.RegFunction("__tostring", ToLua.op_ToString);
L.RegVar("highlightedSprite", get_highlightedSprite, set_highlightedSprite);
L.RegVar("pressedSprite", get_pressedSprite, set_pressedSprite);
L.RegVar("disabledSprite", get_disabledSprite, set_disabledSprite);
L.EndClass();
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _CreateUnityEngine_UI_SpriteState(IntPtr L)
{
UnityEngine.UI.SpriteState obj = new UnityEngine.UI.SpriteState();
ToLua.PushValue(L, obj);
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int Equals(IntPtr L)
{
try
{
ToLua.CheckArgsCount(L, 2);
UnityEngine.UI.SpriteState obj = (UnityEngine.UI.SpriteState)ToLua.CheckObject(L, 1, typeof(UnityEngine.UI.SpriteState));
UnityEngine.UI.SpriteState arg0 = StackTraits<UnityEngine.UI.SpriteState>.Check(L, 2);
bool o = obj.Equals(arg0);
LuaDLL.lua_pushboolean(L, o);
ToLua.SetBack(L, 1, obj);
return 1;
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_highlightedSprite(IntPtr L)
{
object o = null;
try
{
o = ToLua.ToObject(L, 1);
UnityEngine.UI.SpriteState obj = (UnityEngine.UI.SpriteState)o;
UnityEngine.Sprite ret = obj.highlightedSprite;
ToLua.PushSealed(L, ret);
return 1;
}
catch(Exception e)
{
return LuaDLL.toluaL_exception(L, e, o, "attempt to index highlightedSprite on a nil value");
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_pressedSprite(IntPtr L)
{
object o = null;
try
{
o = ToLua.ToObject(L, 1);
UnityEngine.UI.SpriteState obj = (UnityEngine.UI.SpriteState)o;
UnityEngine.Sprite ret = obj.pressedSprite;
ToLua.PushSealed(L, ret);
return 1;
}
catch(Exception e)
{
return LuaDLL.toluaL_exception(L, e, o, "attempt to index pressedSprite on a nil value");
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_disabledSprite(IntPtr L)
{
object o = null;
try
{
o = ToLua.ToObject(L, 1);
UnityEngine.UI.SpriteState obj = (UnityEngine.UI.SpriteState)o;
UnityEngine.Sprite ret = obj.disabledSprite;
ToLua.PushSealed(L, ret);
return 1;
}
catch(Exception e)
{
return LuaDLL.toluaL_exception(L, e, o, "attempt to index disabledSprite on a nil value");
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int set_highlightedSprite(IntPtr L)
{
object o = null;
try
{
o = ToLua.ToObject(L, 1);
UnityEngine.UI.SpriteState obj = (UnityEngine.UI.SpriteState)o;
UnityEngine.Sprite arg0 = (UnityEngine.Sprite)ToLua.CheckObject(L, 2, typeof(UnityEngine.Sprite));
obj.highlightedSprite = arg0;
ToLua.SetBack(L, 1, obj);
return 0;
}
catch(Exception e)
{
return LuaDLL.toluaL_exception(L, e, o, "attempt to index highlightedSprite on a nil value");
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int set_pressedSprite(IntPtr L)
{
object o = null;
try
{
o = ToLua.ToObject(L, 1);
UnityEngine.UI.SpriteState obj = (UnityEngine.UI.SpriteState)o;
UnityEngine.Sprite arg0 = (UnityEngine.Sprite)ToLua.CheckObject(L, 2, typeof(UnityEngine.Sprite));
obj.pressedSprite = arg0;
ToLua.SetBack(L, 1, obj);
return 0;
}
catch(Exception e)
{
return LuaDLL.toluaL_exception(L, e, o, "attempt to index pressedSprite on a nil value");
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int set_disabledSprite(IntPtr L)
{
object o = null;
try
{
o = ToLua.ToObject(L, 1);
UnityEngine.UI.SpriteState obj = (UnityEngine.UI.SpriteState)o;
UnityEngine.Sprite arg0 = (UnityEngine.Sprite)ToLua.CheckObject(L, 2, typeof(UnityEngine.Sprite));
obj.disabledSprite = arg0;
ToLua.SetBack(L, 1, obj);
return 0;
}
catch(Exception e)
{
return LuaDLL.toluaL_exception(L, e, o, "attempt to index disabledSprite on a nil value");
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6eec32c563ff1ff41a88a133a46fd840
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: