Compare commits

..

2 Commits

View File

@ -1,8 +1,8 @@
import pygame import pygame
from random import randint from random import randint
screenx = 1280 screenw = 1280
screeny = 720 screenh = 720
yOffset = 0 yOffset = 0
pygame.init() pygame.init()
@ -14,7 +14,8 @@ GunShot = pygame.mixer.Sound("sfx/gun-shot.mp3")
GunSpin = pygame.mixer.Sound("sfx/gun-spin.mp3") GunSpin = pygame.mixer.Sound("sfx/gun-spin.mp3")
screen = pygame.display.set_mode((screenx,screeny)) screen = pygame.display.set_mode((screenw,screenh))
MainSurface = pygame.Surface((screenw,screenh-yOffset))
clock = pygame.time.Clock() clock = pygame.time.Clock()
running = True #you better start running... running = True #you better start running...
@ -33,8 +34,8 @@ while running:
screen.fill("black") screen.fill("black")
fireButton = pygame.Rect(0,0,300,100) pygame.draw.rect(MainSurface, (30,30,30), (0,0,300,100))
pygame.draw.rect(screen, (30,30,30), fireButton) screen.blit(MainSurface,(0,yOffset))
pygame.display.flip() pygame.display.flip()