Tried Push library on mobile
This commit is contained in:
parent
cc83d13b38
commit
0c2629ada1
11
main.lua
11
main.lua
@ -23,7 +23,7 @@ function love.load()
|
||||
lg.setDefaultFilter("nearest")
|
||||
if game.OS ~= "Horizon" then
|
||||
game:changesize(416,234)
|
||||
love.window.setTitle('Overflown')
|
||||
love.window.setTitle('Neutron')
|
||||
w,h = love.window.getDesktopDimensions()
|
||||
res = game.OSTYPE=="PC"
|
||||
push:setupScreen(game.WIDTH, game.HEIGHT, w, h, {fullscreen = true,resizable = res, pixelperfect = true})
|
||||
@ -34,9 +34,9 @@ function love.load()
|
||||
end
|
||||
|
||||
function love.draw(screen)
|
||||
if game.OSTYPE=="PC" then push:start() end
|
||||
if game.OSTYPE~="Horizon" then push:start() end
|
||||
game:draw(screen)
|
||||
if game.OSTYPE=="PC" then push:finish() end
|
||||
if game.OSTYPE~="Horizon" then push:finish() end
|
||||
end
|
||||
|
||||
function love.update()
|
||||
@ -47,9 +47,7 @@ end
|
||||
function love.keypressed(key,scancode)
|
||||
game.inputs.keys[scancode] = true
|
||||
end
|
||||
|
||||
function love.gamepadpressed(joystick, button)
|
||||
game.inputs.buttons[button] = true
|
||||
function love.gamepadpressed(joystick, button) game.inputs.buttons[button] = true
|
||||
end
|
||||
|
||||
function love.keyreleased(key,scancode)
|
||||
@ -70,7 +68,6 @@ end
|
||||
|
||||
function love.mousepressed(x,y,button,istouch,presses)
|
||||
-- Format positions according to screen
|
||||
|
||||
if game.OS ~= "Horizon" then
|
||||
x,y = push:toGame(x,y)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user