Update feedback @moufmouf
This commit is contained in:
parent
6051e5f46a
commit
968787555f
@ -467,24 +467,33 @@ export class GameScene extends ResizableScene implements CenterListener {
|
|||||||
// From now, this game scene will be notified of reposition events
|
// From now, this game scene will be notified of reposition events
|
||||||
layoutManager.setListener(this);
|
layoutManager.setListener(this);
|
||||||
|
|
||||||
this.gameMap.onPropertyChange('openWebsite', (newValue, oldValue) => {
|
this.gameMap.onPropertyChange('openWebsite', (newValue, oldValue, allProps) => {
|
||||||
if (newValue === undefined) {
|
if (newValue === undefined) {
|
||||||
layoutManager.removeActionButton('openWebsite', this.userInputManager);
|
layoutManager.removeActionButton('openWebsite', this.userInputManager);
|
||||||
coWebsiteManager.closeCoWebsite();
|
coWebsiteManager.closeCoWebsite();
|
||||||
}else{
|
}else{
|
||||||
layoutManager.addActionButton('openWebsite', 'Clik on SPACE to open web site', () => {
|
const openWebsiteFunction = () => {
|
||||||
coWebsiteManager.loadCoWebsite(newValue as string);
|
coWebsiteManager.loadCoWebsite(newValue as string);
|
||||||
layoutManager.removeActionButton('openWebsite', this.userInputManager);
|
layoutManager.removeActionButton('openWebsite', this.userInputManager);
|
||||||
}, this.userInputManager);
|
};
|
||||||
|
|
||||||
|
const openWebsiteTriggerValue = allProps.get('openWebsiteTrigger');
|
||||||
|
if(openWebsiteTriggerValue && openWebsiteTriggerValue === 'onaction') {
|
||||||
|
layoutManager.addActionButton('openWebsite', 'Clik on SPACE to open web site', () => {
|
||||||
|
openWebsiteFunction();
|
||||||
|
}, this.userInputManager);
|
||||||
|
}else{
|
||||||
|
openWebsiteFunction();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.gameMap.onPropertyChange('jitsiRoom', (newValue, oldValue, allProps) => {
|
this.gameMap.onPropertyChange('jitsiRoom', (newValue, oldValue, allProps) => {
|
||||||
if (newValue === undefined) {
|
if (newValue === undefined) {
|
||||||
layoutManager.removeActionButton('jitsiRoom', this.userInputManager);
|
layoutManager.removeActionButton('jitsiRoom', this.userInputManager);
|
||||||
this.stopJitsi();
|
this.stopJitsi();
|
||||||
}else{
|
}else{
|
||||||
layoutManager.addActionButton('jitsiRoom', 'Clik on SPACE to enter in jitsi meet room', () => {
|
const openJitsiRoomFunction = () => {
|
||||||
if (JITSI_PRIVATE_MODE) {
|
if (JITSI_PRIVATE_MODE) {
|
||||||
const adminTag = allProps.get("jitsiRoomAdminTag") as string|undefined;
|
const adminTag = allProps.get("jitsiRoomAdminTag") as string|undefined;
|
||||||
|
|
||||||
@ -493,7 +502,16 @@ export class GameScene extends ResizableScene implements CenterListener {
|
|||||||
this.startJitsi(newValue as string);
|
this.startJitsi(newValue as string);
|
||||||
}
|
}
|
||||||
layoutManager.removeActionButton('jitsiRoom', this.userInputManager);
|
layoutManager.removeActionButton('jitsiRoom', this.userInputManager);
|
||||||
}, this.userInputManager);
|
}
|
||||||
|
|
||||||
|
const jitsiTriggerValue = allProps.get('jitsiTrigger');
|
||||||
|
if(jitsiTriggerValue && jitsiTriggerValue === 'onaction') {
|
||||||
|
layoutManager.addActionButton('jitsiRoom', 'Clik on SPACE to enter in jitsi meet room', () => {
|
||||||
|
openJitsiRoomFunction();
|
||||||
|
}, this.userInputManager);
|
||||||
|
}else{
|
||||||
|
openJitsiRoomFunction();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -678,7 +696,7 @@ export class GameScene extends ResizableScene implements CenterListener {
|
|||||||
if (!properties) {
|
if (!properties) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
const obj = properties.find((property: ITiledMapLayerProperty) => property.name === name);
|
const obj = properties.find((property: ITiledMapLayerProperty) => property.name.toLowerCase() === name.toLowerCase());
|
||||||
if (obj === undefined) {
|
if (obj === undefined) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,11 @@
|
|||||||
"name":"jitsiRoom",
|
"name":"jitsiRoom",
|
||||||
"type":"string",
|
"type":"string",
|
||||||
"value":"tcm-chillzone-2"
|
"value":"tcm-chillzone-2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name":"jitsiTrigger",
|
||||||
|
"type":"string",
|
||||||
|
"value":"auto"
|
||||||
}],
|
}],
|
||||||
"type":"tilelayer",
|
"type":"tilelayer",
|
||||||
"visible":true,
|
"visible":true,
|
||||||
@ -61,7 +66,12 @@
|
|||||||
{
|
{
|
||||||
"name":"jitsiRoom",
|
"name":"jitsiRoom",
|
||||||
"type":"string",
|
"type":"string",
|
||||||
"value":"tcm-chillzone-1"
|
"value":"tcm-chillzone-11"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name":"jitsiTrigger",
|
||||||
|
"type":"string",
|
||||||
|
"value":"onaction"
|
||||||
}],
|
}],
|
||||||
"type":"tilelayer",
|
"type":"tilelayer",
|
||||||
"visible":true,
|
"visible":true,
|
||||||
@ -128,6 +138,11 @@
|
|||||||
"name":"openWebsite",
|
"name":"openWebsite",
|
||||||
"type":"string",
|
"type":"string",
|
||||||
"value":"https:\/\/app.swile.co\/"
|
"value":"https:\/\/app.swile.co\/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name":"openWebsiteTrigger",
|
||||||
|
"type":"string",
|
||||||
|
"value":"auto"
|
||||||
}],
|
}],
|
||||||
"type":"tilelayer",
|
"type":"tilelayer",
|
||||||
"visible":true,
|
"visible":true,
|
||||||
|
Loading…
Reference in New Issue
Block a user