I want to create a High Score for this game.
Each fruit you slice gets 15points.
I’ve tried the codes but none of them seem to work.
I got one atm but score shows behind background image and it has a result of (WIN) as the score.
http://developer.anscamobile.com/code/samurai-fruit
this is the game i edited.
Below is one part of the game code I have.
[blockcode]
function setUpBackground()
local background = display.newImage(“bg.png”, true)
background.x = display.contentWidth / 2
background.y = display.contentHeight / 2
end
– score display
local scoreDisplay = ui.newLabel{
bounds = { display.contentWidth - 120, 10 + display.screenOriginY, 100, 24 }, – align label with right side of current screen
text = “0”,
textColor = { 255, 225, 102, 255 },
size = 110,
align = “right”
}
score = 0
scoreDisplay:setText( score )
scoreDisplay:setText( system.getInfo(“platformName”)
)
[/blockcode]
And I want it to post on Fient as the high score?
One more question that I can’t find the answer for.
If i wanted to add the in app-purchasing in the game.
And for a example: you pay $1 to start the score with 500points
and if the game is turned off, the 100points will not save for the user so he has to purchase again… am I able to do that?
Sorry if any confusing things I’ve wrote.
Thanks
Wahid [import]uid: 58887 topic_id: 10648 reply_id: 310648[/import]
[import]uid: 52491 topic_id: 10648 reply_id: 38692[/import]