Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit example code in lessons #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

s2t2
Copy link

@s2t2 s2t2 commented Sep 7, 2017

These revisions get past some issues I was running into when getting to lesson 6 and 7 and 3.

@s2t2
Copy link
Author

s2t2 commented Sep 7, 2017

(although I'm at this time running into an error TypeError: '>=' not supported between instances of 'float' and 'NoneType' due to self.next_time = None in the Spawner initializer)

@s2t2
Copy link
Author

s2t2 commented Sep 7, 2017

Most recent push fixes #3 (comment).

@s2t2 s2t2 changed the title Resolve load error and erroneous file reference. Edit example code in lessons Sep 7, 2017
Copy link
Owner

@pathunstrom pathunstrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added two comments that need changes. When cleaned up, I can accept these changes.

@@ -48,6 +48,7 @@ Let's make some collisions!
enemies = self.groups["enemy"]
groupcollide(player, enemies, True, True)
groupcollide(enemies, bullets, True, True)
self.spawner.spawn(time_delta)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in lesson six, the scene doesn't have a spawner yet, so this will throw an error.

This line needs to be removed.

(image.get_width() * 0.5,
image.get_height() * 0.5))
( int(image.get_width() * 0.5),
int(image.get_height() * 0.5)) )
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code samples in this project follow PEP8, extra spaces around parentheses is not to style.

Could you remove them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants