Doors as Buttons

Dungeon doorways should be both clickable and sense collisions.
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
//Phaser III - clicking on a doorway // ============ // Example 4.6: Doors as Buttons // ============ // Creating door rectangles; review console in this experiment //placed on a wall with 2px extended into the room doorN = this.add.rectangle(35,0,60,18,0x000000) .setInteractive() .setOrigin(0);
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus