Skip to content

Commit

Permalink
Update blocks.py
Browse files Browse the repository at this point in the history
Глюк с картинками, когда запускали из консоли
  • Loading branch information
Velesey committed Sep 21, 2013
1 parent 938fac6 commit bf5db05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
# -*- coding: utf-8 -*-

from pygame import *
import os

PLATFORM_WIDTH = 32
PLATFORM_HEIGHT = 32
PLATFORM_COLOR = "#FF6262"

ICON_DIR = os.path.dirname(__file__) # Полный путь к каталогу с файлами

class Platform(sprite.Sprite):
def __init__(self, x, y):
sprite.Sprite.__init__(self)
self.image = Surface((PLATFORM_WIDTH, PLATFORM_HEIGHT))
self.image.fill(Color(PLATFORM_COLOR))
self.image = image.load("blocks/platform.png")
self.image = image.load("%s/blocks/platform.png" % ICON_DIR)
self.rect = Rect(x, y, PLATFORM_WIDTH, PLATFORM_HEIGHT)

0 comments on commit bf5db05

Please sign in to comment.