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

12 lines
355 B
Python
Raw 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])
CONFIG = ConstantsParser("data/config/config.json")