-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsmallJump.py
More file actions
23 lines (19 loc) · 746 Bytes
/
smallJump.py
File metadata and controls
23 lines (19 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import pygame
from pygame.sprite import AbstractGroup
class SmallJump(pygame.sprite.Sprite):
def __init__(self, *groups: AbstractGroup, x, y, image):
super().__init__(*groups)
self.name = "small"
self.image = image
self.collision = self.image.get_rect()
self.collision.x = x
self.collision.y = y
self.jumpSurfaceCollision = pygame.rect.Rect(230, 282, 14, 5000)
self.jumpSurfaceCollision.x = x + 230
self.jumpSurfaceCollision.y = y + 282
self.allCollision = [
pygame.rect.Rect(x, 848, 247, 234),
pygame.rect.Rect(x+400, 848, 247, 234),
]
def getCordinates(self):
return (self.collision.x, self.collision.y)