I’m splitting up my code into modules, since it’s getting a bit unwieldy for me. One of the modules (deck.lua) puts together some sprites in a group and returns that group.
In the scene lua file where everything should appear, I create a new instance of this group and then add it to the local group. Here’s what it looks like:
function scene:createScene( event )
local group = self.view
local cardDeck = deck.new(20)
cardDeck.x = 50
group:insert(cardDeck)
end
The problem is that setting cardDeck.x doesn’t do anything. I can set it to 0, 50, 200, whatever without a change. The sprites show up, but I can’t seem to position them.
What am I doing wrong? [import]uid: 136105 topic_id: 24384 reply_id: 324384[/import]