Lab 7: User ControlΒΆ
This lab gives you a chance to practice drawing an object with a function and allow the user to control it.
Create one program that does/implements the following:
- Create a folder for Lab 7.
- Begin your code with the Arcade Starting Template.
- Adjust the comments, particularly the beginning comment, to match what you are doing.
- Remove any part of the template that you aren’t planning on using. Like
on_mouse_press. - Create a background in the
on_drawmethod. (Feel free to use any of your code that you have written from prior labs that you have.) - Create at least two different functions that draw an object to the screen given a particular x, y coordinate. Again, feel free to pull from prior labs.
- In 9 Classes, Animation and User Control, we talked about moving graphics with the keyboard, a game controller, and the mouse. Pick two of those and use them to control two different items on the screen that are drawn by the functions you just made.
- In the case of the game controller and the keyboard, make sure to add checks so that your object does not move off-screen and get lost.
- Add a sound effect for when the user clicks the mouse button.
- Add a sound effect for when the user bumps into the edge of the screen.