Skip to content

Commit

Permalink
Add Campus map and preview between maps
Browse files Browse the repository at this point in the history
  • Loading branch information
ValdoTR committed Feb 19, 2024
1 parent 9978d04 commit 079f8e4
Show file tree
Hide file tree
Showing 15 changed files with 1,796 additions and 701 deletions.
Binary file added campus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,058 changes: 1,058 additions & 0 deletions campus.tmj

Large diffs are not rendered by default.

Binary file modified map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,420 changes: 733 additions & 687 deletions map.tmj

Large diffs are not rendered by default.

Binary file added public/campus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/100R_Building_Showcase.xcf
Binary file not shown.
Binary file added src/Interior_View.xcf
Binary file not shown.
19 changes: 5 additions & 14 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,18 @@ import { bootstrapExtra } from "@workadventure/scripting-api-extra";

console.log('Script started successfully');

let currentPopup: any = undefined;

// Waiting for the API to be ready
WA.onInit().then(() => {
console.log('Scripting API ready');
console.log('Player tags: ',WA.player.tags)

WA.room.area.onEnter('clock').subscribe(() => {
const today = new Date();
const time = today.getHours() + ":" + today.getMinutes();
currentPopup = WA.ui.openPopup("clockPopup", "It's " + time, []);
WA.room.area.onEnter('exitToWorkshops').subscribe(() => {
WA.room.showLayer('exitArrow');
})

WA.room.area.onLeave('clock').subscribe(closePopup)
WA.room.area.onEnter('exitToCampus').subscribe(() => {
WA.room.showLayer('exitArrow');
})

// The line below bootstraps the Scripting API Extra library that adds a number of advanced properties/features to WorkAdventure
bootstrapExtra().then(() => {
Expand All @@ -26,11 +24,4 @@ WA.onInit().then(() => {

}).catch(e => console.error(e));

function closePopup(){
if (currentPopup !== undefined) {
currentPopup.close();
currentPopup = undefined;
}
}

export {};
Binary file added tilesets/100R_Building_Conference_Center.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tilesets/100R_Building_Showcase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tilesets/100R_IDMC_Facade.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tilesets/Lights.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tilesets/Preview_Exterior.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tilesets/Preview_Interior.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 079f8e4

Please sign in to comment.