[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Yeah looks like i'm doing quite well so far, completed my goal for today.
Humm.. I don't see why/how I should use it. When it comes to my functions I don't see how I would use it.
class map_:
def __init__(self,block=100,wndow=(300,300)):
self.BLOCK = block
self.size = wndow
self.map = []
self.surfaces = [[],[]]
self.window = pygame.display.set_mode(self.size)
pygame.init()
def create_box(self,size,color,rect):
box =
pygame.Surface((size))
pygame.draw.rect(box,color,box.get_rect())
self.surfaces[0].append(box)
self.surfaces[1].append(rect)
Can you explain a little more.
On 9/10/07, Ethan Glasser-Camp <glasse@xxxxxxxxxx> wrote:
Lamonte Harris wrote:
> Can you give me a very basic example, I've been trying to look at code
> examples and the docs and I'm still not catching on.
Attached is a very basic example. Note that I use the Rect move_ip
function; if you aren't familiar with pygame.rect.Rect, this might be
new to you.
Ethan