Pong ball that moves without gravity across the screen.
More...
|
| 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...
|
| |
Pong ball that moves without gravity across the screen.
◆ Awake()
Initialize references and set the movement direction.
◆ FixedUpdate()
| void AIBall.FixedUpdate |
( |
| ) |
|
Save the velocity of the ball so it can continue moving after * leaving and coming back to the menu.
◆ OnCollisionEnter2D()
| void AIBall.OnCollisionEnter2D |
( |
Collision2D |
collision | ) |
|
Play pong sounds when the ball hits objects.
- Parameters
-
| collision | Object the ball hit. |
◆ OnEnable()
Make sure the ball is moving when the menu gets enabled.
◆ moveDirection
| Vector2 AIBall.moveDirection |
The direction the ball should initially move.
The documentation for this class was generated from the following file: