Gravwell-Online/web-svelte/src/stores.ts
2021-12-25 23:57:26 -07:00

19 lines
No EOL
637 B
TypeScript

import { writable, readable } from "svelte/store";
export const state = writable<string>("main-menu");
export const myName = writable<string>();
export const isHost = writable<boolean>(true);
interface Player {
name: string;
host: boolean;
colour: string;
ship: string;
}
export const players = readable<Player[]>([
{ name: `Player 1`, host: true, colour: "#00aa00", ship: "space-shuttle" },
{ name: `Player 2`, host: false, colour: "#7400b8", ship: "space-shuttle" },
{ name: `Player 3`, host: false, colour: "#faa307", ship: "space-shuttle" },
{ name: `Player 4`, host: false, colour: "#b7094c", ship: "space-shuttle" },
]);