def load(path): path = _get_source_file_path(path, [BACKUP_DIR, PA_MEDIA_DIR]) if path not in _cache: _cache[path] = pajson.loadf(path) return _cache[path]
import utils import loader import pajson import math import copy import random import colorsys false = False true = True base_pointlight = pajson.loadf("base/pointlight.json") base_orb = pajson.loadf("base/orb.json") base_outer_orb = pajson.loadf("base/outer_orb.json") initial_orb = pajson.loadf("base/initial_orb.json") total_time = 7.0 effects = [] # there are two orbs # make the orb here base_orb["emissionRate"] = 7 base_orb["delay"] = 0.7 # def rainbow(n, offset=0, scale=1, revs=1, time=1): base_orb["red"], base_orb["green"], base_orb["blue"] = (0.1, 0.3, 16) effects.append(base_orb) base_orb = copy.deepcopy(base_orb) base_orb["delay"] = 0.7 + 0.5 / base_orb["emissionRate"]
import loader import pajson import utils import os import copy PREFER_EX1 = True PA_MEDIA_DIR = utils.pa_media_dir() BACKUP_DIR = os.path.join(PA_MEDIA_DIR, "../_media") base_dot = pajson.loadf("dot.json") dot_small = copy.deepcopy(base_dot) dot_small["sizeX"] = 1 dot_medium = copy.deepcopy(base_dot) dot_medium["sizeX"] = 2 dot_large = copy.deepcopy(base_dot) dot_large["sizeX"] = 3 dot_huge = copy.deepcopy(base_dot) dot_huge["sizeX"] = 4 dots = {"small": dot_small, "medium": dot_medium, "large": dot_large, "huge": dot_huge} # get all the units # - get each weapon on the unit # - get each ammo type # - use damage to decide dot size # (small, medium, large)