initial commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
local network = require("client")
|
||||
|
||||
local player = {
|
||||
x = 100,
|
||||
y = 100,
|
||||
}
|
||||
|
||||
function love.load()
|
||||
network.connect("127.0.0.1", 9000)
|
||||
|
||||
network.on(network.MSG_GAMESTATE, function(payload)
|
||||
print("Server:", payload)
|
||||
end)
|
||||
end
|
||||
|
||||
function love.keypressed(key)
|
||||
network.sendKey(key)
|
||||
end
|
||||
|
||||
function love.update()
|
||||
network.update()
|
||||
end
|
||||
|
||||
function love.draw()
|
||||
love.graphics.print("Connected", 20, 20)
|
||||
|
||||
love.graphics.circle("fill", player.x, player.y, 10)
|
||||
end
|
||||
Reference in New Issue
Block a user