Error problem open new map
This commit is contained in:
parent
5f88a1a0b9
commit
beb53df364
3 changed files with 64 additions and 11 deletions
|
@ -631,22 +631,24 @@ export class GameScene extends ResizableScene implements CenterListener {
|
|||
if (newValue) this.onMapExit(newValue as string);
|
||||
});*/
|
||||
this.gameMap.onPropertyChange('exitUrl', (newValue, oldValue, allProps) => {
|
||||
if (newValue === undefined) {
|
||||
if (newValue) this.onMapExit(newValue as string);
|
||||
/*if (newValue === undefined) {
|
||||
layoutManager.removeActionButton('exitUrl', this.userInputManager);
|
||||
} else {
|
||||
const exitTriggerValue = allProps.get(TRIGGER_EXIT_PROPERTIES);
|
||||
if (exitTriggerValue && exitTriggerValue === ON_ACTION_TRIGGER_BUTTON) {
|
||||
let message = allProps.get(EXIT_MESSAGE_PROPERTIES);
|
||||
if(message === undefined){
|
||||
message = 'Click on SPACE to entrer in next map';
|
||||
if (message === undefined) {
|
||||
message = 'Click on SPACE to enter in next map';
|
||||
}
|
||||
layoutManager.addActionButton('exitUrl', message.toString(), () => {
|
||||
layoutManager.removeActionButton('exitUrl', this.userInputManager);
|
||||
this.onMapExit(newValue as string);
|
||||
}, this.userInputManager);
|
||||
} else {
|
||||
this.onMapExit(newValue as string);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
});
|
||||
this.gameMap.onPropertyChange('openWebsite', (newValue, oldValue, allProps) => {
|
||||
if (newValue === undefined) {
|
||||
|
|
|
@ -24,6 +24,7 @@ export interface CenterListener {
|
|||
}
|
||||
|
||||
export const ON_ACTION_TRIGGER_BUTTON = 'onaction';
|
||||
|
||||
export const TRIGGER_WEBSITE_PROPERTIES = 'openWebsiteTrigger';
|
||||
export const TRIGGER_JITSI_PROPERTIES = 'jitsiTrigger';
|
||||
export const TRIGGER_EXIT_PROPERTIES = 'exitTrigger';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue