Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change sprites and add background

  • Loading branch information...
commit 1a04eea026edab225479104da121eded2568d01d 1 parent aab1a32
@flavioribeiro flavioribeiro authored
View
16 jailbreakerz/game.py
@@ -19,6 +19,17 @@
import cocos
+class Background(Layer):
+ def __init__(self):
+ super(Background, self).__init__()
+ self.img = pyglet.resource.image('media/imgs/background.png')
+
+ def draw(self):
+ glPushMatrix()
+ self.transform()
+ self.img.blit(0,0)
+ glPopMatrix()
+
class Game(Scene):
is_event_handler = True
@@ -49,6 +60,11 @@ def load_catcher(self):
def load_scenario(self):
+ self.background = Background()
+# self.background = Sprite('media/imgs/background.png')
+# self.background.position = 0,0
+ self.add(self.background)
+
self.prison = Sprite('media/imgs/prison.png')
self.prison.position = 100,170
self.add(self.prison)
View
BIN  jailbreakerz/media/imgs/background.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  jailbreakerz/media/imgs/fat_thief.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  jailbreakerz/media/imgs/prison.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  jailbreakerz/media/imgs/skinny_thief.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  jailbreakerz/media/imgs/small_thief.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  jailbreakerz/media/imgs/tall_thief.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.