Hola compañeros. Tengo una pequeña animación que quiero mover por la pantalla con una patrón predefinido. No Tengo ni idea de como enfocar el asunto. He visto ejemplos por ahí pero son con objetos estáticos. Se agradecen sugerencias.
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
Sprites a traves de un path
Gracias por contestar Carlos. Esto es lo que tengo yo. Unas coordenadas sacadas de un flash. Y pretendo animar una mariposa a través de esas coordenadas.
Lo de la curva bezier me resulta muy complicado.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | local fcount = 1 local function fly() local xcords = { 370.55,388.2,404.6,419.8,432.5,443.8,454.4,464.45,476,491.1,509.2,528.5,547.9,566.95,585.4,603.15,620.1,637.45,656,675.25,694.4,712.5,727.85,740.05,750.3,759.65,768.65,778.3,789.7,803.55,820.25,838.95,858.25,876,893.45,910.55,927.85,945.85,964.6,983.7,1002.3,1019.3,1034.15,1046.8,1057.7,1067.2,1075.9,1084.9,1096.45,1107.55,1118.4,1128.9,1138.5,1146.8,1151.7,1168.25,1185.75,1179.95,1169.55 } local ycords = { 322.1,314.95,305.55,294.35,280.1,264.55,248.2,231.4,216.2,204.4,197.45,194.5,194.15,196.75,202.85,211.6,220.65,228.4,233.6,235.85,234.85,228.25,216.35,201.2,184.4,166.9,150,133.65,118.25,105.1,95.55,90.7,92.7,101.85,111.25,119.8,127.15,132.9,135.9,134.65,129.05,119.45,106.8,92.1,75.95,58.95,41.5,24.05,7.65,-7.85,-23.3,-39,-54.8,-71.35,-89.45,-98.1,-93.15,-74.1,-57.05 } local anima = movieclip.newAnim({"images/mariposa1.png","images/mariposa1.png","images/mariposa1.png","images/mariposa1.png","images/mariposa2.png","images/mariposa2.png", "images/mariposa2.png","images/mariposa2.png","images/mariposa2.png"}) if fcount <= #xcords then anima.x = xcords[fcount] anima.y = ycords[fcount] fcount = fcount + 1 anima:play() menuGroup:insert(anima) else Runtime:removeEventListener("enterFrame", fly) end end Runtime:addEventListener("enterFrame",fly) |
usa math.atan2 como ves en el sample code.
c
views:1462 update:2011/12/31 9:35:10
热门文章
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
相关文章
*Affordable* Lua Editor with syntax coloring?
override contact in precollision / box2d: contact.SetEnabled(false)
Go back to main menu
Directions to location
Austin TX Corona SDK Meetup
question about loops
Game Center support?
Porting a GS Game / Trajectory
Need Help to put app on device for testing
Text Fields
override contact in precollision / box2d: contact.SetEnabled(false)
Go back to main menu
Directions to location
Austin TX Corona SDK Meetup
question about loops
Game Center support?
Porting a GS Game / Trajectory
Need Help to put app on device for testing
Text Fields
corona forums © 2003-2011