I have been creating a simple HUD for player stats display and weapon stats display. This is just playing around learning the systems involved, not for any specific gameplay model.
I would like to consolidate all the HUD code into a single script instead of having some code in Player.lua, some code in weapon.lua, etc, and then just call a repaint or update function from the requisite player or weapon script.
How would one go about doing this?
Does 'importing' or 'requiring' a script duplicate that entire script inside the importing script or just allow access to its functions and variables?