Open
Description
Failing in creating more then one listView
one is running over the other even though im assigning the instances to different
vars and even using different parents on listView
constructor
this.right = {};
this.left = {};
renderScroller (x, y, items, obj) {
const bounds = new Phaser.Rectangle(
x,
y,
500,
600
);
const options = {
direction: 'y',
overflow: 100,
padding: 50
};
obj = new ListView(this.game, this, bounds, options);
obj.scroller.enable();
obj.addMultiple(...items);
obj.tweenToItem(0, 2);
};
const items = [
this.game.add.image(0, 0, 'image-name'),
this.game.add.image(0, 0, 'image-name')
];
// Then calling the above render twice
this.renderScroller(100, 500, items, this.left);
this.renderScroller(500, 500, items, this.right);
// 'this' is a class extending Phase.Group that contains this snippet
any solution/ walk around??
Thanks
Metadata
Metadata
Assignees
Labels
No labels