Skip to content
This repository
Browse code

Change sprites and add background

  • Loading branch information...
commit 1a04eea026edab225479104da121eded2568d01d 1 parent aab1a32
Flávio Ribeiro authored October 20, 2010
16  jailbreakerz/game.py
@@ -19,6 +19,17 @@
19 19
 import cocos
20 20
 
21 21
 
  22
+class Background(Layer):
  23
+    def __init__(self):
  24
+        super(Background, self).__init__()
  25
+        self.img = pyglet.resource.image('media/imgs/background.png')
  26
+
  27
+    def draw(self):
  28
+        glPushMatrix()
  29
+        self.transform()
  30
+        self.img.blit(0,0)
  31
+        glPopMatrix()
  32
+
22 33
 class Game(Scene):
23 34
 
24 35
     is_event_handler = True
@@ -49,6 +60,11 @@ def load_catcher(self):
49 60
 
50 61
 
51 62
     def load_scenario(self):
  63
+        self.background = Background()
  64
+#        self.background = Sprite('media/imgs/background.png')
  65
+#        self.background.position = 0,0
  66
+        self.add(self.background)
  67
+
52 68
         self.prison = Sprite('media/imgs/prison.png')
53 69
         self.prison.position = 100,170
54 70
         self.add(self.prison)
BIN  jailbreakerz/media/imgs/background.png
BIN  jailbreakerz/media/imgs/fat_thief.png
BIN  jailbreakerz/media/imgs/prison.png
BIN  jailbreakerz/media/imgs/skinny_thief.png
BIN  jailbreakerz/media/imgs/small_thief.png
BIN  jailbreakerz/media/imgs/tall_thief.png

0 notes on commit 1a04eea

Please sign in to comment.
Something went wrong with that request. Please try again.