Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pygame, sys, os, pygame.mixer
- from pygame.locals import *
- from helpers import load_image
- import time, math
- from menu import Menu
- from game import *
- pygame.init()
- print "Loading... please wait"
- BLOCK_SIZE = 48
- music = pygame.mixer.Sound('menu.ogg')
- music.play()
- #WALL = 1
- #FLOOR = 0
- #angle = 0
- #playerx, playery = 60, 60
- #player_movex, player_movey = 0, 0
- #lots of damn variables that are too annoying to put in a damn class
- #vpRenderOffset = (80,60)
- #player_load = pygame.image.load("player.png").convert_alpha()
- #milli = 0
- #clock=pygame.time.Clock()
- #player_y = 0
- #player_x = 0
- class Sprite(pygame.sprite.Sprite):
- def __init__(self, centerPoint, image):
- pygame.sprite.Sprite.__init__(self)
- """Set the image and the rect"""
- self.image = image
- self.rect = image.get_rect()
- """Move the rect into the correct position"""
- self.rect.center = centerPoint
- #class level():
- # def getSprites(self):
- # wall, rect = load_image('wall.png')
- # floor, rect = load_image('floor.png',-1)
- # return [floor, wall]
- UPDATE = pygame.USEREVENT
- pygame.time.set_timer(UPDATE, int(1000.0/30))
- """while 1:
- menu = Menu()
- game = Game()
- if menu.gamestart == 0:
- menu.run_menu()
- else:
- game.game_loop()"""
- if __name__ == "__main__":
- menu = Menu()
- game = Game()
- print "...done"
- if menu.gamestart == 0:
- menu.run_menu()
- elif menu.gamestart == 1:
- game.game_loop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement