Compare commits
2 Commits
cb59cbdcae
...
5d1b3d3fae
| Author | SHA1 | Date | |
|---|---|---|---|
| 5d1b3d3fae | |||
| 68b5bc96b3 |
@ -48,6 +48,13 @@ class Game:
|
||||
self.spinning = False
|
||||
self.spinInc = 0
|
||||
|
||||
#render variables
|
||||
self.screenMid = self.size[0]/2
|
||||
self.gunScale = self.size[1]/1080
|
||||
self.gunMid = self.screenMid-(self.gun[0][0].size[0]*self.gunScale/2)
|
||||
# TODO
|
||||
# Make the gun scale based on width of screen as well as height
|
||||
|
||||
def fire(self):#LETS GO GAMBLING
|
||||
if randint(1,6) == 6:
|
||||
self.playSound(self.gunShot)
|
||||
@ -95,7 +102,7 @@ class Game:
|
||||
|
||||
#screen code
|
||||
self.surface.fill("black")
|
||||
self.surface.blit(self.gun[self.spinInc][0],(0,0))#draw the gun
|
||||
self.surface.blit(pygame.transform.scale_by(self.gun[self.spinInc][0],self.gunScale),(self.gunMid,0))#draw the gun
|
||||
#screen.blit(pygame.transform.scale_by(MainSurface,1),(0,yOffset))#renders the main surface to the screen, while also scaling it for the required display resolution
|
||||
|
||||
# TODO:
|
||||
|
||||
Reference in New Issue
Block a user