blob: 33d0675859a5cb469af5e7fdb9fd324bf727af49 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
from setup import *
class Platform:
width, height = 200, 5
color = (0, 0, 0)
# Called on platform creation
def __init__(self, x, y):
self.position = pygame.Vector2(x, y)
# Draws the platform every frame
def draw(self, screen, camera_y):
r = pygame.Rect(self.position.x, self.position.y - camera_y, self.width, self.height)
pygame.draw.rect(screen, self.color, r)
|