SelectCharacterScene and CustomCharacterScene mobile version

This commit is contained in:
GRL 2021-06-02 12:00:35 +02:00
parent e9ec5f26aa
commit 5bd5245044
5 changed files with 11 additions and 14 deletions

View File

@ -107,11 +107,11 @@
}
@media only screen and (max-width: 800px) {
.customCharacterScene button.customCharacterSceneButtonLeft{
left: 10vw;
form.customCharacterScene button.customCharacterSceneButtonLeft{
left: 5vw;
}
.customCharacterScene button.customCharacterSceneButtonRight{
right: 10vw;
form.customCharacterScene button.customCharacterSceneButtonRight{
right: 5vw;
}
}

View File

@ -80,11 +80,11 @@
}
@media only screen and (max-width: 800px) {
.selectCharacterScene button.selectCharacterButtonLeft{
left: 10vw;
form.selectCharacterScene button.selectCharacterButtonLeft{
left: 5vw;
}
.selectCharacterScene button.selectCharacterButtonRight{
right: 10vw;
form.selectCharacterScene button.selectCharacterButtonRight{
right: 5vw;
}
}

View File

@ -16,7 +16,7 @@ export const MAX_USERNAME_LENGTH = parseInt(process.env.MAX_USERNAME_LENGTH || '
export const MAX_PER_GROUP = parseInt(process.env.MAX_PER_GROUP || '4');
export const DISPLAY_TERMS_OF_USE = process.env.DISPLAY_TERMS_OF_USE == 'true';
export const isMobile = ():boolean => false;//( ( window.innerWidth <= 800 ) || ( window.innerHeight <= 600 ) );
export const isMobile = ():boolean => ( ( window.innerWidth <= 800 ) || ( window.innerHeight <= 600 ) );
export {
DEBUG_MODE,

View File

@ -242,7 +242,6 @@ export class CustomizeScene extends AbstractCharacterScene {
gameManager.setCharacterLayers(layers);
this.scene.sleep(CustomizeSceneName);
this.scene.remove(SelectCharacterSceneName);
gameManager.tryResumingGame(this, EnableCameraSceneName);
customCharacterSceneVisibleStore.set(false);
}
@ -251,6 +250,5 @@ export class CustomizeScene extends AbstractCharacterScene {
this.scene.sleep(CustomizeSceneName);
this.scene.run(SelectCharacterSceneName);
customCharacterSceneVisibleStore.set(false);
selectCharacterSceneVisibleStore.set(true);
}
}

View File

@ -52,6 +52,7 @@ export class SelectCharacterScene extends AbstractCharacterScene {
create() {
selectCharacterSceneVisibleStore.set(true);
this.events.addListener('wake', () => {selectCharacterSceneVisibleStore.set(true);});
if (touchScreenManager.supportTouchScreen) {
new PinchManager(this);
@ -63,7 +64,6 @@ export class SelectCharacterScene extends AbstractCharacterScene {
/*create user*/
this.createCurrentPlayer();
const playerNumber = localUserStore.getPlayerCharacterIndex();
this.input.keyboard.on('keyup-ENTER', () => {
return this.nextSceneToCameraScene();
@ -93,7 +93,7 @@ export class SelectCharacterScene extends AbstractCharacterScene {
this.scene.stop(SelectCharacterSceneName);
gameManager.setCharacterLayers([this.selectedPlayer.texture.key]);
gameManager.tryResumingGame(this, EnableCameraSceneName);
this.scene.remove(SelectCharacterSceneName);
this.players = [];
selectCharacterSceneVisibleStore.set(false);
}
@ -128,7 +128,6 @@ export class SelectCharacterScene extends AbstractCharacterScene {
});
this.players.push(player);
}
this.selectedPlayer = this.players[this.currentSelectUser];
this.selectedPlayer.play(this.playerModels[this.currentSelectUser].name);
}