foreach fail
This commit is contained in:
parent
552639809f
commit
9327b4381c
@ -4,8 +4,7 @@
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "parcel index.html --port 40080 --no-hmr",
|
||||
"start-lite": "parcel index.html --port 40080 --no-hmr --no-source-maps",
|
||||
"start": "parcel index.html --port 40080 --no-hmr --no-source-maps",
|
||||
"build": "rm -rf dist && parcel build index.html",
|
||||
"lint": "eslint --fix --ext .jsx src/",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
|
||||
@ -22,10 +22,9 @@ class CrypList extends Phaser.Scene {
|
||||
}
|
||||
|
||||
redraw() {
|
||||
this.children.list.forEach(t => {
|
||||
t.disableInteractive();
|
||||
t.destroy();
|
||||
});
|
||||
for (let i = this.children.list.length - 1; i >= 0; i--) {
|
||||
this.children.list[i].destroy();
|
||||
}
|
||||
}
|
||||
|
||||
renderCryps(cryps) {
|
||||
|
||||
@ -35,7 +35,9 @@ class CrypPage extends Phaser.Scene {
|
||||
}
|
||||
|
||||
redraw() {
|
||||
this.children.list.forEach(t => t.destroy());
|
||||
for (let i = this.children.list.length - 1; i >= 0; i--) {
|
||||
this.children.list[i].destroy();
|
||||
}
|
||||
}
|
||||
|
||||
renderCryp(cryp) {
|
||||
|
||||
@ -8,7 +8,7 @@ const TOP_MARGIN = 50;
|
||||
const ROW_MARGIN = 50;
|
||||
const TEXT_MARGIN = 24;
|
||||
|
||||
const xPos = i => Math.random() * 1400;
|
||||
const xPos = i => 0;
|
||||
const yPos = i => (i * ROW_HEIGHT + ROW_MARGIN) + TOP_MARGIN;
|
||||
|
||||
function crypRow(list, cryp, i) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user