prepend directory

This commit is contained in:
Frank DeMarco 2013-03-17 03:21:40 +09:00
parent df5acb0e91
commit f2de153016
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
from os import listdir
from os.path import isfile
from os.path import isfile, join
from pygame import Color, Rect
from pygame.image import load
@ -26,7 +26,7 @@ class Sprite(Animation):
if isfile(path):
paths = [path]
else:
paths = sorted(listdir(path))
paths = [join(path, name) for name in sorted(listdir(path))]
for path in paths:
self.add_frame(load(path), transparency)