Ejemplo n.º 1
0
 def __init__(self):
     self.diary = diary
     self.page_day = 0
     self.image = background_next_day_image
     self.inventory_image = Images.get("Inventario.png")
     self.show_diary_page = False
     self.pistol_icon = Images.get("Pistola_icone.png")
     self.revolver_icon = Images.get("Revolver_icone.png")
     self.ak_47_icon = Images.get("Ak_47_icone.png")
     self.sniper_icon = Images.get("Sniper_icone.png")
     self.locked_icon = Images.get("Trava_icone.png")
     self.slot_1_icon = self.pistol_icon
     self.slot_2_icon = self.revolver_icon
     self.slot_3_icon = self.ak_47_icon
     self.slot_4_icon = self.sniper_icon
     
     self.primary_weapon_icon = self.pistol_icon
     self.secondary_weapon_icon = self.pistol_icon
     
     self.can_click = True
     self.can_draw = True
     self.select_weapon = 1
     self.weapon_1_name = "Pistol"
     self.weapon_2_name = "Pistol"
     
     self.position_selected_1 = (530, 130)
     self.position_selected_2 = (700, 130)
     
     self.pistol_position_inventory = (165, 130)
     self.revolver_position_inventory = (335, 130)
     self.ak_47_position_inventory = (165, 265)
     self.sniper_rifle_position_inventory = (335, 265)
     
     self.pistol_selected_slot_1 = True
     self.pistol_selected_slot_1 = True
     self.revolver_selected = True
     self.pistol_selected = True
     self.pistol_selected = True
Ejemplo n.º 2
0
up = K_w
down = K_s
left = K_a
right = K_d
shoot = K_SPACE
reload_b = K_r
change_weapon = K_f
pause = K_ESCAPE

# Eventos
shoot_interval_event = USEREVENT
reload_event = USEREVENT + 1

white = (255, 255, 255)

survivor_pistol_image = Images.get("Sprites/Sobrevivente_parado_pistola.png")
survivor_walking_pistol_image = Images.get(
    "Sprites/Sobrevivente_andando_pistola.png")

survivor_revolver_image = Images.get(
    "Sprites/Sobrevivente_parado_revolver.png")
survivor_walking_revolver_image = Images.get(
    "Sprites/Sobrevivente_andando_revolver.png")

survivor_ak_47_image = Images.get("Sprites/Sobrevivente_parado_ak47.png")
survivor_walking_ak_47_image = Images.get(
    "Sprites/Sobrevivente_andando_ak47.png")

survivor_sniper_rifle_image = Images.get(
    "Sprites/Sobrevivente_parado_sniper.png")
survivor_walking_sniper_rifle_image = Images.get(
Ejemplo n.º 3
0
#-*-coding:latin1-*-
'''
Created on 23/11/2015

@author: Guilherme Campiotto
'''
from AssetsManager import Images
Images.init()

diary = []

page_1 = Images.get("Pages\Dia1.png")
page_2 = Images.get("Pages\Dia2.png")
page_3 = Images.get("Pages\Dia3.png")
page_4 = Images.get("Pages\Dia4.png")
page_5 = Images.get("Pages\Dia5.png")
page_6 = Images.get("Pages\Dia6.png")
page_7 = Images.get("Pages\Dia7.png")
page_8 = Images.get("Pages\Dia8.png")
page_9 = Images.get("Pages\Dia9.png")

diary.append(page_1)
diary.append(page_2)
diary.append(page_3)
diary.append(page_4)
diary.append(page_5)
Ejemplo n.º 4
0
@author: Guilherme Campiotto
'''
import pygame
from pygame.time import Clock

from AssetsManager import Images
from pygame.constants import FULLSCREEN

Images.init()
pygame.mixer.init()

stage_music = pygame.mixer.Sound("Sounds\Musics\Fase_musica.wav")

white = (255, 255, 255)

background_image = Images.get("militar_envir.jpg")
barricade_100_image_original = Images.get("Barricada100.png")
barricade_100_image = pygame.transform.scale(barricade_100_image_original,
                                             (550, 630))

barricade_70_image_original = Images.get("Barricada70.png")
barricade_70_image = pygame.transform.scale(barricade_70_image_original,
                                            (550, 630))

barricade_30_image_original = Images.get("Barricada30.png")
barricade_30_image = pygame.transform.scale(barricade_30_image_original,
                                            (550, 630))

barricade_0_image_original = Images.get("Barricada0.png")
barricade_0_image = pygame.transform.scale(barricade_0_image_original,
                                           (550, 630))
Ejemplo n.º 5
0
Created on 05/10/2015

@author: Guilherme Campiotto
'''
import pygame
from AssetsManager import Fonts, Images
Fonts.init()
Images.init()

white = (255, 255, 255)
red = (200, 0, 0)

font_screen = Fonts.get(
    "Tela do jogo/Zombie.ttf",
    20)  #pygame.font.Font("Fontes\Tela do jogo\Zombie.ttf", 20)
pause_icon_original = Images.get("Pausa.png")
pause_icon = pygame.transform.scale(pause_icon_original, (98, 56))


class ScreenInfo(object):
    def __init__(self):
        self.font = font_screen
        self.pause_icon = pause_icon

    def draw(self, screen, ammo, enemys_left, level, weapon_name,
             barricade_resistance):
        screen.blit(self.font.render("Dia ", True, red), (50, 25))
        screen.blit(self.font.render(str(level), True, red), (150, 25))
        screen.blit(self.font.render("Arma ", True, red), (50, 50))
        screen.blit(self.font.render(weapon_name, True, red), (150, 50))
        screen.blit(self.font.render("Municao ", True, red), (50, 75))
Ejemplo n.º 6
0
#-*-coding:latin1-*-
'''
Created on 28/09/2015

@author: Guilherme Campiotto
'''
import pygame
from SpriteLists import enemy_list

from AssetsManager import Images
Images.init()

white = (255,255,255)

zombie1_image_orig = Images.get("Sprites/Zumbi1.png")#pygame.image.load("Images\Sprites\Zumbi.jpg")
zombie1_image = pygame.transform.scale(zombie1_image_orig, (200, 102))

zombie2_orig = Images.get("Sprites/Zumbi2.png")
zombie2_image = pygame.transform.scale(zombie2_orig, (200, 102))

zombie3_orig = Images.get("Sprites/Zumbi3.png")
zombie3_image = pygame.transform.scale(zombie3_orig, (200, 102))

zombie4_orig = Images.get("Sprites/Zumbi4.png")
zombie4_image = pygame.transform.scale(zombie4_orig, (200, 102))

zombie_dying_orig = Images.get("Sprites/Zumbi_morrendo.png")
zombie_dying_image = pygame.transform.scale(zombie_dying_orig, (720, 100))

zombie1_frames = []
zombie2_frames = []
Ejemplo n.º 7
0
black = (0, 0, 0)
white = (255, 255, 255)
red = (200, 0, 0)
green = (0, 255, 0)
light_green = (0, 200, 0)
papaya_whip = (255, 239, 213)
bisque_2 = (238, 213, 183)
moccasin = (255, 228, 181)
orange = (255, 165, 0)
orange_red = (255, 69, 0)
firebrick = (178, 34, 34)

menu_music = pygame.mixer.Sound("Sounds\Musics\Menu_musica.wav")
helicopter_sound = pygame.mixer.Sound("Sounds\Effects\helicoptero.wav")

screen_pause_original = Images.get("background_pausa.png")
screen_pause = pygame.transform.scale(screen_pause_original, (1000, 600))
background_menu_orig = Images.get("background_menu.jpg")
background_menu_image = pygame.transform.scale(background_menu_orig, (1000, 600))
background_next_day_orig = Images.get("Background_fase_concluida.jpg")
background_next_day_image = pygame.transform.scale(background_next_day_orig, (1000, 600))
game_controls_original = Images.get("Controles.png")
game_controls = pygame.transform.scale(game_controls_original, (555, 157))

def text_objects(text, font, cor):
    "Retorna uma surface e o retângulo do tamanho da fonte"
    textSurface = font.render(text, True, cor)
    return textSurface, textSurface.get_rect()
    
class InicialMenu(object):
    def __init__(self):