I have a question please
I found how to use ... in a function, my question is can we pass additional params?
For example I have my base class:
LF_Dynamic_Character_Base = Core.class(Sprite)
function LF_Dynamic_Character_Base:init(
xworld,
xspritesheet, xname, xcols, xrows,
xscalex, xscaley,
xanchorx, xanchory, xoffsetx, xoffsety,
xdensity, xrestitution, xfriction,
xBIT, xCOLBIT, xNAME) |
Then I can do this:
LF_Dynamic_Player = Core.class(LF_Dynamic_Character_Base)
function LF_Dynamic_Player:init(...) |
But this doesn't work with additional parameters:LF_Dynamic_Bat = Core.class(LF_Dynamic_Character_Base)
function LF_Dynamic_Bat:init(..., xposx, xposy, xmove) |
Thank you for your help.
Comments
Likes: MoKaLux
I do as you showed but not in this case.
I build my levels based on Tiled (as you told me before )
Likes: MoKaLux