I have the following code :
{
identifier = "hand:" .. card.name,
area = { x, y, 100, 100 },
on_click = function()
-- Code goes here
end
}
I want to use the card variable and a reference to the object where this code is placed to modify a variable of the class with a value of the card variable.
So, how can I give parameters from the local context to the function who will be called in other pieces of code ?
I wish to launch the on_click function in an event management loop.
save it when you assign the function, like this