ran pretty on the front
This commit is contained in:
parent
7743bda3eb
commit
4160235b92
54 changed files with 808 additions and 694 deletions
|
@ -1,14 +1,13 @@
|
|||
import { SelectCharacterScene } from "./SelectCharacterScene";
|
||||
|
||||
export class SelectCharacterMobileScene extends SelectCharacterScene {
|
||||
|
||||
create(){
|
||||
create() {
|
||||
super.create();
|
||||
this.onResize();
|
||||
this.selectedRectangle.destroy();
|
||||
}
|
||||
|
||||
protected defineSetupPlayer(num: number){
|
||||
protected defineSetupPlayer(num: number) {
|
||||
const deltaX = 30;
|
||||
const deltaY = 2;
|
||||
let [playerX, playerY] = this.getCharacterPosition();
|
||||
|
@ -16,48 +15,44 @@ export class SelectCharacterMobileScene extends SelectCharacterScene {
|
|||
let playerScale = 1.5;
|
||||
let playerOpacity = 1;
|
||||
|
||||
if( this.currentSelectUser !== num ){
|
||||
if (this.currentSelectUser !== num) {
|
||||
playerVisible = false;
|
||||
}
|
||||
if( num === (this.currentSelectUser + 1) ){
|
||||
if (num === this.currentSelectUser + 1) {
|
||||
playerY -= deltaY;
|
||||
playerX += deltaX;
|
||||
playerScale = 0.8;
|
||||
playerOpacity = 0.6;
|
||||
playerVisible = true;
|
||||
}
|
||||
if( num === (this.currentSelectUser + 2) ){
|
||||
if (num === this.currentSelectUser + 2) {
|
||||
playerY -= deltaY;
|
||||
playerX += (deltaX * 2);
|
||||
playerX += deltaX * 2;
|
||||
playerScale = 0.8;
|
||||
playerOpacity = 0.6;
|
||||
playerVisible = true;
|
||||
}
|
||||
if( num === (this.currentSelectUser - 1) ){
|
||||
if (num === this.currentSelectUser - 1) {
|
||||
playerY -= deltaY;
|
||||
playerX -= deltaX;
|
||||
playerScale = 0.8;
|
||||
playerOpacity = 0.6;
|
||||
playerVisible = true;
|
||||
}
|
||||
if( num === (this.currentSelectUser - 2) ){
|
||||
if (num === this.currentSelectUser - 2) {
|
||||
playerY -= deltaY;
|
||||
playerX -= (deltaX * 2);
|
||||
playerX -= deltaX * 2;
|
||||
playerScale = 0.8;
|
||||
playerOpacity = 0.6;
|
||||
playerVisible = true;
|
||||
}
|
||||
return {playerX, playerY, playerScale, playerOpacity, playerVisible}
|
||||
return { playerX, playerY, playerScale, playerOpacity, playerVisible };
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Returns pixel position by on column and row number
|
||||
*/
|
||||
protected getCharacterPosition(): [number, number] {
|
||||
return [
|
||||
this.game.renderer.width / 2,
|
||||
this.game.renderer.height / 3
|
||||
];
|
||||
}
|
||||
|
||||
protected getCharacterPosition(): [number, number] {
|
||||
return [this.game.renderer.width / 2, this.game.renderer.height / 3];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue