Awhile back I bought the ebook version of corona sdk beginners guide. In the chapter covering Egg Drop, it appears that the game is made for a iphone.
[lua]local characterSheet = sprite.newSpriteSheet
( “charSprite.png”,128, 128 )
local spriteSet = sprite.newSpriteSet(characterSheet, 1, 4)
sprite.add(spriteSet, “move”, 1, 4, 400, 0 )
charObject = sprite.newSprite( spriteSet )
charObject:prepare(“move”)
charObject:play()
charObject.x = 240; charObject.y = 250
physics.addBody( charObject, “static”, { density=1.0,
bounce=0.4, friction=0.15, shape=panShape } )
charObject.rotation = 0
charObject.isHit = false
charObject.myName = “character”[/lua]
If I’m not mistaken doesn’t sound right for moving a character plus collision. Also, is there a revision for the ebook version? Because when I downloaded the source, the lua code looks different compared to the book and chapter 7 doesn’t have a main.lua file. [import]uid: 128294 topic_id: 27388 reply_id: 327388[/import]