sep-pm-platformer/project/physics/ConstantsParser.py

13 lines
394 B
Python
Raw Permalink Normal View History

2023-03-27 11:46:03 +02:00
import json
class ConstantsParser:
def __init__(self, file: str):
parsed = json.load(open(file))
self.level_size = (parsed['level']['level_size'][0], parsed['level']['level_size'][1])
self.block_size = (parsed['level']['block_size'][0], parsed['level']['block_size'][1])
2023-03-29 16:08:12 +02:00
self.themes = parsed['themes']
2023-03-27 11:46:03 +02:00
CONFIG = ConstantsParser("data/config/config.json")