|
@@ -127,10 +127,11 @@ class Card extends GuiableContainer{
|
|
|
}
|
|
|
|
|
|
loadCard(number) {
|
|
|
- number = parseInt(number+0.5, 10) % 4;
|
|
|
+ const mod = 4;
|
|
|
+ number = parseInt(number+0.5, 10);
|
|
|
this.card = number;
|
|
|
- this.imageURL = Deck.Filenames[number];
|
|
|
- this.sprite.texture = Deck.Textures[number];
|
|
|
+ this.imageURL = Deck.Filenames[number%mod];
|
|
|
+ this.sprite.texture = Deck.Textures[number%mod];
|
|
|
|
|
|
this.machineCard = new Machine.Card(number);
|
|
|
this.machineCard.attack.forEach((a,i) => this.numbers[i].setText(a));
|