added card data
This commit is contained in:
parent
4fbd1c6663
commit
0d89b1ce84
46
Game Client/Classes/System/App.py
Normal file
46
Game Client/Classes/System/App.py
Normal file
@ -0,0 +1,46 @@
|
||||
import pygame
|
||||
from pygame.locals import *
|
||||
|
||||
from Classes.System.Window import Window
|
||||
from Classes.System.InputHandler import InputHandler
|
||||
|
||||
|
||||
class App:
|
||||
|
||||
__window:Window
|
||||
__running:bool = True
|
||||
__player = pygame.Rect((300,250, 50,50))
|
||||
__FPS = 60
|
||||
__speed = 5
|
||||
__clock = pygame.time.Clock()
|
||||
|
||||
def __init__(self, width:int=800, height:int=600, title:str="default title"):
|
||||
self.__window = Window(width=width, height=height, title=title)
|
||||
self.startGameLoop()
|
||||
self.onCleanup()
|
||||
|
||||
def startGameLoop(self):
|
||||
while self.__running:
|
||||
|
||||
self.__clock.tick(self.__FPS)
|
||||
|
||||
#temporary refresh
|
||||
self.__window.clea().fill((0,0,0))
|
||||
pygame.draw.rect(self.__window.getScreen(), (255,0,0), self.__player)
|
||||
|
||||
self.__player.move_ip((InputHandler.getInputAxis()[0]*self.__speed),(InputHandler.getInputAxis()[1]*self.__speed))
|
||||
|
||||
# event handler
|
||||
for event in pygame.event.get():
|
||||
if event.type == pygame.QUIT:
|
||||
self.onCleanup()
|
||||
|
||||
# emits update to the game
|
||||
pygame.display.update()
|
||||
|
||||
def setRunning(self, running:bool):
|
||||
self.__running = running
|
||||
|
||||
def onCleanup(self):
|
||||
self.__running = False
|
||||
pygame.quit()
|
BIN
Game_Client/Assets/Cards/testmonstercard/artworkjson.png
Normal file
BIN
Game_Client/Assets/Cards/testmonstercard/artworkjson.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "testmonster",
|
||||
"image":"Assets/Cards/testmonstercard/artwork.png",
|
||||
"costs": 30,
|
||||
"defence": 40,
|
||||
"attacks":[
|
||||
{
|
||||
"name":"test attack",
|
||||
"damage":80
|
||||
},
|
||||
{
|
||||
"name":"test attack",
|
||||
"damage":80
|
||||
}
|
||||
]
|
||||
}
|
BIN
Game_Client/Assets/Cards/testspellcard/artworkjson.png
Normal file
BIN
Game_Client/Assets/Cards/testspellcard/artworkjson.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "testspell",
|
||||
"image":"Assets/Cards/testspelltcard/artwork.png",
|
||||
"costs": 30,
|
||||
"description":"this is a test spell card"
|
||||
}
|
BIN
Game_Client/Assets/Cards/testtrapcard/artworkjson.png
Normal file
BIN
Game_Client/Assets/Cards/testtrapcard/artworkjson.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
6
Game_Client/Assets/Cards/testtrapcard/testtrapcard.json
Normal file
6
Game_Client/Assets/Cards/testtrapcard/testtrapcard.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "testtrap",
|
||||
"image":"Assets/Cards/testtrapcard/artwork.png",
|
||||
"costs": 30,
|
||||
"description":"this is a test tryp card"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user