all repos — Legends-RPG @ 852f0119dd576c36d4c94734697e77a0544c1024

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