Game Development Reference
In-Depth Information
cc.Label:createWithTTF(ttfConfig, "0",
cc.TEXT_ALIGNMENT_RIGHT , 150)
self.diamondScoreLabel:setPosition (140,
constants.SCREEN_HEIGHT - 30)
self:addChild(self.diamondScoreLabel)
self.scoreLabel = cc.Label:createWithTTF(ttfConfig,
"0", cc.TEXT_ALIGNMENT_RIGHT , 150)
self.scoreLabel:setPosition (330,
constants.SCREEN_HEIGHT - 30)
self:addChild(self.scoreLabel)
end
The main difference when compared to the C++ implementation of La-
bel:createWithTTF is that, in Lua, we have a configuration table for the font.
Search WWH ::




Custom Search