Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <head>
- <meta charset="UTF-8" />
- <title>hello phaser!</title>
- <script src="./phaser.min.js"></script>
- </head>
- <body>
- <script type="text/javascript">
- window.onload = function() {
- // Note that this html file is set to pull down Phaser 2.5.0 from the JS Delivr CDN.
- // Although it will work fine with this tutorial, it's almost certainly not the most current version.
- // Be sure to replace it with an updated version before you start experimenting with adding your own code.
- const game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create });
- function preload () {
- game.load.image('logo', 'assets/images/azaritech-logo-robot.png');
- }
- function create () {
- const logo = game.add.sprite(game.world.centerX, game.world.centerY, 'logo');
- logo.anchor.setTo(0.5, 0.5);
- }
- };
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement