SCR模块化
This commit is contained in:
@@ -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
14
Zframework/screen.lua
Normal 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
|
||||
Reference in New Issue
Block a user