poppy-client/lua/player.lua

17 lines
371 B
Lua

local playerfuncs = {}
playerfuncs.newPlayer = function(arg)
assert(arg.avatar)
assert(arg.name)
local playerTable = {}
playerTable.avatar = arg.avatar
playerTable.name = arg.name
playerTable.speed = {}
playerTable.speed.x = 0
playerTable.speed.y = 0
playerTable.x = 16
playerTable.y = 16
playerTable.flying = false
return playerTable
end
return playerfuncs