1 decade ago by Joncom
Is there a way to make a special kind of entity that's always above all other map layers, even if the entity layer is not the top one?
This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact
039;d have to draw this entity yourself. Depending on what you want to do, you could either just draw an #ig.Image
above all layers, or modify your entity a bit:// In your Entity init: function( x, y, settings ) { this.parent( x, y, settings ); // save a reference to this entity on your game ig.game.specialEntity = this; }, draw: function( reallyDraw ) { // Only draw when the 'reallyDraw' param is true, // so it ignores the "normal" draw call if( reallyDraw ) { this.parent(); } } // In your Game draw: function() { // Draw all background maps and entities this.parent(); // Call draw() on your special entity with the extra // parameter added this.specialEntity.draw( true ); }