Skip to content

Instantly share code, notes, and snippets.

@hugodes
Last active December 22, 2015 14:59
Show Gist options
  • Save hugodes/6489552 to your computer and use it in GitHub Desktop.
Save hugodes/6489552 to your computer and use it in GitHub Desktop.
function newCharacter()
local t = {}
local health = 100
function t.getHealth()
return health
end
return t
end
char_1 = newCharacter()
char_2 = newCharacter()
etc ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment