defineCampaign
Function of @v12-engine/client/app
ts
export declare function defineCampaign<D extends object = Record<string, unknown>>(given: CampaignDef<D> | CampaignFromFile<D>): CampaignScenes;A campaign put together: a menu with the mission it is at and the missions won with their times, and a scene that plays any of its missions. A mission won is kept at once, with its time and the heroes it ends with; its end has the next mission and a retry, a mission lost has a retry, and both go back to the menu. A mission starts with the heroes carried out of the one before, in place of the ones its map has for them. Of a file (campaign.json, what the editor's Campaign panel writes) with its code beside it (CampaignFromFile): the file's over the code's