Containers
UIContainers and Minigames are both extensions of Displayable.
class Displayable implements IDisplayable {
constructor(name: string, game: GameModule);
static Manifest(): Array<string>;
instantiate();
deinstantiate();
display(location?: "Game" | "Menu");
hide(location?: "Game" | "Menu");
append(name: string, element: Container);
appendDisplayable(displayable: Displayable);
remove(name: string);
}
static Manifest(): Array<string>;
This contains all assets that require loading for the Displaybale to function properly. An example called NamedContainer might look like:
named.ts
class NamedContainer extends UIContainer {
static Manifest(): Array<string> {
return ["named.png"];
}
}
The container needs to be added to cLoads in config.ts to be loaded properly.
config.ts
import { NamedContainer } from "./containers/ui/named";
const cLoads = [NamedContainer];