SCR模块化

This commit is contained in:
MrZ626
2020-11-16 09:25:09 +08:00
parent f1f2eb583f
commit b1c15750b4
3 changed files with 16 additions and 11 deletions

View File

@@ -1,3 +1,4 @@
SCR= require("Zframework/screen")
COLOR= require("Zframework/color")
SCN= require("Zframework/scene")
LOG= require("Zframework/log")

14
Zframework/screen.lua Normal file
View File

@@ -0,0 +1,14 @@
local SCR={
w0=1280,h0=720,--Default Screen Size
x=0,y=0,--Up-left Coord on screen
w=0,h=0,--Fullscreen w/h in gc
W=0,H=0,--Fullscreen w/h in shader
rad=0,--Radius
k=1,--Scale size
dpi=1,--DPI from gc.getDPIScale()
xOy=love.math.newTransform(),--Screen transformation object
}
function SCR.setSize(w,h)
SCR.w0,SCR.h0=w,h
end
return SCR