Fixing linting
This commit is contained in:
parent
0c04d4305b
commit
d72741ce0c
@ -9,7 +9,7 @@
|
|||||||
"prod": "tsc && node ./dist/server.js",
|
"prod": "tsc && node ./dist/server.js",
|
||||||
"test": "ts-node node_modules/jasmine/bin/jasmine --config=jasmine.json",
|
"test": "ts-node node_modules/jasmine/bin/jasmine --config=jasmine.json",
|
||||||
"lint": "node_modules/.bin/eslint src/ . --ext .ts",
|
"lint": "node_modules/.bin/eslint src/ . --ext .ts",
|
||||||
"fix": "node_modules/.bin/eslint src/ . --ext .ts"
|
"fix": "node_modules/.bin/eslint --fix src/ . --ext .ts"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "webpack-dev-server --open",
|
"start": "webpack-dev-server --open",
|
||||||
"build": "webpack",
|
"build": "webpack",
|
||||||
"lint": "node_modules/.bin/eslint src/ . --ext .ts"
|
"lint": "node_modules/.bin/eslint src/ . --ext .ts",
|
||||||
|
"fix": "node_modules/.bin/eslint --fix src/ . --ext .ts"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ export class PlayableCaracter extends Phaser.Physics.Arcade.Sprite {
|
|||||||
super(scene, x, y, texture, frame);
|
super(scene, x, y, texture, frame);
|
||||||
|
|
||||||
// Yes, I know, I'm declaring a sprite inside a sprite. ARP, save me from this madness :)
|
// Yes, I know, I'm declaring a sprite inside a sprite. ARP, save me from this madness :)
|
||||||
this.playerName = new BitmapText(scene, x, y - 32, 'main_font', name, 8);
|
this.playerName = new BitmapText(scene, x, y - 25, 'main_font', name, 8);
|
||||||
this.playerName.setOrigin(0.5).setCenterAlign();
|
this.playerName.setOrigin(0.5).setCenterAlign();
|
||||||
scene.add.existing(this.playerName);
|
scene.add.existing(this.playerName);
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ export class PlayableCaracter extends Phaser.Physics.Arcade.Sprite {
|
|||||||
if(this.bubble) {
|
if(this.bubble) {
|
||||||
this.bubble.moveBubble(this.x, this.y);
|
this.bubble.moveBubble(this.x, this.y);
|
||||||
}
|
}
|
||||||
this.playerName.setPosition(this.x, this.y - 32);
|
this.playerName.setPosition(this.x, this.y - 25);
|
||||||
}
|
}
|
||||||
|
|
||||||
stop(){
|
stop(){
|
||||||
@ -54,7 +54,7 @@ export class PlayableCaracter extends Phaser.Physics.Arcade.Sprite {
|
|||||||
say(text: string) {
|
say(text: string) {
|
||||||
if (this.bubble) return;
|
if (this.bubble) return;
|
||||||
this.bubble = new SpeechBubble(this.scene, this, text)
|
this.bubble = new SpeechBubble(this.scene, this, text)
|
||||||
//todo make the buble destroy on player movement?
|
//todo make the bubble destroy on player movement?
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.bubble.destroy();
|
this.bubble.destroy();
|
||||||
this.bubble = null;
|
this.bubble = null;
|
||||||
|
@ -57,7 +57,7 @@ export class LogincScene extends Phaser.Scene {
|
|||||||
let name = this.nameInput.getText();
|
let name = this.nameInput.getText();
|
||||||
if (name === '') {
|
if (name === '') {
|
||||||
return
|
return
|
||||||
};
|
}
|
||||||
gameManager.connect(name).then(() => {
|
gameManager.connect(name).then(() => {
|
||||||
this.scene.start(GameSceneName, { name });
|
this.scene.start(GameSceneName, { name });
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user