a munch adventure
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

39 lines
526 B

  1. "use strict"
  2. let audioContext;
  3. let state = {
  4. player: {
  5. items: {
  6. keys: [
  7. ]
  8. },
  9. rooms: {
  10. }
  11. }
  12. }
  13. function print(lines) {
  14. (lines.concat([String.fromCharCode(160)])).forEach(line => {
  15. const log = document.querySelector("#log");
  16. const div = document.createElement("div");
  17. div.textContent = line;
  18. log.appendChild(div);
  19. });
  20. }
  21. // setup the game
  22. function init() {
  23. initWorld("demo", state);
  24. initAudio();
  25. goToRoom("Home", state);
  26. }
  27. window.addEventListener("load", init);