game-js/src/Game/GlobalVariables/GlobalVariables.js

97 lines
1.7 KiB
JavaScript

import Alea from "alea";
import { Container } from "../../pixi/pixi.mjs";
import { GameScene } from "../GameScene/GameScene";
export let BC_APP;
export function setBC_APP(app) {
BC_APP = app;
};
/**
* @type Container
*/
export let BC_VIEWPORT;
export function setBC_VIEWPORT(viewport) {
BC_VIEWPORT = viewport;
};
/**
* {PIXI.Container}
*/
export let BC_WORLD;
export function setBC_WORLD(world) {
BC_WORLD = world;
};
/**
* {PIXI.Container}
*/
export let BC_SELECTION;
export function setBC_SELECTION(selection) {
BC_SELECTION = selection;
};
/**
* {PIXI.Container}
*/
export let BC_NPC_LAYER;
export function setBC_NPC_LAYER(npc_layer) {
BC_NPC_LAYER = npc_layer;
};
// export let BC_TERRAIN;
export let BC_TERRAIN_SETTINGS = {
tileSize: 16,
scale: 8.0
}
// export let BC_TERRAIN_VAULT = {};
// export function setBC_TERRAIN(terrain) {
// BC_TERRAIN = terrain;
// };
// export let BC_VEGETATION;
// export let BC_VEGETATION_VAULT = {};
// export function setBC_VEGETATION(veg) {
// BC_VEGETATION = veg;
// };
export let BC_SPRITES_SETTINGS = {
defaultSize: 16,
scale: 8.0
};
// export let BC_CHUNKS_VAULT = {};
export let BC_CHUNKS_SETTINGS = {
width: 20, //tiles
height: 20, //tiles
};
export const BC_CAMERA = {
position: {x: 0.0, y: 0.0},
offset_position: {x: 0.0, y: 0.0},
zoom: 1.0,
targetZoom: 1.0,
minZoom: 0.25,
maxZoom: 1.2,
zoomStep: 0.05,
};
export let PRNG = new Alea();
export function setNewPRNG(prng) {
PRNG = prng;
};
export const BC_BUILDING_PLACEHOLDERS = [];
/**
* @type GameScene
*/
export let BC_CURRENT_SCENE;
/**
*
* @param {GameScene} scene new scene
*/
export function setBC_CURRENT_SCENE(scene) {
BC_CURRENT_SCENE = scene;
};