Posted by King_Critter on Tue 30th Jun 06:47
download | new post | report as spam

  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3.  
  4. from math import *
  5. import pygame
  6. import random
  7. from pygame.locals import *
  8. from sys import exit
  9. from gameobjects.vector2 import Vector2
  10.  
  11. from classes import *
  12.  
  13. def quit():
  14.         pressed_keys = pygame.key.get_pressed()
  15.         if pressed_keys[K_ESCAPE]:
  16.                 exit()
  17.  
  18.         event = pygame.event.poll()
  19.         if event.type == QUIT:
  20.                 exit()
  21.  
  22. pygame.init()
  23.  
  24. screen = pygame.display.set_mode((800, 600), 0, 32)
  25. pygame.display.set_caption("Critter Ball!")
  26.  
  27. zombie = Zombie("Bob")
  28. enemy = [zombie]
  29. player = Player("Critter")
  30.  
  31. while True:
  32.  
  33.         quit()
  34.        
  35.         screen.fill((255, 255, 255))
  36.  
  37.         player.movement(enemy)
  38.  
  39.         pygame.draw.circle(screen, (255,0,0), (zombie.x,zombie.y), 10)
  40.         pygame.draw.circle(screen, (0,255,0), (player.x,player.y), 10)
  41.  
  42.        
  43.         pygame.display.update()

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily
.
Syntax highlighting:

To highlight particular lines, prefix each line with @@
   Remember me