forked from senweim/JumpKingAtHome
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBabeSprites.py
More file actions
40 lines (28 loc) · 713 Bytes
/
BabeSprites.py
File metadata and controls
40 lines (28 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env python
#
#
#
#
import pygame
import math
import collections
import os
from spritesheet import SpriteSheet
class Babe_Sprites():
def __init__(self):
self.filename = "images\\sheets\\ending_animations.png"
self.spritesheet = SpriteSheet(self.filename)
self.start_rect = (160, 0, 32, 32)
self.babe_sprite_names = ["Babe_Kiss",
"Babe_Stand1",
"Babe_Stand2",
"Babe_Stand3",
"Babe_Crouch",
"Babe_Fall",
"Babe_Jump",
"Babe_Land"]
self.babe_images = {}
self._load_images()
def _load_images(self):
images = self.spritesheet.load_grid(self.start_rect, 4, 2, -1)
self.babe_images = dict(zip(self.babe_sprite_names, images))