Merge branch 'debug' into leaderboard
This commit is contained in:
+8
-3
@@ -5,9 +5,11 @@ Main game class
|
||||
|
||||
import pygame
|
||||
import random
|
||||
import os
|
||||
|
||||
from collections import deque
|
||||
|
||||
from Background import Background
|
||||
from Player import Player
|
||||
from StandingEnemy import StandingEnemy
|
||||
from FlyingEnemy import FlyingEnemy
|
||||
@@ -65,6 +67,8 @@ class Drakora():
|
||||
|
||||
|
||||
def newGame(self):
|
||||
self.background = Background(self)
|
||||
|
||||
for enemy in self.enemies:
|
||||
enemy.kill()
|
||||
|
||||
@@ -113,7 +117,7 @@ class Drakora():
|
||||
|
||||
self.targetFps = 120
|
||||
|
||||
self.floorHeight = 50
|
||||
self.floorHeight = 64
|
||||
|
||||
self.players = pygame.sprite.Group()
|
||||
self.floors = pygame.sprite.Group()
|
||||
@@ -131,7 +135,6 @@ class Drakora():
|
||||
self.isGodmode = False
|
||||
self.drawBoxes = False
|
||||
|
||||
|
||||
self.font = pygame.font.match_font('liberation mono')
|
||||
self.fontScore = pygame.font.Font(self.font, 32)
|
||||
self.fontMessage = pygame.font.Font(self.font, 56)
|
||||
@@ -166,7 +169,8 @@ class Drakora():
|
||||
|
||||
|
||||
def render(self):
|
||||
self.screen.fill((102, 153, 255))
|
||||
# self.screen.fill((102, 153, 255))
|
||||
self.background.draw(self.screen)
|
||||
for cloudGroup in self.cloudGroups: cloudGroup.draw(self.screen)
|
||||
self.enemies.draw(self.screen)
|
||||
self.players.draw(self.screen)
|
||||
@@ -304,6 +308,7 @@ class Drakora():
|
||||
|
||||
if not self.isGameOver and not self.isPaused:
|
||||
self.time += 1/self.targetFps
|
||||
self.background.update()
|
||||
|
||||
for cloudGroup in self.cloudGroups: cloudGroup.update()
|
||||
self.enemies.update()
|
||||
|
||||
Reference in New Issue
Block a user