diff --git a/json/001.мир.js b/json/001.мир.js new file mode 100644 index 0000000..2f4b340 --- /dev/null +++ b/json/001.мир.js @@ -0,0 +1 @@ +var мир = {}; diff --git a/json/011.настройки.js b/json/011.настройки.js new file mode 100644 index 0000000..8708a61 --- /dev/null +++ b/json/011.настройки.js @@ -0,0 +1,30 @@ +мир.настройки = { + type: Phaser.AUTO, + width: 800, + height: 600, + backgroundColor: 0xfbfbfb, + scale: { + width: 800, + height: 600, + parent: document.getElementById("родитель"), + mode: Phaser.Scale.ENVELOP, + autoCenter: Phaser.Scale.CENTER_BOTH, + }, + physics: { + default: "matter", + matter: { + gravity: { + y: 0.01, + }, + debug: { + showBody: true, + showStaticBody: true, + }, + }, + }, + scene: { + preload: function() { }, + create: function() { }, + update: function() { }, + }, +}; diff --git a/json/101.ресурсы.js b/json/101.ресурсы.js new file mode 100644 index 0000000..af6db63 --- /dev/null +++ b/json/101.ресурсы.js @@ -0,0 +1,29 @@ +мир.ресурсы = { + изображения: { + основа: "основа.jpg", + }, + звуки: { + цикл: "loop.wav", + }, +}; + +мир.настройки.scene.preload = function() +{ + const изо = мир.ресурсы.изображения; + if (изо) + { + for (имя in изо) + { + this.load.image(имя, изо[имя]); + } + } + + const звуки = мир.ресурсы.звуки; + if (звуки) + { + for (имя in звуки) + { + this.load.audio(имя, звуки[имя]); + } + } +}; diff --git a/json/999.игра.js b/json/999.игра.js new file mode 100644 index 0000000..f4ad776 --- /dev/null +++ b/json/999.игра.js @@ -0,0 +1 @@ +мир.игра = new Phaser.Game(мир.настройки); diff --git a/json/index.html b/json/index.html new file mode 100644 index 0000000..472a2de --- /dev/null +++ b/json/index.html @@ -0,0 +1,33 @@ + + + + + J 0.1.0 + + + + +
+ + + + + + diff --git a/json/loop.wav b/json/loop.wav new file mode 100644 index 0000000..1cf005a Binary files /dev/null and b/json/loop.wav differ diff --git a/json/основа.jpg b/json/основа.jpg new file mode 100644 index 0000000..5c95781 Binary files /dev/null and b/json/основа.jpg differ