From 0d7482d5a0e8bf082abfb4b5bfbfee03597cdc3a Mon Sep 17 00:00:00 2001
From: lwb <q3213421wrwqr>
Date: 星期四, 25 二月 2021 15:43:08 +0800
Subject: [PATCH] 9527 去掉xlua
---
Utility/ComponentExtersion.cs | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/Utility/ComponentExtersion.cs b/Utility/ComponentExtersion.cs
index 9c2278c..617ee9c 100644
--- a/Utility/ComponentExtersion.cs
+++ b/Utility/ComponentExtersion.cs
@@ -3,7 +3,7 @@
using UnityEngine.Events;
using System;
-[XLua.LuaCallCSharp]
+
public static class ComponentExtersion
{
@@ -80,7 +80,7 @@
return component;
}
- [XLua.LuaCallCSharp]
+
public static void AddListener(this Button _button, UnityAction _action)
{
if (_button == null)
@@ -92,7 +92,7 @@
_button.onClick.AddListener(_action);
}
- [XLua.LuaCallCSharp]
+
public static void RemoveAllListeners(this Button _button)
{
if (_button == null)
@@ -102,7 +102,7 @@
_button.onClick.RemoveAllListeners();
}
- [XLua.LuaCallCSharp]
+
public static void SetListener(this Button button, UnityAction action)
{
if (button == null)
@@ -123,7 +123,7 @@
_toggle.onValueChanged.AddListener(_action);
}
- [XLua.LuaCallCSharp]
+
public static void SetListener(this Toggle toggle, UnityAction<bool> action)
{
if (toggle == null)
@@ -144,7 +144,7 @@
_toggle.onValueChanged.RemoveAllListeners();
}
- [XLua.LuaCallCSharp]
+
public static void AddListener(this Slider _slider, UnityAction<float> _action)
{
if (_slider == null)
@@ -154,7 +154,7 @@
_slider.onValueChanged.AddListener(_action);
}
- [XLua.LuaCallCSharp]
+
public static void SetListener(this Slider slider, UnityAction<float> action)
{
if (slider == null)
@@ -175,7 +175,7 @@
_slider.onValueChanged.RemoveAllListeners();
}
- [XLua.LuaCallCSharp]
+
public static void AddListener(this InputField _inputField, UnityAction<string> _action)
{
if (_inputField == null)
@@ -196,7 +196,7 @@
inputField.onValueChanged.AddListener(action);
}
- [XLua.LuaCallCSharp]
+
public static void RemoveAllListeners(this InputField _inputField)
{
if (_inputField == null)
@@ -206,14 +206,14 @@
_inputField.onValueChanged.RemoveAllListeners();
}
- [XLua.LuaCallCSharp]
+
public static void SetEnable(this Button _btn, Text _btnTxt, bool _enable, EnableButtonConfig.EnableButtonType _type =
EnableButtonConfig.EnableButtonType.Default)
{
EnableButtonConfig.SetEnable(_btn, _btnTxt, _enable, _type);
}
- [XLua.LuaCallCSharp]
+
public static void SetColorful(this Button _btn, Text _btnTxt, bool _colorful, int pattern = 0)
{
if (_btn != null)
@@ -238,7 +238,7 @@
}
}
- [XLua.LuaCallCSharp]
+
public static void SetInteractable(this Button _btn, Text _btnText, bool _interactable)
{
if (_btn != null)
@@ -257,7 +257,7 @@
}
}
- [XLua.LuaCallCSharp]
+
public static void SetSprite(this Image _image, string _id)
{
if (_image == null)
@@ -269,7 +269,7 @@
_image.overrideSprite = sprite;
}
- [XLua.LuaCallCSharp]
+
public static void SetSprite(this TextImage _textImage, string _id)
{
if (_textImage == null)
--
Gitblit v1.8.0