corona - Needing advice about my game logic -


i creating game given few letters (they images, each letter image) , you have empty slots (an image of black box).

when user touches image of letter, clones letter, , starts moving clone user touching, , if put 1 of slots (one of black boxes) drops there, if didn't move black box resets (the clone disappears, dropped).

now using storyboard here, , have level1.lua file ready, scene background , all.

what logic should use here? tried googling tutorials drag , drop in corona couldn't find any.

can recommend logic within storyboard messed file?

you can use methods in logic

  • physics collision

    the letters , slots have physics bodies, can drag letter , when letter collides on slot body can collision data , can able drop letter.

  • rectangle approach

    this straight forward. have of slots' x, y, width , height , compare letter's x , y when dragged it. letter's x , y must between slot's (x x+width) , (y y+height) can drop letter specified slot.

it how code this. idea drag , drop.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -