Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Corona SDK, I'm trying to make an animation of a simple round of the game pong. When it comes to moving the ball and

In Corona SDK, I'm trying to make an animation of a simple round of the game pong. When it comes to moving the ball and bouncers I can make them move to a spot using the transition.to command. My question is how do I keep the animation going after it reaches the 1st spot. My lines of code are the following when it comes to the initial move:

transition.to(left, {x=50, y=display.contentHeight/2-150, time=2000}) transition.to(right, {x=590, y=display.contentHeight/2+150, time=2000}) transition.to(ball, {x=230, y=display.contentHeight/2-175, time=2000})

I have tried to make another transition.to command after the 1st one but then it skips the 1st line and instantly does the last step. Another thing I tried is having an if-than function where if objects y value == _ then transition.to new y value but it didn't go to the next Y value after the 1st one.

Also attached are the beginning and end of of the 1st animation to see where they start and stop. I also need to make a button to pause and resume the animation as it goes, which I have yet to figure out either.

image text in transcribedimage text in transcribed

Animation Project 1 - So... File Hardware View Help

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions