Added NoPELib integration
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
from .events import Timeout
|
from .events import Timeout
|
||||||
from .anim import AnimatedObject
|
from .anim import AnimatedObject
|
||||||
|
import NoPELib
|
||||||
import tomllib
|
import tomllib
|
||||||
import time
|
import time
|
||||||
|
|
||||||
@ -12,15 +13,15 @@ class Game:
|
|||||||
surface (pygame.Surface): The surface the game devs draw on.
|
surface (pygame.Surface): The surface the game devs draw on.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.surf = surface
|
|
||||||
self.size = self.surf.size
|
|
||||||
self.pm = None
|
|
||||||
# Holds all the timeouts that haven't been fired yet
|
|
||||||
self._timeouts = []
|
|
||||||
|
|
||||||
with open('./game.toml', 'r') as f:
|
with open('./game.toml', 'r') as f:
|
||||||
self.cfg = tomllib.loads(f.read())
|
self.cfg = tomllib.loads(f.read())
|
||||||
|
|
||||||
|
self.surf = surface
|
||||||
|
self.size = self.surf.size
|
||||||
|
self.pm = NoPELib.PlayersManager(self.cfg['name'], playersPath='../players.json')
|
||||||
|
# Holds all the timeouts that haven't been fired yet
|
||||||
|
self._timeouts = []
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
"""
|
"""
|
||||||
Updates some core things in the background.
|
Updates some core things in the background.
|
||||||
|
|||||||
Reference in New Issue
Block a user