summaryrefslogtreecommitdiffstats
path: root/Jumper-main/Day 2/platform.py
blob: 2c1cd4c15b0303c0c3f2842ee1ae96dd16b80467 (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):
		r = pygame.Rect(self.position.x, self.position.y, self.width, self.height)
		pygame.draw.rect(screen, self.color, r)