It looks like you're new here. If you want to get involved, click one of these buttons!
local scorePack = TexturePack.new("images/scoreDigits.txt", "images/scoreDigits.png") scoreDigits = { Bitmap.new(scorePack:getTextureRegion("score00.png")), Bitmap.new(scorePack:getTextureRegion("score01.png")), Bitmap.new(scorePack:getTextureRegion("score02.png")), Bitmap.new(scorePack:getTextureRegion("score03.png")), Bitmap.new(scorePack:getTextureRegion("score04.png")), Bitmap.new(scorePack:getTextureRegion("score05.png")), Bitmap.new(scorePack:getTextureRegion("score06.png")), Bitmap.new(scorePack:getTextureRegion("score07.png")), Bitmap.new(scorePack:getTextureRegion("score08.png")), Bitmap.new(scorePack:getTextureRegion("score09.png")), Bitmap.new(scorePack:getTextureRegion("score10.png")), Bitmap.new(scorePack:getTextureRegion("score11.png")), } leftScoreDigits = {} rightScoreDigits = {} for i = 1, 12 do leftScoreDigits[i] = scoreDigits[i] rightScoreDigits[i] = scoreDigits[i] end -- I'm using the digit 12 for both, so the left score digit won't show. -- Using different numbers, both score digits will show. leftScoreDigits[12]:setPosition(165, 25) stage:addChild(leftScoreDigits[12]) rightScoreDigits[12]:setPosition(265, 25) stage:addChild(rightScoreDigits[12]) |
Comments