filmov
tv
Add Red Food To Feed Aspen Game - PyGame Thursdays 18

Показать описание
In this video we'll add in red food to our Feed Aspen game for Pygame and Python.
If Aspen eats the red food, she scores...if she touches the blue food, she dies!
This is a little more complicated than you might think and we'll have to make some big changes to the code.
#pygame #codemy #JohnElder
Timecodes
0:00 - Introduction
0:40 - Change Aspen Group
1:20 - Change Food Group
2:28 - Define Red/Blue Food Images
3:20 - Add Food Images To Food Group
5:50 - Add Attributes to Food Class
8:38 - Update Collisions
9:16 - SpriteCollideAny
12:12 - Check for Food Type
13:09 - Blue lose life
13:38 - Red Remove Food, Add Score
14:30 - Reset Aspen
16:42 - Conclusion
If Aspen eats the red food, she scores...if she touches the blue food, she dies!
This is a little more complicated than you might think and we'll have to make some big changes to the code.
#pygame #codemy #JohnElder
Timecodes
0:00 - Introduction
0:40 - Change Aspen Group
1:20 - Change Food Group
2:28 - Define Red/Blue Food Images
3:20 - Add Food Images To Food Group
5:50 - Add Attributes to Food Class
8:38 - Update Collisions
9:16 - SpriteCollideAny
12:12 - Check for Food Type
13:09 - Blue lose life
13:38 - Red Remove Food, Add Score
14:30 - Reset Aspen
16:42 - Conclusion
Комментарии