xOy变量收入SCR
This commit is contained in:
@@ -19,8 +19,8 @@ function back.draw()
|
||||
gc.clear(.1,.1,.1)
|
||||
end
|
||||
gc.push("transform")
|
||||
gc.replaceTransform(xOy)
|
||||
gc.translate(640,360)
|
||||
gc.translate(SCR.w/2,SCR.h/2+20*sin(t*.02))
|
||||
gc.scale(SCR.k)
|
||||
gc.scale(1.1626,1.26)
|
||||
if -t%6.26<.1355 then
|
||||
gc.translate(60*sin(t*.26),100*sin(t*.626))
|
||||
|
||||
@@ -105,8 +105,8 @@ function touchMove.mode(_,x,y,dx,dy)
|
||||
if not L[2]then
|
||||
mapCam.x,mapCam.y=mapCam.x-dx,mapCam.y-dy
|
||||
elseif not L[3]then
|
||||
x,y=xOy:inverseTransformPoint(tc.getPosition(L[1]))
|
||||
dx,dy=xOy:inverseTransformPoint(tc.getPosition(L[2]))--Not delta!!!
|
||||
x,y=SCR.xOy:inverseTransformPoint(tc.getPosition(L[1]))
|
||||
dx,dy=SCR.xOy:inverseTransformPoint(tc.getPosition(L[2]))--Not delta!!!
|
||||
local d=(x-dx)^2+(y-dy)^2
|
||||
if d>100 then
|
||||
d=d^.5
|
||||
|
||||
@@ -81,7 +81,7 @@ function touchMove.play()
|
||||
for n=1,#VK do
|
||||
local B=VK[n]
|
||||
for i=1,#l do
|
||||
local x,y=xOy:inverseTransformPoint(tc.getPosition(l[i]))
|
||||
local x,y=SCR.xOy:inverseTransformPoint(tc.getPosition(l[i]))
|
||||
if(x-B.x)^2+(y-B.y)^2<=B.r^2 then
|
||||
goto next
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user