forked from ismailhasannnnnn/PyMario
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkoopa.py
More file actions
17 lines (14 loc) · 638 Bytes
/
koopa.py
File metadata and controls
17 lines (14 loc) · 638 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import pygame as pg
from vector import Vector
from coords import Coords
from enemy import Enemy
class Koopa(Enemy):
koopa1_rect = Coords.coords["KOOPA_1"]
koopa2_rect = Coords.coords["KOOPA_2"]
koopa3_rect = Coords.coords["KOOPA_3"]
koopa4_rect = Coords.coords["KOOPA_4"]
def __init__(self, game, ul):
koopa_images = [pg.transform.rotozoom(game.spritesheet.image_at(Koopa.koopa1_rect), 0, 2),
pg.transform.rotozoom(game.spritesheet.image_at(Koopa.koopa2_rect), 0, 2)]
super().__init__(game, ul, image_list=koopa_images, delay=300, isLoop=True)
self.v = Vector(-1, 0)