Exemplo n.º 1
0
def player():
    global player_ran_1

    if model.poworot == 'left':
        player_ran_1 = pygame.image.load('skins_and_world/left.png')
        player_ran_1=help.izmeni_kartinku(player_ran_1,37,81,[7,8,18],10)

    if model.poworot == 'right':
        player_ran_1 = pygame.image.load('skins_and_world/right.png')
        player_ran_1=help.izmeni_kartinku(player_ran_1,39,83,[7,8,18],10)

    if model.poworot == 'up':
        player_ran_1 = pygame.image.load('skins_and_world/up.png')
        player_ran_1 = help.izmeni_kartinku(player_ran_1, 42, 79, [7, 8, 18], 10)

    if model.poworot == 'down':
        player_ran_1 = pygame.image.load('skins_and_world/down.png')
        player_ran_1 = help.izmeni_kartinku(player_ran_1, 41, 77, [7, 8, 18], 10)

    screen.blit(player_ran_1, sdvig(model.player_rect))
Exemplo n.º 2
0
def playercar():
    global player_ran_1



    if model.poworot == 'left':
        player_ran_1 = pygame.image.load('skins_and_world/tavria_left.png')
        player_ran_1=help.izmeni_kartinku(player_ran_1,150,150,[255,255,255],1)

    if model.poworot == 'right':
        player_ran_1 = pygame.image.load('skins_and_world/tavria_right_and_human.png')
        player_ran_1=help.izmeni_kartinku(player_ran_1,150,150,[237,28,36],1)

    if model.poworot == 'up':
        player_ran_1 = pygame.image.load('skins_and_world/tavria_up.png')
        player_ran_1 = help.izmeni_kartinku(player_ran_1, 150,150, [255,255,255], 1)

    if model.poworot == 'down':
        player_ran_1 = pygame.image.load('skins_and_world/tavria_down.png')
        player_ran_1 = help.izmeni_kartinku(player_ran_1, 150,150, [255,255,255], 1)

    screen.blit(player_ran_1, sdvig(model.player_rect))
Exemplo n.º 3
0
    amber = f.render("Ball", True, [255, 90, 0])
    amber = pygame.transform.rotate(amber, 10)

    volt = pygame.Surface([500, 500], pygame.SRCALPHA)

    volt.blit(gavs, [100, 100])
    volt.blit(amber, [100, 50])
    return volt


fon = image.load("kartynky/fon.png")
fon = pygame.transform.scale(fon, [700, 800])

knopka_nastroiki = image.load("kartynky/knopka_nastroiki.png")
knopka_nastroiki = help.izmeni_kartinku(knopka_nastroiki, 74, 74,
                                        [0, 168, 243], 1)
knopka_nastroiki_rect = pygame.Rect(10, 10, 74, 74)

knopka_pushek = image.load("kartynky/knopka_pushek.png")
knopka_pushek = help.izmeni_kartinku(knopka_pushek, 74, 74, [0, 168, 243], 1)
knopka_pushek_rect = pygame.Rect(100, 10, 74, 74)

ball_attack = sdelay_nazvanie_igri()

OK = image.load("kartynky/OK.png")
OK = help.izmeni_kartinku(OK, 80, 74, [0, 168, 243], 1)

knopka_OK_rect = pygame.Rect(0, 0, 80, 74)
knopka_OK_rect.centerx = 350
knopka_OK_rect.centery = 605
Exemplo n.º 4
0
import pygame, help, model
from pygame import draw

screen = pygame.display.set_mode([1300, 1000])
pygame.display.set_caption("zombie city")

# загружаем картинку фона
fon = pygame.image.load('skins_and_world/world_1_1_1.png')
fon = pygame.transform.scale(fon,[5000,5000])

house = pygame.image.load('skins_and_world/zombie house 1.jpg')

house = help.izmeni_kartinku(house, 262, 216, [255, 255, 255], 0)

player_ran_1 = pygame.image.load('skins_and_world/player_version_1_is_1.png').convert()
player_ran_1 = help.izmeni_kartinku(player_ran_1, 42, 82, [0, 0, 0], 20)

player_heart = pygame.image.load('skins_and_world/zombie_game_heart.png')

player_heart = help.izmeni_kartinku(player_heart, 73, 69, [255, 255, 255], 1)

zombie_heart = pygame.transform.scale(player_heart, [30, 30])

zombie1 = pygame.image.load('skins_and_world/zombie_BETA_VERSION.png')
zombie1 = help.izmeni_kartinku(zombie1, 42, 82, [0, 0, 0], 60)

house1 = pygame.image.load('skins_and_world/house_11.jpg')
house1 = help.izmeni_kartinku(house1, 386, 380, [48, 50, 45], 10)

tavria=pygame.image.load('skins_and_world/tavria_right.png')
tavria=help.izmeni_kartinku(tavria,150,150,[255,255,255],1)
Exemplo n.º 5
0
import pygame, model, random, help
from pygame import draw, image, transform, display

pygame.init()
pygame.mouse.set_visible(False)
okno = display.set_mode([1200, 800])

kubik_2 = image.load("kartynky/kubik_ng.jpg").convert()
kubik_2 = transform.scale(kubik_2, [38, 38])
kubik = image.load("kartynky/kubik_ng.png").convert()
kubik = transform.scale(kubik, [38, 38])
fon = image.load("kartynky/fon_ng.jpg")
platforma = image.load("kartynky/platforma_ng.png")
ball = image.load("kartynky/sharik_ng.png")
ball = help.izmeni_kartinku(ball, 40, 40, [255, 255, 255], 5)


def risuet_kadr():
    # рисуем кадр
    okno.blit(fon, [0, 0])
    okno.blit(platforma, [model.plat.x, model.plat.y])
    m = [0, 0, 0]
    draw.rect(okno, m, model.plat, 1)
    # рисуем шарик
    okno.blit(ball, model.sharik)
    for ku in model.kubiki:
        kubik_random = random.randint(0, 1)
        if kubik_random == 1:
            okno.blit(kubik, ku)
        if kubik_random == 0:
            okno.blit(kubik_2, ku)