krata
This commit is contained in:
parent
886f7ee236
commit
65ccd915e7
BIN
gandalf.jpg
Normal file
BIN
gandalf.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 88 KiB |
50
main.py
Normal file
50
main.py
Normal file
@ -0,0 +1,50 @@
|
||||
import pygame
|
||||
import random
|
||||
|
||||
pygame.init()
|
||||
FRAMERATE = 30
|
||||
WIDTH, HEIGHT = 1100, 1100
|
||||
TILE_SIZE = 100
|
||||
BLACK = ((0,0,0))
|
||||
WHITE = ((255,255,255))
|
||||
|
||||
ARCHER_ORK_IMG = pygame.image.load("./zdjecia/ork_lucznik.jpg")
|
||||
INFATRY_ORK_IMG = pygame.image.load("./zdjecia/ork-piechota.jpg")
|
||||
INFANTRY_ORK2_IMG = pygame.image.load("./zdjecia/ork-piechota2.jpg")
|
||||
SAURON_JPG = pygame.image.load("./zdjecia/sauron.jpg")
|
||||
AGENT_IMG = pygame.image.load("./zdjecia/gandalf.jpg")
|
||||
|
||||
|
||||
ARCHER_ORK = pygame.transform.scale(ARCHER_ORK_IMG,(100,100))
|
||||
INFATRY_ORK = pygame.transform.scale(INFATRY_ORK_IMG,(100,100))
|
||||
INFANTRY_ORK2 = pygame.transform.scale(INFANTRY_ORK2_IMG,(100,100))
|
||||
SAURON = pygame.transform.scale(SAURON_JPG,(100,100))
|
||||
AGENT = pygame.transform.scale(AGENT_IMG,(100,100))
|
||||
|
||||
pygame.display.set_caption('Do_Nazwania')
|
||||
SCREEN = pygame.display.set_mode((WIDTH, HEIGHT))
|
||||
|
||||
def map():
|
||||
SCREEN.fill(BLACK)
|
||||
ORK_LIST = [ARCHER_ORK,INFANTRY_ORK2, INFATRY_ORK]
|
||||
for x in range(0, WIDTH, TILE_SIZE):
|
||||
|
||||
for y in range(0, HEIGHT, TILE_SIZE):
|
||||
rect = pygame.Rect(x, y, TILE_SIZE, TILE_SIZE)
|
||||
pygame.draw.rect(SCREEN, WHITE, rect, 1)
|
||||
SCREEN.blit(AGENT, (500,1000))
|
||||
|
||||
def main():
|
||||
running = True
|
||||
clock = pygame.time.Clock()
|
||||
map()
|
||||
|
||||
while running:
|
||||
clock.tick(FRAMERATE)
|
||||
for event in pygame.event.get():
|
||||
if event.type == pygame.QUIT:
|
||||
pygame.quit()
|
||||
|
||||
pygame.display.flip()
|
||||
|
||||
main()
|
BIN
ork-piechota.jpg
Normal file
BIN
ork-piechota.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 90 KiB |
BIN
ork-piechota2.jpg
Normal file
BIN
ork-piechota2.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 183 KiB |
BIN
ork_lucznik.jpg
Normal file
BIN
ork_lucznik.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 97 KiB |
BIN
sauron.jpg
Normal file
BIN
sauron.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
Loading…
Reference in New Issue
Block a user