整理代码,部分玩家绘制材质移动到TEXTURE模块

触屏设置界面绘制完整的玩家边框
This commit is contained in:
MrZ626
2021-09-22 10:51:00 +08:00
parent a0f8258cad
commit 0e52416a9b
5 changed files with 135 additions and 128 deletions

View File

@@ -3,7 +3,6 @@ local getColor,setColor=gc.getColor,gc.setColor
local int,rnd=math.floor,math.random
local ins,rem=table.insert,table.remove
local getFont=FONT.get
local draw=gc.draw
local texts={}
@@ -104,7 +103,7 @@ end
function TEXT.show(text,x,y,font,style,spd,stop)
ins(texts,{
c=0, --Timer
text=gc.newText(getFont(int(font/5)*5 or 40),text), --String
text=gc.newText(FONT.get(int(font/5)*5 or 40),text), --String
x=x or 0, --X
y=y or 0, --Y
spd=(spd or 1)/60, --Timing speed(1=last 1 sec)
@@ -115,7 +114,7 @@ end
function TEXT.getText(text,x,y,font,style,spd,stop)--Another version of TEXT.show(), but only return text object, need manual management
return{
c=0,
text=gc.newText(getFont(int(font/5)*5 or 40),text),
text=gc.newText(FONT.get(int(font/5)*5 or 40),text),
x=x or 0,
y=y or 0,
spd=(spd or 1)/60,