Skip to content

Commit

Permalink
Organize the entire game
Browse files Browse the repository at this point in the history
  • Loading branch information
nigamanthsrivatsan authored Jan 22, 2021
1 parent 3609bd0 commit a56d749
Show file tree
Hide file tree
Showing 6 changed files with 304 additions and 299 deletions.
11 changes: 11 additions & 0 deletions background.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pygame
class Background:
def __init__(self):
self.sprite = pygame.image.load('data/gfx/bg.png')
self.position = 0
self.uncoloredSprite = pygame.image.load('data/gfx/bg.png')
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
6 changes: 6 additions & 0 deletions bean.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import pygame
class Bean:
def __init__(self):
self.sprite = pygame.image.load('data/gfx/bean.png')
self.position = pygame.Vector2()
self.position.xy
7 changes: 7 additions & 0 deletions button.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import pygame
class Button:
def __init__(self):
self.price = 3
self.level = 1
sprite = pygame.image.load('data/gfx/button.png')
typeIndicatorSprite = pygame.image.load('data/gfx/null_indicator.png')
Loading

2 comments on commit a56d749

@hacker1234-pro
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good project love it best game but i can make you better at python use ursina python you can make 3d games like fps

@hacker1234-pro
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dc654e6b256bf830cb84bba44c28cb7a24cfc908

Please sign in to comment.