|
@@ -2,11 +2,11 @@ import * as PIXI from 'pixi.js';
|
|
|
// import config from '../../config';
|
|
|
import GuiableContainer from '../../../helpers/Guiable';
|
|
|
|
|
|
-import CardHolder from '../base/CardHolder';
|
|
|
+import CollectionHolder from '../base/CollectionHolder';
|
|
|
|
|
|
import Button from '../misc/Button.js';
|
|
|
-//to be deleted
|
|
|
-import Card from '../base/Card.js';
|
|
|
+
|
|
|
+//import Card from '../base/Card.js';
|
|
|
|
|
|
const DefaultImageUrl = '/files/assets/ui/papyrus.jpg';
|
|
|
const DefaultImage = PIXI.Texture.fromImage(DefaultImageUrl);
|
|
@@ -57,18 +57,18 @@ class CollectionHandler extends GuiableContainer{
|
|
|
this.sprite.height= h;
|
|
|
|
|
|
this.addChild(this.sprite);
|
|
|
- let card = new Card({'x':100, 'y':120});
|
|
|
- card.zIndex = 4;
|
|
|
- this.addChild(card);
|
|
|
+ // let card = new Card({'x':100, 'y':120});
|
|
|
+ // card.zIndex = 4;
|
|
|
+ // this.addChild(card);
|
|
|
//
|
|
|
this.addUI(props);
|
|
|
this.position.set(-500,-320);
|
|
|
|
|
|
- this.cards.push(new CardHolder({GameLayer, 'x': 160, 'y': -230, team: 0, id: 3}).scaleTo(CollectionScale));
|
|
|
- this.cards.push(new CardHolder({GameLayer, 'x': 160, 'y': 0, team: 1, id: 1}).scaleTo(CollectionScale));
|
|
|
- this.cards.push(new CardHolder({GameLayer, 'x': 0, 'y': -230, team: 1, id: 5}).scaleTo(CollectionScale));
|
|
|
- this.cards.push(new CardHolder({GameLayer, 'x': 0, 'y': 0, team: 1, id: 4}).scaleTo(CollectionScale));
|
|
|
- this.cards.push(new CardHolder({GameLayer, 'x': 80, 'y': 230, team: 1, id: 3}).scaleTo(CollectionScale));
|
|
|
+ this.cards.push(new CollectionHolder({GameLayer, 'x': 0, 'y': 0, team: 0, id: 3}).scaleTo(CollectionScale));
|
|
|
+ this.cards.push(new CollectionHolder({GameLayer, 'x': 0, 'y': 0, team: 1, id: 1}).scaleTo(CollectionScale));
|
|
|
+ this.cards.push(new CollectionHolder({GameLayer, 'x': 0, 'y': -230, team: 1, id: 5}).scaleTo(CollectionScale));
|
|
|
+ this.cards.push(new CollectionHolder({GameLayer, 'x': 0, 'y': 0, team: 1, id: 4}).scaleTo(CollectionScale));
|
|
|
+ this.cards.push(new CollectionHolder({GameLayer, 'x': 80, 'y': 230, team: 1, id: 3}).scaleTo(CollectionScale));
|
|
|
this.cards.forEach((c) => c.show());
|
|
|
this.cards.forEach((c) => this.addChild(c));
|
|
|
|
|
@@ -87,7 +87,7 @@ class CollectionHandler extends GuiableContainer{
|
|
|
super._kill();
|
|
|
}
|
|
|
|
|
|
- addUI(props){
|
|
|
+ addUI(){
|
|
|
let leftButton = new Button({GameLayer: this.GameLayer, Text: {text: 'Alerta'}, 'x': 130, 'y': 540});
|
|
|
leftButton.scale.set(0.3);
|
|
|
this.addChild(leftButton.onClick(() =>{
|