I want to make a game that involves drawing a line so a ball will go down the line. How do i write code to make a line? Thank you.
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
How to draw a line
I assume you want the user to draw the line, correct?
I knew it! This should probably get you what you want:
re: drawing a line
store the touch points in a table in the "moved" phase. meanwhile, during every enterframe remove & redraw the line between the points.
this is the technique suggested by ansca. you might think you would just :append to the line every time you process a touch "moved" but this is not the method that works.
however as for physics on the line i'm not sure.
views:2040 update:2011/9/21 9:18:04
热门文章
GameCenter LeaderBoards and Achievements Enabled Through OpenFeint
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
corona forums © 2003-2011