« All Events
7:30 PM – Python Game Development – Bill
April 1 @ 7:30 pm - 8:30 pm
Your HW:
- Create a new file called bullet.py
- Make it a sprite similar to cloud but with only 1 image
- Make it be able to move left or right based on the direction attribute
- Test it out in both directions so that it 100% works
- In the main, create a bullet group and make sure to update it in the game loop
- Create a spawn_bullet method that is also called in the game loop
- In the spawn_bullet method, check if the player presses the space bar
- When they do, create a new bullet and add it to the bullet group