Add some classes
parent
b768a29c3e
commit
90c6cfa6f6
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"python.pythonPath": "C:\\Users\\mc146uxx\\AppData\\Local\\Programs\\Python\\Python37-32\\python.exe"
|
||||
}
|
Binary file not shown.
Binary file not shown.
3
game.py
3
game.py
|
@ -1,6 +1,7 @@
|
|||
import pygame
|
||||
import os
|
||||
from pygame.locals import *
|
||||
from player import Player
|
||||
|
||||
# Init
|
||||
pygame.init()
|
||||
|
@ -42,6 +43,8 @@ player = {
|
|||
"rect": textures["CHARACTER"].get_rect()
|
||||
}
|
||||
|
||||
test_player = Player()
|
||||
|
||||
# Mainloop
|
||||
time = pygame.time.get_ticks()
|
||||
while 1:
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
from sprite import Sprite
|
||||
|
||||
class Player:
|
||||
x = 0
|
||||
y = 0
|
||||
|
||||
hp = 100
|
||||
mp = 50
|
||||
xp = 0
|
||||
|
||||
sprite = Sprite()
|
||||
sprite.set_texture("character.png")
|
Loading…
Reference in New Issue