all repos — Legends-RPG @ 1f20be8e2b5a053cf1399827b2df12350d0d0fc3

A fantasy mini-RPG built with Python and Pygame.

data/components/portal.py (view raw)

 1__author__ = 'justinarmstrong'
 2import pygame as pg
 3from .. import constants as c
 4
 5
 6class Portal(pg.sprite.Sprite):
 7    """Used to change level state"""
 8    def __init__(self, x, y, name):
 9        super(Portal, self).__init__()
10        self.image = pg.Surface((32, 32))
11        self.image.fill(c.BLACK)
12        self.rect = pg.Rect(x*32, y*32, 32, 32)
13        self.name = name