Skip to content

Instantly share code, notes, and snippets.

@matheuscouto
Created May 1, 2019 23:48
Show Gist options
  • Save matheuscouto/c52511842423c08a21c06c0cfce1e6fd to your computer and use it in GitHub Desktop.
Save matheuscouto/c52511842423c08a21c06c0cfce1e6fd to your computer and use it in GitHub Desktop.
interface createCustomWorldProps { world: customWorld, users: Array<{ username: string, password: string, name: string }> }
interface customWorld {
attitudes: {
[attitudeId: string]: {
name: string,
type: 'good' | 'bad',
order: number,
iconSpriteName: string
},
},
points:
{
[coinId: string]: {
iconSpriteName: string;
name: string;
}
},
settings:
{
enrollmentAvailableGames: {
[gameId: string]: {
title: string;
}
},
playerIdentificationStrategies: {
qrid: {
enabled: boolean
},
rfid: {
enabled: boolean
},
simple: {
enabled: boolean
},
username: {
enabled: boolean
}
},
requestConferAttitudes: { enabled: boolean }
},
games: {
[gameId: string]: IGame
}
}
interface IGame {
info : {
name : string
},
settings : {
attitudes : {
[attitudeId: string] : {
rewards : {
coin : number,
xp : number
}
},
},
lastChangeTime : number,
leveling : {
levels : {
[levelId: string] : { // 'blue' | 'golden' | 'green' | 'purple' | 'red' | 'silver' | 'white' | 'yellow'
iconSpriteName : string;
name : string;
order : number;
upQuestId : string;
},
},
type : "by_quest"
},
objectives : {
[objectiveId: string] : {
accomplishments : number,
id : string,
type : string,
},
},
points : {
[coinId: string] : {
featured : boolean
} | boolean,
},
quests : {
[questsType: string] : {
desc : string,
name : string,
objectives : {
[objectiveId: string] : boolean
},
type : "level_up" | "recurrent" | "finish_game"
},
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment