整理代码

This commit is contained in:
MrZ626
2021-04-22 11:22:14 +08:00
parent 402f777a90
commit 39e6504bb5
4 changed files with 18 additions and 18 deletions

10
Zframework/aDraw.lua Normal file
View File

@@ -0,0 +1,10 @@
local printf=love.graphics.printf
local draw=love.graphics.draw
local aDraw={}
function aDraw.str(obj,x,y)printf(obj,x-626,y,1252,"center")end
function aDraw.simpX(obj,x,y)draw(obj,x-obj:getWidth()*.5,y)end
function aDraw.simpY(obj,x,y)draw(obj,x,y-obj:getHeight()*.5)end
function aDraw.X(obj,x,y,a,k)draw(obj,x,y,a,k,nil,obj:getWidth()*.5,0)end
function aDraw.Y(obj,x,y,a,k)draw(obj,x,y,a,k,nil,0,obj:getHeight()*.5)end
function aDraw.draw(obj,x,y,a,k)draw(obj,x,y,a,k,nil,obj:getWidth()*.5,obj:getHeight()*.5)end
return aDraw