jeudi 28 juillet 2016

Pygame inflate not working

So I'm making a game using python and I'm looking to make a rectangle grow.

I saw on the pygame website that you use the inflate method and saw a demo of it and tried it but it does not work.

Here is my code:

# defining statement
player = Rect(300, 100, 50, 50)
grow = player.inflate(100, 100)

# calling statement
if player.colliderect(food):
    foods.remove(food)
    grow

Aucun commentaire:

Enregistrer un commentaire