Manage multi scene
- Create position and check if user is in position to switch in the next scene. - When scene is load, we load all scene in the layer of name "exit". - Layer "exit" of map.json have a parametter "exitSceneKey" to identify next scene. - Add layer "start", the player could start in the scene on the object present in the layer of name "start".
This commit is contained in:
parent
fb8d9bf9a8
commit
27c6034661
6 changed files with 162 additions and 26 deletions
|
@ -20,10 +20,10 @@ export class MapController {
|
|||
getMpas() {
|
||||
this.App.get("/maps", (req: Request, res: Response) => {
|
||||
return res.status(OK).send({
|
||||
startMapKey: "floor0",
|
||||
mapStart: {key: "floor0", url: "/map/files/Floor0"},
|
||||
maps: [
|
||||
{mapKey: "floor0", mapUrl: "/map/files/Floor0"},
|
||||
{mapKey: "floor1", mapUrl: "/map/files/Floor1"},
|
||||
{key: "floor0", url: "/map/files/Floor0"},
|
||||
{key: "floor1", url: "/map/files/Floor1"},
|
||||
]
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue