Professional Documents
Culture Documents
PRO-C2: What Is Our GOAL For This MODULE?
PRO-C2: What Is Our GOAL For This MODULE?
RO-C2
Sprite Objects
he content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to
© 2019 T
share any part of this message with any third party without a written consent of the sender. If you received this message by mistake,
please reply to this message and follow with its deletion, so that we can ensure such a mistake does not occur in the future.
P
RO-C2
he content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to
© 2019 T
share any part of this message with any third party without a written consent of the sender. If you received this message by mistake,
please reply to this message and follow with its deletion, so that we can ensure such a mistake does not occur in the future.
P
RO-C2
2. Look into the 'Sprites' section under our Toolbox. It should tell us how to create a
Sprite object and what properties and functions it has.
he content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to
© 2019 T
share any part of this message with any third party without a written consent of the sender. If you received this message by mistake,
please reply to this message and follow with its deletion, so that we can ensure such a mistake does not occur in the future.
P
RO-C2
*Note: Sprites are always rectangular, you can give them a shape later.
● Output:
he content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to
© 2019 T
share any part of this message with any third party without a written consent of the sender. If you received this message by mistake,
please reply to this message and follow with its deletion, so that we can ensure such a mistake does not occur in the future.
P
RO-C2
● Output:
● Output: The ball keeps moving to and fro near the boundary.
he content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to
© 2019 T
share any part of this message with any third party without a written consent of the sender. If you received this message by mistake,
please reply to this message and follow with its deletion, so that we can ensure such a mistake does not occur in the future.
P
RO-C2
he content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to
© 2019 T
share any part of this message with any third party without a written consent of the sender. If you received this message by mistake,
please reply to this message and follow with its deletion, so that we can ensure such a mistake does not occur in the future.
P
RO-C2
ball2.velocityX = 3;
ball2.velocityY = 3;
ball3.velocityX = -2;
ball3.velocityY = -2;
ball4.velocityX = 2;
ball4.velocityY = -3;
function draw() {
//make the background white
background("white");
ball2.bounce(ball3);
ball2.bounce(ball4);
ball3.bounce(ball4);
he content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to
© 2019 T
share any part of this message with any third party without a written consent of the sender. If you received this message by mistake,
please reply to this message and follow with its deletion, so that we can ensure such a mistake does not occur in the future.
P
RO-C2
Output:
he content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to
© 2019 T
share any part of this message with any third party without a written consent of the sender. If you received this message by mistake,
please reply to this message and follow with its deletion, so that we can ensure such a mistake does not occur in the future.
P
RO-C2
What’s NEXT?
We will continue to work on the same game. We are going to use the bouncing ball
animation to create a more challenging game.
he content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to
© 2019 T
share any part of this message with any third party without a written consent of the sender. If you received this message by mistake,
please reply to this message and follow with its deletion, so that we can ensure such a mistake does not occur in the future.