예제 #1
0
 def __init__(self, raw_image, position, _dir):
     OnBoard.__init__(self, raw_image, position)
     self.__coinAnimState = 0  # Initialize animation state to 0
     self.IMAGES = {
         "coin1":
         pygame.transform.scale(
             pygame.image.load(os.path.join(_dir, 'assets/coin1.png')),
             (15, 15)).convert_alpha(),
         "coin2":
         pygame.transform.scale(
             pygame.image.load(os.path.join(_dir, 'assets/coin2.png')),
             (15, 15)).convert_alpha(),
         "coin3":
         pygame.transform.scale(
             pygame.image.load(os.path.join(_dir, 'assets/coin3.png')),
             (15, 15)).convert_alpha(),
         "coin4":
         pygame.transform.scale(
             pygame.image.load(os.path.join(_dir, 'assets/coin4.png')),
             (15, 15)).convert_alpha(),
         "coin5":
         pygame.transform.scale(
             pygame.image.load(os.path.join(_dir, 'assets/coin5.png')),
             (15, 15)).convert_alpha()
     }
예제 #2
0
 def __init__(self, raw_image, position, _dir):
     OnBoard.__init__(self, raw_image, position)
     self.__coinAnimState = 0  # Initialize animation state to 0
     self.IMAGES = {
         "coin1": pygame.transform.scale(pygame.image.load(os.path.join(_dir, 'assets/coin1.png')), (15, 15)).convert_alpha(),
         "coin2": pygame.transform.scale(pygame.image.load(os.path.join(_dir, 'assets/coin2.png')), (15, 15)).convert_alpha(),
         "coin3": pygame.transform.scale(pygame.image.load(os.path.join(_dir, 'assets/coin3.png')), (15, 15)).convert_alpha(),
         "coin4": pygame.transform.scale(pygame.image.load(os.path.join(_dir, 'assets/coin4.png')), (15, 15)).convert_alpha(),
         "coin5": pygame.transform.scale(pygame.image.load(os.path.join(_dir, 'assets/coin5.png')), (15, 15)).convert_alpha()
     }
예제 #3
0
 def __init__(self, raw_image, position, _dir):
     OnBoard.__init__(self, raw_image, position)
     self.__enemyAnimState = 0  # Initialize animation state to 0
     self.IMAGES = {
         "enemy1": pygame.transform.scale(pygame.image.load(os.path.join(_dir, 'assets/enemy1.png')), (15, 15)).convert_alpha(),
         "enemy2": pygame.transform.scale(pygame.image.load(os.path.join(_dir, 'assets/enemy1.png')), (15, 15)).convert_alpha(),
         "enemy3": pygame.transform.scale(pygame.image.load(os.path.join(_dir, 'assets/enemy1.png')), (15, 15)).convert_alpha(),
         "enemy4": pygame.transform.scale(pygame.image.load(os.path.join(_dir, 'assets/enemy1.png')), (15, 15)).convert_alpha(),
         "enemy5": pygame.transform.scale(pygame.image.load(os.path.join(_dir, 'assets/enemy1.png')), (15, 15)).convert_alpha()
     }