DoopelPonger
|
Pong ball that moves without gravity across the screen. More...
Public Member Functions | |
void | Awake () |
Initialize references and set the movement direction. More... | |
void | OnEnable () |
Make sure the ball is moving when the menu gets enabled. More... | |
void | FixedUpdate () |
Save the velocity of the ball so it can continue moving after * leaving and coming back to the menu. More... | |
void | OnCollisionEnter2D (Collision2D collision) |
Play pong sounds when the ball hits objects. More... | |
Public Attributes | |
Vector2 | moveDirection |
Pong ball that moves without gravity across the screen.
void AIBall.Awake | ( | ) |
Initialize references and set the movement direction.
void AIBall.FixedUpdate | ( | ) |
Save the velocity of the ball so it can continue moving after * leaving and coming back to the menu.
void AIBall.OnCollisionEnter2D | ( | Collision2D | collision | ) |
Play pong sounds when the ball hits objects.
collision | Object the ball hit. |
void AIBall.OnEnable | ( | ) |
Make sure the ball is moving when the menu gets enabled.
Vector2 AIBall.moveDirection |
The direction the ball should initially move.