Demo entry 2445061


Submitted by on Aug 21, 2015 at 00:55
Language: Python. Code size: 644 Bytes.

    def __init__(self, name, x, y, itemType, image, sound=None):#-adjust this
        '''x: x coordinate
        y: y coordinate
        itemType: a dict with one key value pair {'item_name':quantity}
        image: image string
        sound: sound string'''
        self.image = pygame.image.load(image).convert_alpha()
        self.rect = self.image.get_rect()
        self.rect.x = x
        self.rect.y = y = name#--------add this
        self.itemType = itemType

    def get_name(self):#--------add this

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).