Changed locations, added Localization folder
Nothing except Title. Minor push, no update.
This commit is contained in:
parent
e9da50897f
commit
520dddedf6
5 changed files with 77 additions and 77 deletions
|
|
@ -7,4 +7,51 @@ function mouseOver(object)
|
|||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function keyboard_input_held(object, dt)
|
||||
object.bools.isWalking = false
|
||||
object.bools.isRunning = false
|
||||
mouse.x, mouse.y = love.mouse.getPosition
|
||||
if love.keyboard.isDown("lshift") then
|
||||
object.bools.isRunning = true
|
||||
end
|
||||
if love.keyboard.isDown(keybind.left) and love.keyboard.isDown(keybind.right) then
|
||||
-- you're stopped now :3c
|
||||
elseif love.keyboard.isDown(keybind.left) then
|
||||
object.bools.isWalking = true
|
||||
if math.abs(object.physics.velocityX) + 0.1 < object.functions.getRunningSpeed(object.bools.isRunning) then object.physics.velocityX = object.physics.velocityX - 0.1 else object.physics.velocityX = object.functions.getRunningSpeed(object.bools.isRunning)* -1 end
|
||||
elseif love.keyboard.isDown(keybind.right) then
|
||||
object.bools.isWalking = true
|
||||
if math.abs(object.physics.velocityX) < object.functions.getRunningSpeed(object.bools.isRunning) then object.physics.velocityX = object.physics.velocityX + 0.1 else object.physics.velocityX = object.functions.getRunningSpeed(object.bools.isRunning) end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function love.mousemoved(x, y)
|
||||
if x > player.x then
|
||||
player.bools.isFacingRight = true
|
||||
else
|
||||
player.bools.isFacingRight = false
|
||||
end
|
||||
end
|
||||
|
||||
function love.keypressed(key)
|
||||
if Scene == "gameTest" then
|
||||
if key == keybind.jump then player.physics.velocityY = player.physics.velocityY - 3 end
|
||||
if key == keybind.interact then
|
||||
check_space.interactables(player.x, player.y)
|
||||
end
|
||||
if key == keybind.create then
|
||||
NPCs[#NPCs+1] = character.create({"attributes", "functions","bools","physics"}, false)
|
||||
NPCs[#NPCs].x = math.random(0, window.x-20)
|
||||
NPCs[#NPCs].y = window.y/2-window.y/20
|
||||
NPCs[#NPCs].width = 20
|
||||
NPCs[#NPCs].height = 80
|
||||
end
|
||||
else
|
||||
if key == keybind.jump then
|
||||
titleCard.duration = true
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue