initialized a knobs module
This commit is contained in:
34
main.py
Normal file
34
main.py
Normal file
@ -0,0 +1,34 @@
|
||||
# Example file showing a basic pygame "game loop"
|
||||
import pygame
|
||||
from knob import *
|
||||
|
||||
# pygame setup
|
||||
pygame.init()
|
||||
screenW = 561
|
||||
screenH = 325
|
||||
screen = pygame.display.set_mode((screenW, screenH))
|
||||
knob1 = Knob(screen)
|
||||
|
||||
clock = pygame.time.Clock()
|
||||
running = True
|
||||
|
||||
while running:
|
||||
# poll for events
|
||||
# pygame.QUIT event means the user clicked X to close your window
|
||||
for event in pygame.event.get():
|
||||
if event.type == pygame.QUIT:
|
||||
running = False
|
||||
|
||||
# fill the screen with a color to wipe away anything from last frame
|
||||
screen.fill("black")
|
||||
|
||||
# RENDER YOUR GAME HERE
|
||||
knob1.display()
|
||||
|
||||
|
||||
# flip() the display to put your work on screen
|
||||
pygame.display.flip()
|
||||
|
||||
clock.tick(60) # limits FPS to 60
|
||||
|
||||
pygame.quit()
|
||||
Reference in New Issue
Block a user