Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have a space shooter Python/Pygame game where a player shoots enemy ships. After about 5 minutes, enemies stop spawning. At this point I was

I have a space shooter Python/Pygame game where a player shoots enemy ships. After about 5 minutes, enemies stop spawning. At this point I was to have boss fight take place. But I cannot get the boss ship to spawn once the enemies have stopped spawning. I have a separate class for Boss and Enemies. Getting enemies to stop spawning was fairly easy but I cannot get the boss spawn to work at all. For example, to test I wrote

if pygame.time.get_ticks() > 5000:

boss = Boss()

all_sprites.add(boss)

but the boss never appears. I tried == as well. I also though of trying a USEREVENT but that occurs repeatedly.

How can I get this to work properly? Just for testing purposes I am keeping the time short but it will eventually be around 5 minutes

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions

Question

6. Explain the power of labels.

Answered: 1 week ago

Question

10. Discuss the complexities of language policies.

Answered: 1 week ago