Alpha V0.2

This commit is contained in:
MrZ_26
2020-02-04 19:26:27 +08:00
parent a85da670c8
commit 30bbf1b1db
26 changed files with 203 additions and 183 deletions

View File

@@ -55,6 +55,24 @@ function Tmr.play(dt)
PTC.attack[i]:update(dt)
end
-- Update attack beam
local list=tc.getTouches()
for K=1,#gamepad do
local b=gamepad[K]
local press=false
for k,v in ipairs(list)do
local x,y=convert(tc.getPosition(v))
if (x-b.x)^2+(y-b.y)^2<b.r then
press=true
end
end
if b.press~=press then
(press and pressKey or releaseKey)(K)
b.press=press
end
end
--Touch system
if count then
count=count-1
if count==0 then
@@ -116,6 +134,7 @@ function Tmr.play(dt)
end end
--Fresh visible time
if keyPressing[1]or keyPressing[2]then
P.moving=moving+sgn(moving)
local d=abs(moving)-gameEnv.das
if d>1 then
if gameEnv.arr>0 then
@@ -126,11 +145,11 @@ function Tmr.play(dt)
act[moving>0 and"toRight"or"toLeft"]()
end
end
P.moving=moving+sgn(moving)
else
P.moving=0
end
if keyPressing[7]then
P.downing=downing+1
local d=abs(downing)-gameEnv.sddas
if d>1 then
if gameEnv.sdarr>0 then
@@ -141,7 +160,6 @@ function Tmr.play(dt)
act.toDown()
end
end
P.downing=downing+1
else
P.downing=0
end