skirmish.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <html>
  2. <head>
  3. <script src="/vendor/phaser.js"></script>
  4. <script src="./js/ayyoWars.js"></script>
  5. <script>
  6. // window['Behaviors'] = ayyoWars.Behaviors;
  7. </script>
  8. <style>
  9. body {
  10. padding: 0px;
  11. margin: 0px;
  12. }
  13. </style>
  14. </head>
  15. <body>
  16. <div id="game-canvas-div"></div>
  17. <script type="text/javascript">
  18. /*
  19. new page embed syntax
  20. design is such that each page reloads the game engine entirely
  21. */
  22. ayyoWars.Game.init({});
  23. ayyoWars.Game.bindCreate(function(){
  24. let mode = ayyoWars.Thing.create({
  25. name: 'skirmish-mode'
  26. });
  27. ayyoWars.Behavior.attach('hasStateManager', game);
  28. ayyoWars.Behavior.attach('isSkirmishMode', mode);
  29. });
  30. </script>
  31. <h2>Are you a leet hackerperson?</h2>
  32. <h3>This page is *fully* HACKABLE</h2>
  33. <p>
  34. Open your console and try this:
  35. <code>
  36. console.log(Things['PLAYER_1'])
  37. </code>
  38. Want to see where we store our Game values? Try this:
  39. <code>
  40. console.log(Things['PLAYER_1'].G)
  41. </code>
  42. </p>
  43. </body>
  44. </html>