Search the Community
Showing results for tags 'bringtotop'.
-
Hi guys, does anyone know how can I bring in front of all of my scene a container(popup) that was created in a previous scene? Is this possbile? Thanks.
-
Hello! I want to use method BringToTop for layer data item. But it doesnt work for me. I have some layers, and i want to hide my character behind some sprites. I need something like that: But i have got it: Here is my code: this.parent.Location.location = this.parent.game.add.tilemap('map'); if (!this.parent.Location.props.images) { console.error('Images are empty or undefined read readme.md for information'); return false; } _.each(this.parent.Location.props.images, (layer, index) => { this.parent.Location.location.addTilesetImage(layer.name, layer.name); this.parent.Location[layer.layer] = this.parent.Location.location.createLayer(layer.layer); this.parent.Location[layer.layer].resizeWorld(); if (_.size(layer.bringToTop)) { this.bringToTop(index, layer.bringToTop); // 0, [6,7] } }); bringToTop(index, bringToTopArray) { let gid = this.parent.Location.location.tilesets[index].firstgid; _.each(bringToTopArray, (itemBring) => { _.each(this.parent.Location.location.layers[index].data, (layerData) => { _.each(layerData, (layerDataItem) => { if ((itemBring + gid) === layerDataItem.index) { let timeAfterLoad = this.parent.game.time.events.add(0, () => { this.parent.game.world.bringToTop(layerDataItem); this.parent.game.time.events.remove(timeAfterLoad); }); } }); }) }); } If you know another ways how i can resolve that problem, let me know please.
-
Hello all, Just wondering if the tileMapLayer is supposed to have the 'bringToTop' method in it still? I updated my version of Phaser to 2.3.0, and discovered that it no longer existed. Is this supposed to be the case? Currently I'm just hacking it a bit and doing: Phaser.TilemapLayer.prototype.bringToTop = Phaser.Component.BringToTop.prototype.bringToTop;Just wondered in case things had been changed, or if it was done by mistake. Cheers
-
- bug
- tilemaplayer
-
(and 2 more)
Tagged with:
-
I'm using Groups to create layers, but the code is structured so that the Group layer that needs to always be at the very top (the screen blanker) is the first created because it needs to cover up all the nasty transitions done by lower level stuff. So I need a way to bring that Group to the top whenever another Group is added. Group.bringToTop is for sprites inside the group.