it is now settings.py settings handles loading the json file for the particles and imports, and potentially other things such as actual settings that are saveable and more
16 lines
392 B
Python
16 lines
392 B
Python
import pygame
|
|
import json
|
|
import random
|
|
import time
|
|
|
|
def load_particle_properties():
|
|
try:
|
|
with open('particles.json') as f:
|
|
return json.load(f)
|
|
except (FileNotFoundError, json.JSONDecodeError):
|
|
print("Error loading particles.json")
|
|
return {}
|
|
|
|
# Load particle properties once when module is imported
|
|
particle_properties = load_particle_properties()
|