Using import "CoreLibs/object"
what is the idiomatic (preferred) way of creating a function for a class that does have a reference to self, but is not accessible from outside the file where the class is defined?
In other words: how do I create a private function. The example below works, but I'm not sure whether there is a better way, where I don't have to pass self
explicitly as a parameter:
class('GameExplosion').extends()
local function renderShards(self)
[..]
end
local function renderExplosion(self)
[..]
end
function GameExplosion:render()
renderShards(self)
renderExplosion(self)
end