foreach fail
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user