[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Fill a Rect object with color?



i tried that the problem is that class BoomTower has rect object rangerect,
and in

class BoomTower( yattayatta )
    def __init__(yatta, yatta):
          (rangerect defined)
    def shoot( yatta, yatta):
          (this code here needs to do the filling)

so ya the last line of function BoomTower.shoot needs to fill that BoomTower object's
rangerect with a certain color

does that make any sense? Not to be rude but am i confusing you?


--- On Sat, 11/7/09, Ian Mallett <geometrian@xxxxxxxxx> wrote:

From: Ian Mallett <geometrian@xxxxxxxxx>
Subject: Re: [pygame] Fill a Rect object with color?
To: pygame-users@xxxxxxxx
Date: Saturday, November 7, 2009, 12:45 PM

I don't think rect objects were meant for that.  You could go:

rect = a rect object
pygame.draw.rect(surface,color,rect,0)

Ian