Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion background.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pygame
import colorsys
class Background:
def __init__(self):
self.sprite = pygame.image.load('data/gfx/bg.png')
Expand All @@ -8,4 +9,4 @@ def setSprite(self, tint):
copy = self.uncoloredSprite.copy()
color = colorsys.hsv_to_rgb(tint,1,1)
copy.fill((color[0]*255, color[1]*255, color[2]*255), special_flags=pygame.BLEND_ADD)
self.sprite = copy
self.sprite = copy
12 changes: 6 additions & 6 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import pygame, sys, time, random, colorsys, math
from pygame.math import Vector2
from pygame.locals import *
from .player import Player
from .background import Background
from .button import Button
from .bean import Bean
from .utils import clamp
from .utils import checkCollisions
from player import Player
from background import Background
from button import Button
from bean import Bean
from utils import clamp
from utils import checkCollisions


def main():
Expand Down