This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function create () | |
| { | |
| map = this.make.tilemap({ key: 'map' }); | |
| var groundTiles = map.addTilesetImage('ground_1x1'); | |
| var coinTiles = map.addTilesetImage('coin'); | |
| map.createLayer('Background Layer', groundTiles, 0, 0); | |
| groundLayer = map.createLayer('Ground Layer', groundTiles, 0, 0); | |
| coinLayer = map.createLayer('Coin Layer', coinTiles, 0, 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title></title> | |
| </head> | |
| <body> | |
| </body> | |
| <script src="https://cdn.jsdelivr.net/npm/phaser@3.55.2/dist/phaser.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Dice{ | |
| constructor(scene,x,y,face){ | |
| this.scene=scene; | |
| this.x=x; | |
| this.y=y; | |
| this.face=face; | |
| this.dice=this.scene.add.sprite(this.x,this.y,"dice",this.face-1).setScale(2.3); | |
| this.dice.setInteractive(); | |
| this.dice.on('pointerdown',this.spin); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"> | |
| </head> | |
| <body> | |
| <nav class="navbar bg-dark" data-bs-theme="dark"> | |
| <div class="container-fluid"> | |
| <a class="navbar-brand" href="#"> | |
| <img src="https://i.ibb.co/wrbwXXf/g2039.png"> | |
| </a> |