Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8" />
  5. <title>hello phaser!</title>
  6. <script src="./phaser.min.js"></script>
  7. </head>
  8. <body>
  9.  
  10. <script type="text/javascript">
  11.  
  12. window.onload = function() {
  13.  
  14. // Note that this html file is set to pull down Phaser 2.5.0 from the JS Delivr CDN.
  15. // Although it will work fine with this tutorial, it's almost certainly not the most current version.
  16. // Be sure to replace it with an updated version before you start experimenting with adding your own code.
  17.  
  18. const game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create });
  19.  
  20. function preload () {
  21.  
  22. game.load.image('logo', 'assets/images/azaritech-logo-robot.png');
  23.  
  24. }
  25.  
  26. function create () {
  27.  
  28. const logo = game.add.sprite(game.world.centerX, game.world.centerY, 'logo');
  29. logo.anchor.setTo(0.5, 0.5);
  30.  
  31. }
  32.  
  33. };
  34.  
  35. </script>
  36.  
  37. </body>
  38. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement