Files
JJBB/Assets/Project/Script/LuaScripts/UI/Lua/PropBaseAttr/ReplaceTheBrackets.txt
2024-08-23 15:49:34 +08:00

17 lines
483 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

require("LuaUtil")
require("Util")
ReplaceTheBrackets = {}
local _isShowTime = 0
local myOneself
function ReplaceTheBrackets.Awake()
myOneself = _myOneself:GetComponent("Text")
end
function ReplaceTheBrackets.Update()
_isShowTime = _isShowTime + CS.UnityEngine.Time.deltaTime
if _isShowTime >= 0.5 then
local newStr1 = string.gsub(myOneself.text, "%", "(")
local newStr2 = string.gsub(newStr1, "%", ")")
myOneself.text = newStr2
end
end