drawing first map onto screen
This commit is contained in:
@ -4,6 +4,7 @@ from pygame.locals import *
|
||||
from Classes.Objects.Cards.MonsterCard import MonsterCard
|
||||
from Classes.System.Window import Window
|
||||
from Classes.System.InputHandler import InputHandler
|
||||
from Classes.System.World import World
|
||||
|
||||
|
||||
class App:
|
||||
@ -23,6 +24,9 @@ class App:
|
||||
# create sprite groups
|
||||
cards = pygame.sprite.Group()
|
||||
|
||||
# game word
|
||||
world = World(pygame.image.load("Assets/Arenas/default.png").convert_alpha())
|
||||
|
||||
testMonsterCard = MonsterCard((500,500), "Assets/Cards/MonsterCards/testmonstercard/")
|
||||
cards.add(testMonsterCard)
|
||||
|
||||
@ -30,6 +34,9 @@ class App:
|
||||
|
||||
self.__clock.tick(self.__FPS)
|
||||
|
||||
self.__window.getScreen().fill("grey100")
|
||||
world.draw(self.__window.getScreen())
|
||||
|
||||
# update sprite groups
|
||||
cards.update()
|
||||
|
||||
|
@ -37,5 +37,4 @@ class Window:
|
||||
|
||||
# draws a passed sprite group to the screen
|
||||
def drawSpriteGroup(self, group:pygame.sprite.Group):
|
||||
self.__screen.fill("grey100")
|
||||
group.draw(self.__screen)
|
9
Game_Client/Classes/System/World.py
Normal file
9
Game_Client/Classes/System/World.py
Normal file
@ -0,0 +1,9 @@
|
||||
import pygame
|
||||
|
||||
class World():
|
||||
|
||||
def __init__(self, mapImage):
|
||||
self.__map = mapImage
|
||||
|
||||
def draw(self, surface:pygame.Surface):
|
||||
surface.blit(self.__map, (0,0))
|
Binary file not shown.
Binary file not shown.
BIN
Game_Client/Classes/System/__pycache__/World.cpython-311.pyc
Normal file
BIN
Game_Client/Classes/System/__pycache__/World.cpython-311.pyc
Normal file
Binary file not shown.
Reference in New Issue
Block a user