Posted by King_Critter on Tue 30th Jun 06:47
download | new post | report as spam
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- from math import *
- import pygame
- import random
- from pygame.locals import *
- from sys import exit
- from gameobjects.vector2 import Vector2
- from classes import *
- def quit():
- pressed_keys = pygame.key.get_pressed()
- if pressed_keys[K_ESCAPE]:
- exit()
- event = pygame.event.poll()
- if event.type == QUIT:
- exit()
- pygame.init()
- screen = pygame.display.set_mode((800, 600), 0, 32)
- pygame.display.set_caption("Critter Ball!")
- zombie = Zombie("Bob")
- enemy = [zombie]
- player = Player("Critter")
- while True:
- quit()
- screen.fill((255, 255, 255))
- player.movement(enemy)
- pygame.draw.circle(screen, (255,0,0), (zombie.x,zombie.y), 10)
- pygame.draw.circle(screen, (0,255,0), (player.x,player.y), 10)
- 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
.After submitting an amendment, you'll be able to view the differences between the old and new posts easily
